Mercurial > hg
changeset 23956:b1e026c25552 stable
revset: fix ancestors(null) to include null revision (issue4512)
Since 13c0327eeb6f, null parent is explicitly excluded. So, there is no reason
to have nullrev in the initial seen set.
author | Yuya Nishihara <yuya@tcha.org> |
---|---|
date | Sun, 25 Jan 2015 20:20:27 +0900 |
parents | 8a29897d42d2 |
children | 0c4419faacbc |
files | mercurial/revset.py tests/test-log.t tests/test-revset.t |
diffstat | 3 files changed, 19 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/revset.py Sat Jan 10 13:14:00 2015 +0900 +++ b/mercurial/revset.py Sun Jan 25 20:20:27 2015 +0900 @@ -31,7 +31,7 @@ revsnode = revqueue.popleft() heapq.heappush(h, -revsnode) - seen = set([node.nullrev]) + seen = set() while h: current = -heapq.heappop(h) if current not in seen:
--- a/tests/test-log.t Sat Jan 10 13:14:00 2015 +0900 +++ b/tests/test-log.t Sun Jan 25 20:20:27 2015 +0900 @@ -635,6 +635,20 @@ +log -f -r null + + $ hg log -f -r null + changeset: -1:000000000000 + user: + date: Thu Jan 01 00:00:00 1970 +0000 + + $ hg log -f -r null -G + o changeset: -1:000000000000 + user: + date: Thu Jan 01 00:00:00 1970 +0000 + + + log -r . with two parents $ hg up -C 3