changeset 33333:8bfd10e4c55a

rebase: remove "if True" The "if True" block was to make the last patch easier to review. This patch removes "if True" and unindents the block.
author Jun Wu <quark@fb.com>
date Fri, 07 Jul 2017 19:03:03 -0700
parents 3b7cb3d17137
children 20f533a92eda
files hgext/rebase.py
diffstat 1 files changed, 10 insertions(+), 11 deletions(-) [+]
line wrap: on
line diff
--- a/hgext/rebase.py	Fri Jul 07 18:51:46 2017 -0700
+++ b/hgext/rebase.py	Fri Jul 07 19:03:03 2017 -0700
@@ -1294,17 +1294,16 @@
     `collapsedas` node."""
     tonode = repo.changelog.node
     mapping = {}
-    if True:
-        for rev, newrev in sorted(state.items()):
-            if newrev >= 0 and newrev != rev:
-                if rev in skipped:
-                    succs = ()
-                elif collapsedas is not None:
-                    succs = (collapsedas,)
-                else:
-                    succs = (tonode(newrev),)
-                mapping[tonode(rev)] = succs
-        scmutil.cleanupnodes(repo, mapping, 'rebase')
+    for rev, newrev in sorted(state.items()):
+        if newrev >= 0 and newrev != rev:
+            if rev in skipped:
+                succs = ()
+            elif collapsedas is not None:
+                succs = (collapsedas,)
+            else:
+                succs = (tonode(newrev),)
+            mapping[tonode(rev)] = succs
+    scmutil.cleanupnodes(repo, mapping, 'rebase')
 
 def pullrebase(orig, ui, repo, *args, **opts):
     'Call rebase after pull if the latter has been invoked with --rebase'