comparison hgext/rebase.py @ 34092:8a8e7a94ba07

rebase: do not crash rebasing merge with a parent having hidden successor The added test will crash with previous code. Differential Revision: https://phab.mercurial-scm.org/D640
author Jun Wu <quark@fb.com>
date Wed, 06 Sep 2017 12:40:00 -0700
parents 79ab5369d55a
children 15ec3119d500
comparison
equal deleted inserted replaced
34091:bbdca7e460c0 34092:8a8e7a94ba07
1070 A 1070 A
1071 1071
1072 The new parents of a merge is slightly more complicated. See the comment 1072 The new parents of a merge is slightly more complicated. See the comment
1073 block below. 1073 block below.
1074 """ 1074 """
1075 cl = repo.changelog 1075 # use unfiltered changelog since successorrevs may return filtered nodes
1076 cl = repo.unfiltered().changelog
1076 def isancestor(a, b): 1077 def isancestor(a, b):
1077 # take revision numbers instead of nodes 1078 # take revision numbers instead of nodes
1078 if a == b: 1079 if a == b:
1079 return True 1080 return True
1080 elif a > b: 1081 elif a > b: