Commits

Yuya Nishihara committed b44ffe6

some patches

Comments (0)

Files changed (7)

+From fujiwara@ascade.co.jp Wed Jul 21 22:45:58 2010
+Delivered-To: yuya@tcha.org
+Received: by 10.142.251.11 with SMTP id y11cs244264wfh;
+        Wed, 21 Jul 2010 06:46:08 -0700 (PDT)
+Received: by 10.114.77.10 with SMTP id z10mr272943waa.168.1279719967414;
+        Wed, 21 Jul 2010 06:46:07 -0700 (PDT)
+Return-Path: <mercurial-devel-bounces@selenic.com>
+Received: from waste.org (waste.org [173.11.57.241])
+        by mx.google.com with ESMTP id g8si16135285ibb.64.2010.07.21.06.46.07;
+        Wed, 21 Jul 2010 06:46:07 -0700 (PDT)
+Received-SPF: neutral (google.com: 173.11.57.241 is neither permitted nor denied by best guess record for domain of mercurial-devel-bounces@selenic.com) client-ip=173.11.57.241;
+Authentication-Results: mx.google.com; spf=neutral (google.com: 173.11.57.241 is neither permitted nor denied by best guess record for domain of mercurial-devel-bounces@selenic.com) smtp.mail=mercurial-devel-bounces@selenic.com
+Received: from localhost (localhost [127.0.0.1])
+	by waste.org (Postfix) with ESMTP id DE0EB7418A;
+	Wed, 21 Jul 2010 08:46:06 -0500 (CDT)
+X-Virus-Scanned: Debian amavisd-new at waste.org
+Received: from waste.org ([127.0.0.1])
+	by localhost (waste.org [127.0.0.1]) (amavisd-new, port 10024)
+	with LMTP id QigSFReClSLY; Wed, 21 Jul 2010 08:46:06 -0500 (CDT)
+Received: from waste.org (localhost [127.0.0.1])
+	by waste.org (Postfix) with ESMTP id C6D1C74172;
+	Wed, 21 Jul 2010 08:46:04 -0500 (CDT)
+X-Original-To: mercurial-devel@waste.org
+Delivered-To: mercurial-devel@waste.org
+Received: from localhost (localhost [127.0.0.1])
+	by waste.org (Postfix) with ESMTP id 7CCD974172
+	for <mercurial-devel@waste.org>; Wed, 21 Jul 2010 08:46:03 -0500 (CDT)
+X-Virus-Scanned: Debian amavisd-new at waste.org
+Received: from waste.org ([127.0.0.1])
+	by localhost (waste.org [127.0.0.1]) (amavisd-new, port 10024)
+	with LMTP id gid4aXQygF8A for <mercurial-devel@waste.org>;
+	Wed, 21 Jul 2010 08:46:00 -0500 (CDT)
+Received: from ext-host1001.ascade.co.jp (ext-host0001.ascade.co.jp
+	[218.224.228.194]) by waste.org (Postfix) with ESMTP id 401D274170
+	for <mercurial-devel@selenic.com>; Wed, 21 Jul 2010 08:46:00 -0500 (CDT)
+Received: from server0003.ascade.co.jp (server0003.ascade.co.jp [10.1.1.58])
+	by ext-host1001.ascade.co.jp (Postfix) with ESMTP id 6C1C42F708
+	for <mercurial-devel@selenic.com>; Wed, 21 Jul 2010 22:45:59 +0900 (JST)
+Received: from juju.dzone.foozy.private (server0003.ascade.co.jp [10.1.1.58])
+	by server0003.ascade.co.jp (Postfix) with ESMTP id 5896A2B148
+	for <mercurial-devel@selenic.com>; Wed, 21 Jul 2010 22:45:59 +0900 (JST)
+MIME-Version: 1.0
+Subject: [PATCH] i18n: safety writing into non-ASCII named files on any shell
+	implementation
+X-Mercurial-Node: c83103eb88b4f795a7c7068303ab1c147823e42b
+Message-Id: <c83103eb88b4f795a7c7.1279719958@juju.dzone.foozy.private>
+User-Agent: Mercurial-patchbomb/1.6
+Date: Wed, 21 Jul 2010 22:45:58 +0900
+From: FUJIWARA Katsunori <fujiwara@ascade.co.jp>
+To: mercurial-devel@selenic.com
+X-BeenThere: mercurial-devel@selenic.com
+X-Mailman-Version: 2.1.11
+Precedence: list
+List-Id: <mercurial-devel.selenic.com>
+List-Unsubscribe: <http://selenic.com/mailman/options/mercurial-devel>,
+	<mailto:mercurial-devel-request@selenic.com?subject=unsubscribe>
+List-Archive: <http://selenic.com/pipermail/mercurial-devel>
+List-Post: <mailto:mercurial-devel@selenic.com>
+List-Help: <mailto:mercurial-devel-request@selenic.com?subject=help>
+List-Subscribe: <http://selenic.com/mailman/listinfo/mercurial-devel>,
+	<mailto:mercurial-devel-request@selenic.com?subject=subscribe>
+Content-Type: text/plain;
+  charset="us-ascii"
+Content-Transfer-Encoding: 7bit
+Sender: mercurial-devel-bounces@selenic.com
+Errors-To: mercurial-devel-bounces@selenic.com
+Status: R
+X-Status: N
+X-KMail-EncryptionState:  
+X-KMail-SignatureState:  
+X-KMail-MDN-Sent:  
+
+# HG changeset patch
+# User FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
+# Date 1279718904 -32400
+# Branch stable
+# Node ID c83103eb88b4f795a7c7068303ab1c147823e42b
+# Parent  9e874ee0fe97ffd00fe13300f4cdf6b44921e71d
+i18n: safety writing into non-ASCII named files on any shell implementation
+
+some shell implementation (e.g.: dash) can not handle redirection into
+non-ASCII UTF-8 named file correctly.
+
+this patch uses instant python script to write data into such files.
+
+diff -r 9e874ee0fe97 -r c83103eb88b4 tests/test-encoding-align
+--- a/tests/test-encoding-align	Tue Jul 13 03:04:14 2010 +0200
++++ b/tests/test-encoding-align	Wed Jul 21 22:28:24 2010 +0900
+@@ -8,17 +8,21 @@
+ hg init t
+ cd t
+ 
+-python << EOF
++cat << EOF > names.py
+ # (byte, width) = (6, 4)
+ s = "\xe7\x9f\xad\xe5\x90\x8d"
+ # (byte, width) = (7, 7): odd width is good for alignment test
+ m = "MIDDLE_"
+ # (byte, width) = (18, 12)
+ l = "\xe9\x95\xb7\xe3\x81\x84\xe9\x95\xb7\xe3\x81\x84\xe5\x90\x8d\xe5\x89\x8d"
++EOF
+ 
+-f = file('s', 'w'); f.write(s); f.close()
+-f = file('m', 'w'); f.write(m); f.close()
+-f = file('l', 'w'); f.write(l); f.close()
++python <<EOF
++import names
++
++f = file('s', 'w'); f.write(names.s); f.close()
++f = file('m', 'w'); f.write(names.m); f.close()
++f = file('l', 'w'); f.write(names.l); f.close()
+ 
+ # instant extension to show list of options
+ f = file('showoptlist.py', 'w'); f.write("""# encoding: utf-8
+@@ -29,9 +33,9 @@
+ cmdtable = {
+     'showoptlist':
+         (showoptlist,
+-         [('s', 'opt1', '', 'short width',  '""" + s + """'),
+-          ('m', 'opt2', '', 'middle width', '""" + m + """'),
+-          ('l', 'opt3', '', 'long width',   '""" + l + """')
++         [('s', 'opt1', '', 'short width',  '""" + names.s + """'),
++          ('m', 'opt2', '', 'middle width', '""" + names.m + """'),
++          ('l', 'opt3', '', 'long width',   '""" + names.l + """')
+          ],
+          ""
+         )
+@@ -69,25 +73,33 @@
+ touch $L
+ hg add $L
+ 
++# for safety append to non-ASCII UTF-8 named files
++# on any shell implementatoins
++cat <<EOF > append.py
++import sys
++import names
++
++namelist = [ names.s, names.m, names.l ]
++
++for i in xrange(len(namelist)):
++    f = file(namelist[i], 'a');
++    f.write('%s(%d)\n' % (sys.argv[1], (i + 1)));
++    f.close()
++EOF
++
+ #### commit(1)
+ 
+-echo 'first line(1)' >> $S
+-echo 'first line(2)' >> $M
+-echo 'first line(3)' >> $L
++python append.py 'first line'
+ hg commit -m 'first commit' -u $S -d "1000000 0"
+ 
+ #### commit(2)
+ 
+-echo 'second line(1)' >> $S
+-echo 'second line(2)' >> $M
+-echo 'second line(3)' >> $L
++python append.py 'second line'
+ hg commit -m 'second commit' -u $M -d "1000000 0"
+ 
+ #### commit(3)
+ 
+-echo 'third line(1)' >> $S
+-echo 'third line(2)' >> $M
+-echo 'third line(3)' >> $L
++python append.py 'third line'
+ hg commit -m 'third commit' -u $L -d "1000000 0"
+ 
+ #### check
+_______________________________________________
+Mercurial-devel mailing list
+Mercurial-devel@selenic.com
+http://selenic.com/mailman/listinfo/mercurial-devel
+# HG changeset patch
+# User FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
+# Date 1279382810 -32400
+# Branch stable
+# Node ID d342305f7635e607eef62fbfc9dc6f0e13be34d4
+# Parent  76454cbc11e48d692262843d0c87e81bbb2c053c
+i18n: use encoding.colwidth() instead of len() for correct column width
+
+Some encoding and language combinations (e.g.: UTF-8 and Japanese)
+cause encoding characters into sequence of bytes more than column
+width of them.
+
+So, encoding.colwidth() should be applied instread of len() on i18n
+strings.
+
+In addition to it, formatting by '%*s'/'%-*s' also uses "number of
+bytes" to calculate space padding size, and should be fixed, too.
+
+diff --git a/mercurial/commands.py b/mercurial/commands.py
+--- a/mercurial/commands.py
++++ b/mercurial/commands.py
+@@ -152,8 +152,9 @@
+         for f in funcmap:
+             l = [f(n) for n, dummy in lines]
+             if l:
+-                ml = max(map(len, l))
+-                pieces.append(["%*s" % (ml, x) for x in l])
++                sized = [(x, encoding.colwidth(x)) for x in l]
++                ml = max([w for x, w in sized])
++                pieces.append(["%s%s" % (' ' * (ml - w), x) for x, w in sized])
+ 
+         if pieces:
+             for p, l in zip(zip(*pieces), lines):
+@@ -2053,9 +2054,9 @@
+     if multioccur:
+         msg = _("\n[+] marked option can be specified multiple times")
+         if ui.verbose and name != 'shortlist':
+-            opt_output.append((msg, ()))
++            opt_output.append((msg, None))
+         else:
+-            opt_output.insert(-1, (msg, ()))
++            opt_output.insert(-1, (msg, None))
+ 
+     if not name:
+         ui.write(_("\nadditional help topics:\n\n"))
+@@ -2067,16 +2068,20 @@
+             ui.write(" %-*s  %s\n" % (topics_len, t, desc))
+ 
+     if opt_output:
+-        opts_len = max([len(line[0]) for line in opt_output if line[1]] or [0])
+-        for first, second in opt_output:
+-            if second:
+-                initindent = ' %-*s  ' % (opts_len, first)
+-                hangindent = ' ' * (opts_len + 3)
+-                ui.write('%s\n' % (util.wrap(second,
++        colwidth = encoding.colwidth
++        # normalize: (opt or message, desc or None, width of opt)
++        entries = [desc and (opt, desc, colwidth(opt)) or (opt, None, 0)
++                   for opt, desc in opt_output]
++        hanging = max([e[2] for e in entries])
++        for opt, desc, width in entries:
++            if desc:
++                initindent = ' %s%s  ' % (opt, ' ' * (hanging - width))
++                hangindent = ' ' * (hanging + 3)
++                ui.write('%s\n' % (util.wrap(desc,
+                                              initindent=initindent,
+                                              hangindent=hangindent)))
+             else:
+-                ui.write("%s\n" % first)
++                ui.write("%s\n" % opt)
+ 
+ def identify(ui, repo, source=None,
+              rev=None, num=None, id=None, branch=None, tags=None):
+diff --git a/mercurial/patch.py b/mercurial/patch.py
+--- a/mercurial/patch.py
++++ b/mercurial/patch.py
+@@ -11,7 +11,7 @@
+ 
+ from i18n import _
+ from node import hex, nullid, short
+-import base85, cmdutil, mdiff, util, diffhelpers, copies
++import base85, cmdutil, mdiff, util, diffhelpers, copies, encoding
+ 
+ gitre = re.compile('diff --git a/(.*) b/(.*)')
+ 
+@@ -1644,10 +1644,14 @@
+     maxtotal, maxname = 0, 0
+     totaladds, totalremoves = 0, 0
+     hasbinary = False
+-    for filename, adds, removes, isbinary in stats:
++
++    sized = [(filename, adds, removes, isbinary, encoding.colwidth(filename))
++             for filename, adds, removes, isbinary in stats]
++
++    for filename, adds, removes, isbinary, namewidth in sized:
+         totaladds += adds
+         totalremoves += removes
+-        maxname = max(maxname, len(filename))
++        maxname = max(maxname, namewidth)
+         maxtotal = max(maxtotal, adds + removes)
+         if isbinary:
+             hasbinary = True
+@@ -1667,15 +1671,17 @@
+         # if there were at least some changes.
+         return max(i * graphwidth // maxtotal, int(bool(i)))
+ 
+-    for filename, adds, removes, isbinary in stats:
++    for filename, adds, removes, isbinary, namewidth in sized:
+         if git and isbinary:
+             count = 'Bin'
+         else:
+             count = adds + removes
+         pluses = '+' * scale(adds)
+         minuses = '-' * scale(removes)
+-        output.append(' %-*s |  %*s %s%s\n' % (maxname, filename, countwidth,
+-                                               count, pluses, minuses))
++        output.append(' %s%s |  %*s %s%s\n' %
++                      (filename, ' ' * (maxname - namewidth),
++                       countwidth, count,
++                       pluses, minuses))
+ 
+     if stats:
+         output.append(_(' %d files changed, %d insertions(+), %d deletions(-)\n')
+diff --git a/tests/test-encoding-align b/tests/test-encoding-align
+new file mode 100755
+--- /dev/null
++++ b/tests/test-encoding-align
+@@ -0,0 +1,134 @@
++#!/bin/sh
++
++########################################
++
++hg init t
++cd t
++
++python << EOF
++# (byte, width) = (6, 4)
++s = "\xe7\x9f\xad\xe5\x90\x8d"
++# (byte, width) = (7, 7): odd width is good for alignment test
++m = "MIDDLE_"
++# (byte, width) = (18, 12)
++l = "\xe9\x95\xb7\xe3\x81\x84\xe9\x95\xb7\xe3\x81\x84\xe5\x90\x8d\xe5\x89\x8d"
++
++f = file('s', 'w'); f.write(s); f.close()
++f = file('m', 'w'); f.write(m); f.close()
++f = file('l', 'w'); f.write(l); f.close()
++
++# instant extension to show list of options
++f = file('showoptlist.py', 'w'); f.write("""# encoding: utf-8
++def showoptlist(ui, repo, *pats, **opts):
++    '''dummy command to show option descriptions'''
++    return 0
++
++cmdtable = {
++    'showoptlist':
++        (showoptlist,
++         [('s', 'opt1', '', 'short width',  '""" + s + """'),
++          ('m', 'opt2', '', 'middle width', '""" + m + """'),
++          ('l', 'opt3', '', 'long width',   '""" + l + """')
++         ],
++         ""
++        )
++}
++""")
++f.close()
++EOF
++
++########################################
++#### alignment of:
++####     - option descriptions in help
++
++cat <<EOF > .hg/hgrc
++[extensions]
++ja_ext = ${PWD}/showoptlist.py
++EOF
++echo '% check alignment of option descriptions in help'
++HGENCODING=utf-8 hg help showoptlist
++
++########################################
++#### alignment of:
++####     - user names in annotate
++####     - file names in diffstat
++
++#### add files
++
++touch `cat s`
++HGENCODING=utf-8 hg add `cat s`
++touch `cat m`
++HGENCODING=utf-8 hg add `cat m`
++touch `cat l`
++HGENCODING=utf-8 hg add `cat l`
++
++#### commit(1)
++
++cat <<EOF >> `cat s`
++first line(1)
++EOF
++cat <<EOF >> `cat m`
++first line(2)
++EOF
++cat <<EOF >> `cat l`
++first line(3)
++EOF
++HGENCODING=utf-8 hg commit -m 'first commit' -u `cat s` -d "1000000 0"
++
++#### commit(2)
++
++cat <<EOF >> `cat s`
++second line(1)
++EOF
++cat <<EOF >> `cat m`
++second line(2)
++EOF
++cat <<EOF >> `cat l`
++second line(3)
++EOF
++HGENCODING=utf-8 hg commit -m 'second commit' -u `cat m` -d "1000000 0"
++
++#### commit(3)
++
++cat <<EOF >> `cat s`
++third line(1)
++EOF
++cat <<EOF >> `cat m`
++third line(2)
++EOF
++cat <<EOF >> `cat l`
++third line(3)
++EOF
++HGENCODING=utf-8 hg commit -m 'third commit' -u `cat l` -d "1000000 0"
++
++#### check
++
++echo '% check alignment of user names in annotate'
++HGENCODING=utf-8 hg annotate -u `cat m`
++echo '% check alignment of filenames in diffstat'
++HGENCODING=utf-8 hg diff -c tip --stat
++
++########################################
++#### alignment of:
++####     - branch names in list
++####     - tag names in list
++
++#### add branches/tags
++
++HGENCODING=utf-8 hg branch `cat s`
++HGENCODING=utf-8 hg tag -d "1000000 0" `cat s`
++HGENCODING=utf-8 hg branch `cat m`
++HGENCODING=utf-8 hg tag -d "1000000 0" `cat m`
++HGENCODING=utf-8 hg branch `cat l`
++HGENCODING=utf-8 hg tag -d "1000000 0" `cat l`
++
++#### check
++
++echo '% check alignment of branches'
++HGENCODING=utf-8 hg tags
++echo '% check alignment of tags'
++HGENCODING=utf-8 hg tags
++
++########################################
++
++exit 0
+diff --git a/tests/test-encoding-align.out b/tests/test-encoding-align.out
+new file mode 100644
+--- /dev/null
++++ b/tests/test-encoding-align.out
+@@ -0,0 +1,34 @@
++% check alignment of option descriptions in help
++hg showoptlist 
++
++dummy command to show option descriptions
++
++options:
++
++ -s --opt1 短名          short width
++ -m --opt2 MIDDLE_       middle width
++ -l --opt3 長い長い名前  long width
++
++use "hg -v help showoptlist" to show global options
++% check alignment of user names in annotate
++        短名: first line(2)
++     MIDDLE_: second line(2)
++長い長い名前: third line(2)
++% check alignment of filenames in diffstat
++ MIDDLE_      |  1 +
++ 短名         |  1 +
++ 長い長い名前 |  1 +
++ 3 files changed, 3 insertions(+), 0 deletions(-)
++marked working directory as branch 短名
++marked working directory as branch MIDDLE_
++marked working directory as branch 長い長い名前
++% check alignment of branches
++tip                                5:afc60d8eed19
++長い長い名前                       4:19fe74d09ba0
++MIDDLE_                            3:8a20997d2281
++短名                               2:0cc06ffa3461
++% check alignment of tags
++tip                                5:afc60d8eed19
++長い長い名前                       4:19fe74d09ba0
++MIDDLE_                            3:8a20997d2281
++短名                               2:0cc06ffa3461

hgencoding-js.diff

+# HG changeset patch
+# Parent 36e25f25dec11e68fc3240326999c02b3879ab10
+templatefilters: make json filter handle multibyte characters correctly
+
+It aims to fix javascript error of hgweb's graph view in Japanese 'cp932'
+encoding.
+
+'cp932' contains multibyte characters ending with '\x5c' (backslash),
+e.g. '\x94\x5c' for Japanese Kanji 'Noh'.
+Due to json filter escapes '\' to '\\', multibyte string ending with
+'\x5c' is translated to "xxx\", resulting javascript parse error on
+a web browser.
+
+This patch changes json() to pass unicode to jsonescape().
+
+diff --git a/mercurial/templatefilters.py b/mercurial/templatefilters.py
+--- a/mercurial/templatefilters.py
++++ b/mercurial/templatefilters.py
+@@ -156,9 +156,13 @@ def json(obj):
+     elif isinstance(obj, int) or isinstance(obj, float):
+         return str(obj)
+     elif isinstance(obj, str):
+-        return '"%s"' % jsonescape(obj)
++        try:
++            return '"%s"' % jsonescape(unicode(
++                obj, encoding.encoding)).encode(encoding.encoding)
++        except (UnicodeEncodeError, UnicodeDecodeError):
++            return '"%s"' % jsonescape(obj)
+     elif isinstance(obj, unicode):
+-        return json(obj.encode('utf-8'))
++        return '"%s"' % jsonescape(obj).encode('utf-8')
+     elif hasattr(obj, 'keys'):
+         out = []
+         for k, v in obj.iteritems():
+diff --git a/tests/test-hgweb-commands b/tests/test-hgweb-commands
+--- a/tests/test-hgweb-commands
++++ b/tests/test-hgweb-commands
+@@ -60,5 +60,19 @@ echo % failing unbundle, requires POST r
+ echo % Static files
+ "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT '/static/style.css'
+ 
++echo % Stop and restart with HGENCODING=cp932
++"$TESTDIR/killdaemons.py"
++HGENCODING=cp932 hg serve --config server.uncompressed=False -n test \
++    -p $HGPORT -d --pid-file=hg.pid -E errors.log
++cat hg.pid >> $DAEMON_PIDS
++
++# commit message with Japanese Kanji 'Noh', which ends with '\x5c'
++echo foo >> foo
++HGENCODING=cp932 hg ci -m `python -c 'print("\x94\x5c")'`
++
++echo % Graph json escape of multibyte character
++"$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT '/graph/' \
++    | grep '^var data ='
++
+ echo % ERRORS ENCOUNTERED
+ cat errors.log
+diff --git a/tests/test-hgweb-commands.out b/tests/test-hgweb-commands.out
+--- a/tests/test-hgweb-commands.out
++++ b/tests/test-hgweb-commands.out
+@@ -982,4 +982,7 @@ ul#graphnodes li .info {
+ 	position: relative;
+ 	top: -1px;
+ }
++% Stop and restart with HGENCODING=cp932
++% Graph json escape of multibyte character
++var data = [["40b4d6888e92", [0, 1], [[0, 0, 1]], "�\", "test", "1970-01-01", ["stable", true], ["tip"]], ["1d22e65f027e", [0, 1], [[0, 0, 1]], "branch", "test", "1970-01-01", ["stable", false], []], ["a4f92ed23982", [0, 1], [[0, 0, 1]], "Added tag 1.0 for changeset 2ef0ac749a14", "test", "1970-01-01", ["default", true], []], ["2ef0ac749a14", [0, 1], [], "base", "test", "1970-01-01", ["default", false], ["1.0"]]];
+ % ERRORS ENCOUNTERED

hgplain-pager.diff

-# HG changeset patch
-# Parent e5a2134c083b223bd2998b6694e430e4999caee3
-pager: respect HGPLAIN
-
-Pager shouldn't be enabled for scripting use.
-
-diff --git a/hgext/pager.py b/hgext/pager.py
---- a/hgext/pager.py
-+++ b/hgext/pager.py
-@@ -78,6 +78,9 @@ def _runpager(p):
-             raise
- 
- def uisetup(ui):
-+    if ui.plain():
-+        return
-+
-     def pagecmd(orig, ui, options, cmd, cmdfunc):
-         p = ui.config("pager", "pager", os.environ.get("PAGER"))
-         if p and sys.stdout.isatty() and '--debugger' not in sys.argv:

mq-commit-editor-hack.diff

+# HG changeset patch
+# Parent c1b11ee12fe72771441296968a069ddcc55444e2
+
+diff --git a/hgext/mq.py b/hgext/mq.py
+--- a/hgext/mq.py
++++ b/hgext/mq.py
+@@ -857,7 +857,12 @@ class queue(object):
+                 if hasattr(msg, '__call__'):
+                     msg = msg()
+                 commitmsg = msg and msg or ("[mq]: %s" % patchfn)
+-                n = repo.commit(commitmsg, user, date, match=match, force=True)
++                if opts.get('edit'):
++                    e = cmdutil.commitforceeditor
++                else:
++                    e = False
++                n = repo.commit(commitmsg, user, date, match=match, force=True,
++                                editor=e)
+                 if n is None:
+                     raise util.Abort(_("repo commit failed"))
+                 try:
+@@ -1382,8 +1387,12 @@ class queue(object):
+             try:
+                 # might be nice to attempt to roll back strip after this
+                 patchf.rename()
++                if opts.get('edit'):
++                    e = cmdutil.commitforceeditor
++                else:
++                    e = False
+                 n = repo.commit(message, user, ph.date, match=match,
+-                                force=True)
++                                force=True, editor=e)
+                 self.applied.append(statusentry(n, patchfn))
+             except:
+                 ctx = repo[cparents[0]]
-hgplain-pager.diff
+zsh-qmove.diff
+hgencoding-js.diff
+mq-commit-editor-hack.diff
+8bittest.mbox
+colwidth.diff
 bom.diff
 bom-config.diff
 mq-qrename-subdir.diff
+# HG changeset patch
+# Parent a614666bbba4dacac120424da3bdaac74f383cab
+zsh completions: add qpush --move option
+
+diff --git a/contrib/zsh_completion b/contrib/zsh_completion
+--- a/contrib/zsh_completion
++++ b/contrib/zsh_completion
+@@ -901,6 +901,7 @@ _hg_cmd_qpush() {
+   '(--merge -m)'{-m+,--merge}'[merge from another queue]:' \
+   '(--name -n)'{-n+,--name}'[merge queue name]:' \
+   '(--force -f)'{-f,--force}'[apply if the patch has rejects]' \
++  '--move[reorder patch series and apply only the patch]' \
+   ':patch:_hg_qunapplied'
+ }
+ 
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.