rebase: collapse two nested if-conditions
authorMartin von Zweigbergk <martinvonz@google.com>
Tue, 06 Mar 2018 09:39:24 -0800
changeset 36774 a835bf3fe40a
parent 36773 1004fd71810f
child 36775 6dab3bdb1f00
rebase: collapse two nested if-conditions Also change the order since it feel to me like it's more about --collapse than it is about --keep. Differential Revision: https://phab.mercurial-scm.org/D2711
hgext/rebase.py
--- a/hgext/rebase.py	Thu Mar 01 20:12:25 2018 -0800
+++ b/hgext/rebase.py	Tue Mar 06 09:39:24 2018 -0800
@@ -605,9 +605,8 @@
             hg.updaterepo(repo, newwd, False)
 
         collapsedas = None
-        if not self.keepf:
-            if self.collapsef:
-                collapsedas = newnode
+        if self.collapsef and not self.keepf:
+            collapsedas = newnode
         clearrebased(ui, repo, self.destmap, self.state, self.skipped,
                      collapsedas, self.keepf, fm=fm)