Submitter | Pierre-Yves David |
---|---|
Date | Sept. 23, 2014, 10:47 p.m. |
Message ID | <d2ac8f8e413275de8d61.1411512476@marginatus.alto.octopoid.net> |
Download | mbox | patch |
Permalink | /patch/5942/ |
State | Accepted |
Headers | show |
Comments
Patch
diff --git a/mercurial/revset.py b/mercurial/revset.py --- a/mercurial/revset.py +++ b/mercurial/revset.py @@ -1196,11 +1196,13 @@ def p1(repo, subset, x): """``p1([set])`` First parent of changesets in set, or the working directory. """ if x is None: p = repo[x].p1().rev() - return subset.filter(lambda r: r == p) + if p >= 0: + return subset & baseset([p]) + return baseset([]) ps = set() cl = repo.changelog for r in getset(repo, spanset(repo), x): ps.add(cl.parentrevs(r)[0])