Mercurial > public > mercurial-scm > hg
diff mercurial/revset.py @ 25689:1cce81121472
revset: fix a crash in parents() when 'wdir()' is in the set
The crash was "TypeError: expected string or Unicode object, NoneType found"
down in revlog.parentrevs(). This fixes heads() too (which is where I found
it.)
author | Matt Harbison <matt_harbison@yahoo.com> |
---|---|
date | Mon, 29 Jun 2015 10:34:56 -0400 |
parents | 328739ea70c3 |
children | 70a2082f855a |
line wrap: on
line diff
--- a/mercurial/revset.py Sun Jun 28 13:38:03 2015 -0400 +++ b/mercurial/revset.py Mon Jun 29 10:34:56 2015 -0400 @@ -1468,7 +1468,10 @@ ps = set() cl = repo.changelog for r in getset(repo, fullreposet(repo), x): - ps.update(cl.parentrevs(r)) + if r is None: + ps.update(p.rev() for p in repo[r].parents()) + else: + ps.update(cl.parentrevs(r)) ps -= set([node.nullrev]) return subset & ps