diff hgext/rebase.py @ 38183:69d1cafe75f2 stable

rebase: avoid RevlogError when computing obsoletenotrebased (issue5907) The key to reproducing this seems to be missing an obsolete node that is not an ancestor of the destination.
author Matt Harbison <matt_harbison@yahoo.com>
date Tue, 05 Jun 2018 23:49:54 -0400
parents 92213f6745ed
children ead71b15efd5
line wrap: on
line diff
--- a/hgext/rebase.py	Sat Jun 02 13:44:44 2018 -0400
+++ b/hgext/rebase.py	Tue Jun 05 23:49:54 2018 -0400
@@ -1815,7 +1815,8 @@
                 # If 'srcrev' has a successor in rebase set but none in
                 # destination (which would be catched above), we shall skip it
                 # and its descendants to avoid divergence.
-                if any(nodemap[s] in destmap for s in successors):
+                if any(nodemap[s] in destmap for s in successors
+                       if s in nodemap):
                     obsoletewithoutsuccessorindestination.add(srcrev)
 
     return (