record: re-enable whitespace-ignoring options
authorJordi Gutiérrez Hermoso <jordigh@octave.org>
Thu, 16 Jan 2014 15:05:03 -0500
changeset 20301 4988e4246537
parent 20300 0076643077a3
child 20302 654dd8284ead
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
hgext/record.py
--- a/hgext/record.py	Thu Jan 16 14:57:52 2014 -0500
+++ b/hgext/record.py	Thu Jan 16 15:05:03 2014 -0500
@@ -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))