diff --git a/mercurial/dagop.py b/mercurial/dagop.py --- a/mercurial/dagop.py +++ b/mercurial/dagop.py @@ -230,7 +230,7 @@ heads = list(heads) try: revs = repo.changelog.reachableroots(minroot, heads, roots, includepath) - except AttributeError: + except (AttributeError, IndexError): revs = _reachablerootspure(repo, minroot, roots, heads, includepath) revs = baseset(revs) revs.sort()