Mercurial > public > mercurial-scm > hg
comparison 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 |
comparison
equal
deleted
inserted
replaced
25688:24cda1dd45ff | 25689:1cce81121472 |
---|---|
1466 ps = set(p.rev() for p in repo[x].parents()) | 1466 ps = set(p.rev() for p in repo[x].parents()) |
1467 else: | 1467 else: |
1468 ps = set() | 1468 ps = set() |
1469 cl = repo.changelog | 1469 cl = repo.changelog |
1470 for r in getset(repo, fullreposet(repo), x): | 1470 for r in getset(repo, fullreposet(repo), x): |
1471 ps.update(cl.parentrevs(r)) | 1471 if r is None: |
1472 ps.update(p.rev() for p in repo[r].parents()) | |
1473 else: | |
1474 ps.update(cl.parentrevs(r)) | |
1472 ps -= set([node.nullrev]) | 1475 ps -= set([node.nullrev]) |
1473 return subset & ps | 1476 return subset & ps |
1474 | 1477 |
1475 def _phase(repo, subset, target): | 1478 def _phase(repo, subset, target): |
1476 """helper to select all rev in phase <target>""" | 1479 """helper to select all rev in phase <target>""" |