Merge with crew
authorThomas Arendsen Hein <thomas@intevation.de>
Wed, 19 Apr 2006 21:39:51 +0200
changeset 2100 2b8f887b2d1d
parent 2099 cd7cb896396b (current diff)
parent 2097 4d2c2597876f (diff)
child 2102 c62112815801
child 2105 21cf3fe64e27
Merge with crew
templates/filerevision-raw.tmpl
--- a/contrib/convert-repo	Wed Apr 19 21:37:43 2006 +0200
+++ b/contrib/convert-repo	Wed Apr 19 21:39:51 2006 +0200
@@ -73,7 +73,7 @@
             if n == "parent": parents.append(v)
 
         tzs, tzh, tzm = tz[-5:-4] + "1", tz[-4:-2], tz[-2:]
-        tz = int(tzs) * (int(tzh) * 3600 + int(tzm))
+        tz = -int(tzs) * (int(tzh) * 3600 + int(tzm))
         date = tm + " " + str(tz)
         return (parents, author, date, message)
 
--- a/hgext/mq.py	Wed Apr 19 21:37:43 2006 +0200
+++ b/hgext/mq.py	Wed Apr 19 21:39:51 2006 +0200
@@ -1108,7 +1108,8 @@
 
 def diff(ui, repo, *files, **opts):
     """diff of the current patch"""
-    repomap[repo].diff(repo, files)
+    # deep in the dirstate code, the walkhelper method wants a list, not a tuple
+    repomap[repo].diff(repo, list(files))
     return 0
 
 def lastsavename(path):
--- a/mercurial/commands.py	Wed Apr 19 21:37:43 2006 +0200
+++ b/mercurial/commands.py	Wed Apr 19 21:39:51 2006 +0200
@@ -3249,11 +3249,9 @@
     return (cmd, cmd and i[0] or None, args, options, cmdoptions)
 
 def dispatch(args):
-    signal.signal(signal.SIGTERM, catchterm)
-    try:
-        signal.signal(signal.SIGHUP, catchterm)
-    except AttributeError:
-        pass
+    for name in 'SIGTERM', 'SIGHUP', 'SIGBREAK':
+        num = getattr(signal, name, None)
+        if num: signal.signal(num, catchterm)
 
     try:
         u = ui.ui()
--- a/mercurial/hgweb.py	Wed Apr 19 21:37:43 2006 +0200
+++ b/mercurial/hgweb.py	Wed Apr 19 21:39:51 2006 +0200
@@ -419,7 +419,8 @@
         mt = mimetypes.guess_type(f)[0]
         rawtext = text
         if util.binary(text):
-            text = "(binary:%s)" % mt
+            text = "(binary:%s)" % (mt or 'data')
+        mt = mt or 'text/plain'
 
         def lines():
             for l, t in enumerate(text.splitlines(1)):
--- a/mercurial/util.py	Wed Apr 19 21:37:43 2006 +0200
+++ b/mercurial/util.py	Wed Apr 19 21:39:51 2006 +0200
@@ -20,8 +20,12 @@
     '''filter string S through command CMD, returning its output'''
     (pout, pin) = popen2.popen2(cmd, -1, 'b')
     def writer():
-        pin.write(s)
-        pin.close()
+        try:
+            pin.write(s)
+            pin.close()
+        except IOError, inst:
+            if inst.errno != errno.EPIPE:
+                raise
 
     # we should use select instead on UNIX, but this will work on most
     # systems, including Windows
--- a/templates/filerevision-raw.tmpl	Wed Apr 19 21:37:43 2006 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,4 +0,0 @@
-Context-type: #mimetype#
-Content-disposition: filename=#file#
-
-#raw#
--- a/templates/map-raw	Wed Apr 19 21:37:43 2006 +0200
+++ b/templates/map-raw	Wed Apr 19 21:39:51 2006 +0200
@@ -8,7 +8,7 @@
 changesetparent = '# parent: #node#'
 changesetchild = '# child: #node#'
 filenodelink = ''
-filerevision = filerevision-raw.tmpl
+filerevision = 'Content-Type: #mimetype#\nContent-Disposition: filename=#file#\n\n#raw#'
 fileline = '#line#'
 diffblock = '#lines#'
 filediff = filediff-raw.tmpl