Mercurial > hg-stable
changeset 20301:4988e4246537
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
author | Jordi Gutiérrez Hermoso <jordigh@octave.org> |
---|---|
date | Thu, 16 Jan 2014 15:05:03 -0500 |
parents | 0076643077a3 |
children | 654dd8284ead |
files | hgext/record.py |
diffstat | 1 files changed, 4 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- 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))