evolve: small refactoring of the uncommit function
authorLaurent Charignon <lcharignon@fb.com>
Wed, 27 May 2015 10:23:37 -0700
changeset 1351 69e5de3e6129
parent 1350 d46a967f257e
child 1352 a143037892d6
evolve: small refactoring of the uncommit function We introduce a new variable to simplify the implementation of hg uncommit --interactive.
hgext/evolve.py
--- a/hgext/evolve.py	Wed May 13 09:46:34 2015 -0700
+++ b/hgext/evolve.py	Wed May 27 10:23:37 2015 -0700
@@ -2131,8 +2131,8 @@
         # Recommit the filtered changeset
         tr = repo.transaction('uncommit')
         newid = None
-        if (pats or opts.get('include') or opts.get('exclude')
-            or opts.get('all')):
+        includeorexclude = opts.get('include') or opts.get('exclude')
+        if (pats or includeorexclude or opts.get('all')):
             match = scmutil.match(old, pats, opts)
             newid = _commitfiltered(repo, old, match, target=rev)
         if newid is None: