Mercurial > public > mercurial-scm > hg-stable
diff mercurial/discovery.py @ 32095:c52728b383b4 stable
discovery: prevent crash caused by prune marker having no parent data
If a marker has no parent information, parents field is set to None, which
caused TypeError. I think this shouldn't normally happen, but somehow
I have such marker in my repo.
author | Yuya Nishihara <yuya@tcha.org> |
---|---|
date | Wed, 19 Apr 2017 23:10:05 +0900 |
parents | c6cb21ddf74a |
children | bd872f64a8ba |
line wrap: on
line diff
--- a/mercurial/discovery.py Mon May 01 15:40:41 2017 +0200 +++ b/mercurial/discovery.py Wed Apr 19 23:10:05 2017 +0900 @@ -511,7 +511,7 @@ for m in markers: nexts = m[1] # successors if not nexts: # this is a prune marker - nexts = m[5] # parents + nexts = m[5] or () # parents for n in nexts: if n not in seen: seen.add(n)