[PATCH 4 of 6 stable] mq: don't lose whitespace changes with [diff] ignorews=True

Mads Kiilerich mads at kiilerich.com
Sat Jun 17 17:06:20 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 5dfc12c8d1fa53baf7b9d0099bbac1e05b90f75f
# Parent  e086df12576d6829b61d760636af2a189c385136
mq: don't lose whitespace changes with [diff] ignorews=True

Patches are fragile - missing whitespace can make them fail to apply correctly.

diff --git a/hgext/mq.py b/hgext/mq.py
--- a/hgext/mq.py
+++ b/hgext/mq.py
@@ -520,6 +520,7 @@ class queue(object):
             # disable custom diff configuration - we need a stable format
             diffopts.nobinary = False
             diffopts.noprefix = False
+            diffopts.ignorews = 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
@@ -235,6 +235,12 @@ Test how [diff] configuration influence 
   # Date 0 0
   # Parent  cf0bfe72686a47d8d7d7b4529a3adb8b0b449a9f
   
+  diff -r cf0bfe72686a -r fb9c4422b0f3 a
+  --- a/a
+  +++ b/a
+  @@ -1,1 +1,1 @@
+  -a
+  + a
   $ cat .hg/patches/diff
   # HG changeset patch
   # Date 0 0


More information about the Mercurial-devel mailing list