--- a/hgext3rd/evolve/cmdrewrite.py Sun Sep 17 19:59:25 2017 +0200
+++ b/hgext3rd/evolve/cmdrewrite.py Mon Sep 04 15:54:39 2017 +0200
@@ -287,19 +287,20 @@
# Recommit the filtered changeset
tr = repo.transaction('uncommit')
updatebookmarks = rewriteutil.bookmarksupdater(repo, old.node(), tr)
- newid = None
- includeorexclude = opts.get('include') or opts.get('exclude')
- if (pats or includeorexclude or opts.get('all')):
- match = scmutil.match(old, pats, opts)
- if not (opts['message'] or opts['logfile']):
- opts['message'] = old.description()
- message = cmdutil.logmessage(ui, opts)
- newid = _commitfiltered(repo, old, match, target=rev,
- message=message, user=opts.get('user'),
- date=opts.get('date'))
- if newid is None:
- raise error.Abort(_('nothing to uncommit'),
- hint=_("use --all to uncommit all files"))
+ if True:
+ newid = None
+ includeorexclude = opts.get('include') or opts.get('exclude')
+ if (pats or includeorexclude or opts.get('all')):
+ match = scmutil.match(old, pats, opts)
+ if not (opts['message'] or opts['logfile']):
+ opts['message'] = old.description()
+ message = cmdutil.logmessage(ui, opts)
+ newid = _commitfiltered(repo, old, match, target=rev,
+ message=message, user=opts.get('user'),
+ date=opts.get('date'))
+ if newid is None:
+ raise error.Abort(_('nothing to uncommit'),
+ hint=_("use --all to uncommit all files"))
# Move local changes on filtered changeset
obsolete.createmarkers(repo, [(old, (repo[newid],))])
phases.retractboundary(repo, tr, oldphase, [newid])