rebase: remove "if True"
authorJun Wu <quark@fb.com>
Fri, 07 Jul 2017 19:03:03 -0700
changeset 33333 8bfd10e4c55a
parent 33332 3b7cb3d17137
child 33334 20f533a92eda
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.
hgext/rebase.py
--- 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'