# HG changeset patch # User Siddharth Agarwal # Date 1425675551 28800 # Fri Mar 06 12:59:11 2015 -0800 # Branch fbonly # Node ID f4870afed530e8018c789b9f7fe27bacbcbad4a2 # Parent 6d243c7c31af39445804b37a6ee6881aaf3892f5 crecord: update to latest default diff --git a/crecord/.hg_archival.txt b/crecord/.hg_archival.txt --- a/crecord/.hg_archival.txt +++ b/crecord/.hg_archival.txt @@ -1,5 +1,6 @@ repo: 582ec143d317c23ea35c4791d59e31761b79909d -node: e1567c94274f075b578cf26cd80a5e148762485c +node: 71f7fa103401a75988f25a5086736cb355686a11 branch: default latesttag: null -latesttagdistance: 104 +latesttagdistance: 106 +changessincelatesttag: 107 diff --git a/crecord/crecord_core.py b/crecord/crecord_core.py --- a/crecord/crecord_core.py +++ b/crecord/crecord_core.py @@ -51,10 +51,14 @@ # 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))