uncommit: pre-indent a block in if-True for the next patch
authorPierre-Yves David <pierre-yves.david@octobus.net>
Mon, 04 Sep 2017 15:54:39 +0200
changeset 2940 89b205e5271e
parent 2939 7759d040d48d
child 2941 b0458b9e1b47
uncommit: pre-indent a block in if-True for the next patch
hgext3rd/evolve/cmdrewrite.py
--- 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])