changeset 1351:69e5de3e6129

evolve: small refactoring of the uncommit function We introduce a new variable to simplify the implementation of hg uncommit --interactive.
author Laurent Charignon <lcharignon@fb.com>
date Wed, 27 May 2015 10:23:37 -0700
parents d46a967f257e
children a143037892d6
files hgext/evolve.py
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- 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: