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

login
register
mail settings
Submitter Jordi Gutiérrez Hermoso
Date Jan. 16, 2014, 8:07 p.m.
Message ID <ed0006bde38c0ae2e0f3.1389902824@Iris>
Download mbox | patch
Permalink /patch/3359/
State Accepted
Commit 4988e42465370f1458b2ddd9bf2760f3f881b3ce
Headers show

Comments

Jordi Gutiérrez Hermoso - Jan. 16, 2014, 8:07 p.m.
# HG changeset patch
# User Jordi Gutiérrez Hermoso <jordigh@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
Matt Mackall - Jan. 18, 2014, 4:16 a.m.
On Thu, 2014-01-16 at 15:07 -0500, Jordi Gutiérrez Hermoso wrote:
> # HG changeset patch
> # User Jordi Gutiérrez Hermoso <jordigh@octave.org>
> # Date 1389902703 18000
> #      Thu Jan 16 15:05:03 2014 -0500
> # Node ID ed0006bde38c0ae2e0f34b72bc7c7e30402c0e1f
> # Parent  95a53ad012b6d5a640e91140a7da1a5f3f3df552
> record: re-enable whitespace-ignoring options

These are queued for default, thanks.

Patch

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))