[PATCH 2 of 2] record: re-enable whitespace-ignoring options

Jordi Gutiérrez Hermoso jordigh at octave.org
Thu Jan 16 14:07:04 CST 2014


# HG changeset patch
# User Jordi Gutiérrez Hermoso <jordigh at octave.org>
# Date 1389902703 18000
#      Thu Jan 16 15:05:03 2014 -0500
# Node ID ed0006bde38c0ae2e0f34b72bc7c7e30402c0e1f
# Parent  95a53ad012b6d5a640e91140a7da1a5f3f3df552
record: re-enable whitespace-ignoring options

It looks like somewhere down the line, patch.diffopts changed the
names of the options that it recognises, but record.recordfunc wasn't
updated to the new names. Instead of trying to write down names at
all, we now use whatever names are provided in commands.diffwsopts and
pass that along to patch.diffopts, along with a couple of custom
options

diff --git a/hgext/record.py b/hgext/record.py
--- a/hgext/record.py
+++ b/hgext/record.py
@@ -515,11 +515,10 @@
                                '(use "hg commit" instead)'))
 
         changes = repo.status(match=match)[:3]
-        diffopts = patch.diffopts(ui, opts=dict(
-            git=True, nodates=True,
-            ignorews=opts.get('ignore_all_space'),
-            ignorewsamount=opts.get('ignore_space_change'),
-            ignoreblanklines=opts.get('ignore_blank_lines')))
+        diffopts = opts.copy()
+        diffopts['nodates'] = True
+        diffopts['git'] = True
+        diffopts = patch.diffopts(ui, opts=diffopts)
         chunks = patch.diff(repo, changes=changes, opts=diffopts)
         fp = cStringIO.StringIO()
         fp.write(''.join(chunks))


More information about the Mercurial-devel mailing list