# HG changeset patch # User Siddharth Agarwal # Date 2014-11-19 04:00:37 # Node ID 486a1fe09422f7738ef356bd135376dd1fbefb4b # Parent 60300a4c0ae52829931eaf24e30fac016d5ee9f8 record: don't honor format-changing diffopts (issue4459) record does support the whitespace options, so honor those. In upcoming patches we'll replace all the other uses. diff --git a/hgext/record.py b/hgext/record.py --- a/hgext/record.py +++ b/hgext/record.py @@ -519,10 +519,9 @@ def dorecord(ui, repo, commitfunc, cmdsu '(use "hg commit" instead)')) status = repo.status(match=match) - diffopts = opts.copy() - diffopts['nodates'] = True - diffopts['git'] = True - diffopts = patch.diffopts(ui, opts=diffopts) + diffopts = patch.difffeatureopts(ui, opts=opts, whitespace=True) + diffopts.nodates = True + diffopts.git = True chunks = patch.diff(repo, changes=status, opts=diffopts) fp = cStringIO.StringIO() fp.write(''.join(chunks)) diff --git a/tests/test-record.t b/tests/test-record.t --- a/tests/test-record.t +++ b/tests/test-record.t @@ -559,9 +559,9 @@ Add to beginning, middle, end > echo $i >> plain > done -Record beginning, middle +Record beginning, middle, and test that format-breaking diffopts are ignored - $ hg record -d '14 0' -m middle-only plain < y > y > y