Patchwork [6,of,6,stable] mq: don't lose whitespace changes with [diff] ignoreblanklines=True

login
register
mail settings
Submitter Mads Kiilerich
Date June 17, 2017, 9:06 p.m.
Message ID <863bb364f8201dda46c6.1497733582@xps>
Download mbox | patch
Permalink /patch/21469/
State Changes Requested
Headers show

Comments

Mads Kiilerich - June 17, 2017, 9:06 p.m.
# HG changeset patch
# User Mads Kiilerich <mads@kiilerich.com>
# Date 1497727704 -7200
#      Sat Jun 17 21:28:24 2017 +0200
# Branch stable
# Node ID 863bb364f8201dda46c6a3d51fb57bbbdc7cb69b
# Parent  feb176a4bd5186488abb27ed9ed4d5fcd9df6f12
mq: don't lose whitespace changes with [diff] ignoreblanklines=True

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

Patch

diff --git a/hgext/mq.py b/hgext/mq.py
--- a/hgext/mq.py
+++ b/hgext/mq.py
@@ -522,6 +522,7 @@  class queue(object):
             diffopts.noprefix = False
             diffopts.ignorews = False
             diffopts.ignorewsamount = False
+            diffopts.ignoreblanklines = 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
@@ -258,6 +258,12 @@  Test how [diff] configuration influence 
   literal 1
   Ic${MZ000310RR91
   
+  diff --git a/c b/c
+  --- a/c
+  +++ b/c
+  @@ -1,1 +1,2 @@
+   a
+  +
 
   $ cd ..