Patchwork D2711: rebase: collapse two nested if-conditions

login
register
mail settings
Submitter phabricator
Date March 7, 2018, 9:16 p.m.
Message ID <9ba25149a25a939dc6198d9931b283e3@localhost.localdomain>
Download mbox | patch
Permalink /patch/29105/
State Not Applicable
Headers show

Comments

phabricator - March 7, 2018, 9:16 p.m.
This revision was automatically updated to reflect the committed changes.
Closed by commit rHGa835bf3fe40a: rebase: collapse two nested if-conditions (authored by martinvonz, committed by ).

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D2711?vs=6699&id=6706

REVISION DETAIL
  https://phab.mercurial-scm.org/D2711

AFFECTED FILES
  hgext/rebase.py

CHANGE DETAILS




To: martinvonz, #hg-reviewers, indygreg
Cc: mercurial-devel

Patch

diff --git a/hgext/rebase.py b/hgext/rebase.py
--- a/hgext/rebase.py
+++ b/hgext/rebase.py
@@ -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)