Patchwork D7664: rebase: make rebase not crash if p1 == p2 != nullid

login
register
mail settings
Submitter phabricator
Date Dec. 16, 2019, 6:30 a.m.
Message ID <d19d0316af79611be73fad59708d249c@localhost.localdomain>
Download mbox | patch
Permalink /patch/43852/
State Not Applicable
Headers show

Comments

phabricator - Dec. 16, 2019, 6:30 a.m.
Closed by commit rHGc6feee1e4d5b: rebase: make rebase not crash if p1 == p2 != nullid (authored by spectral).
This revision was automatically updated to reflect the committed changes.

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D7664?vs=18720&id=18743

CHANGES SINCE LAST ACTION
  https://phab.mercurial-scm.org/D7664/new/

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

AFFECTED FILES
  hgext/rebase.py

CHANGE DETAILS




To: spectral, martinvonz, #hg-reviewers, pulkit
Cc: mercurial-devel

Patch

diff --git a/hgext/rebase.py b/hgext/rebase.py
--- a/hgext/rebase.py
+++ b/hgext/rebase.py
@@ -1791,7 +1791,7 @@ 
     # But our merge base candidates (D and E in above case) could still be
     # better than the default (ancestor(F, Z) == null). Therefore still
     # pick one (so choose p1 above).
-    if sum(1 for b in bases if b != nullrev) > 1:
+    if sum(1 for b in set(bases) if b != nullrev) > 1:
         unwanted = [None, None]  # unwanted[i]: unwanted revs if choose bases[i]
         for i, base in enumerate(bases):
             if base == nullrev: