@@ 1,5 1,6 @@
repo: 582ec143d317c23ea35c4791d59e31761b79909d
-node: e1567c94274f075b578cf26cd80a5e148762485c
+node: 71f7fa103401a75988f25a5086736cb355686a11
branch: default
latesttag: null
-latesttagdistance: 104
+latesttagdistance: 106
+changessincelatesttag: 107
@@ 51,10 51,14 @@ def dorecord(ui, repo, commitfunc, *pats
# we take only the first 3 of these
changes = repo.status(match=match)[:3]
modified, added, removed = changes
- diffopts = opts.copy()
- diffopts['nodates'] = True
- diffopts['git'] = True
- diffopts = patch.diffopts(ui, opts=diffopts)
+ try:
+ # Mercurial >= 3.3 allow disabling format-changing diffopts
+ diffopts = patch.difffeatureopts(ui, opts=opts, section='crecord',
+ whitespace=True)
+ except AttributeError:
+ diffopts = patch.diffopts(ui, opts=opts, section='crecord')
+ diffopts.nodates = True
+ diffopts.git = True
chunks = patch.diff(repo, changes=changes, opts=diffopts)
fp = cStringIO.StringIO()
fp.write(''.join(chunks))