[PATCH 3 of 6 stable] mq: create patches with a/b prefix, also with [diff] noprefix=True

Mads Kiilerich mads at kiilerich.com
Sat Jun 17 17:06:19 EDT 2017


# HG changeset patch
# User Mads Kiilerich <mads at kiilerich.com>
# Date 1497727704 -7200
#      Sat Jun 17 21:28:24 2017 +0200
# Branch stable
# Node ID e086df12576d6829b61d760636af2a189c385136
# Parent  2dae66ed58c0e2440a344ab8de645436a4c1f1a6
mq: create patches with a/b prefix, also with [diff] noprefix=True

mq itself (and probably also other tools) fail to apply patches without the a/b
prefix.

diff --git a/hgext/mq.py b/hgext/mq.py
--- a/hgext/mq.py
+++ b/hgext/mq.py
@@ -519,6 +519,7 @@ class queue(object):
         if stable:
             # disable custom diff configuration - we need a stable format
             diffopts.nobinary = False
+            diffopts.noprefix = False
             # note: diff options showfunc and unified might influence diffs
             # but don't do any harm
         return diffopts
diff --git a/tests/test-mq-git.t b/tests/test-mq-git.t
--- a/tests/test-mq-git.t
+++ b/tests/test-mq-git.t
@@ -240,7 +240,7 @@ Test how [diff] configuration influence 
   # Date 0 0
   # Parent  fb9c4422b0f37dd576522dd9a3f99b825c177efe
   
-  diff --git b b
+  diff --git a/b b/b
   index 78981922613b2afb6025042ff6bd878ac1994e85..f76dd238ade08917e6712764a16a22005a50573d
   GIT binary patch
   literal 1


More information about the Mercurial-devel mailing list