crecord: update to latest default

This commit is contained in:
Siddharth Agarwal 2015-03-06 12:59:11 -08:00
parent 34eb1268ff
commit 54b6316cdb
2 changed files with 11 additions and 6 deletions

View File

@ -1,5 +1,6 @@
repo: 582ec143d317c23ea35c4791d59e31761b79909d
node: e1567c94274f075b578cf26cd80a5e148762485c
node: 71f7fa103401a75988f25a5086736cb355686a11
branch: default
latesttag: null
latesttagdistance: 104
latesttagdistance: 106
changessincelatesttag: 107

View File

@ -51,10 +51,14 @@ def dorecord(ui, repo, commitfunc, *pats, **opts):
# 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))