# HG changeset patch # User Thomas Arendsen Hein # Date 1145475591 -7200 # Node ID 2b8f887b2d1d617443ad0085fa20ef3b2ed28cde # Parent cd7cb896396bca257f0f98318b009801380391a3# Parent 4d2c2597876fb1a5d55d3d0a6a99da3557e252ac Merge with crew diff -r cd7cb896396b -r 2b8f887b2d1d contrib/convert-repo --- 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) diff -r cd7cb896396b -r 2b8f887b2d1d hgext/mq.py --- 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): diff -r cd7cb896396b -r 2b8f887b2d1d mercurial/commands.py --- 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() diff -r cd7cb896396b -r 2b8f887b2d1d mercurial/hgweb.py --- 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)): diff -r cd7cb896396b -r 2b8f887b2d1d mercurial/util.py --- 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 diff -r cd7cb896396b -r 2b8f887b2d1d templates/filerevision-raw.tmpl --- 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# diff -r cd7cb896396b -r 2b8f887b2d1d templates/map-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