revset: fix negative ancestor spec to not return changectx objects
The order was unstable because of this.
--- a/mercurial/revset.py Mon May 01 05:57:36 2017 +0200
+++ b/mercurial/revset.py Sun Jun 18 12:25:23 2017 +0900
@@ -392,7 +392,7 @@
if len(c) > 1:
raise error.RepoLookupError(
_("revision in set has more than one child"))
- r = c[0]
+ r = c[0].rev()
else:
cs.add(r)
return subset & cs
--- a/tests/test-revset.t Mon May 01 05:57:36 2017 +0200
+++ b/tests/test-revset.t Sun Jun 18 12:25:23 2017 +0900
@@ -3131,9 +3131,11 @@
$ log 'merge()^^^'
1
- $ log '(merge() | 0)~-1'
+ $ hg debugrevspec -s '(merge() | 0)~-1'
+ * set:
+ <baseset+ [1, 7]>
+ 1
7
- 1
$ log 'merge()~-1'
7
$ log 'tip~-1'