Patchwork D2711: rebase: collapse two nested if-conditions

login
register
mail settings
Submitter phabricator
Date March 7, 2018, 6:24 p.m.
Message ID <differential-rev-PHID-DREV-4zrxxl7htk5xnzvctpyo-req@phab.mercurial-scm.org>
Download mbox | patch
Permalink /patch/29098/
State Superseded
Headers show

Comments

phabricator - March 7, 2018, 6:24 p.m.
martinvonz created this revision.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.

REVISION SUMMARY
  Also change the order since it feel to me like it's more about
  --collapse than it is about --keep.

REPOSITORY
  rHG Mercurial

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

AFFECTED FILES
  hgext/rebase.py

CHANGE DETAILS




To: martinvonz, #hg-reviewers
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)