Mercurial > hg-stable
changeset 23413:0c432696dae3 stable
revset: fix first and last for generatorset (issue4465)
The code was just plain wrong.
author | Pierre-Yves David <pierre-yves.david@fb.com> |
---|---|
date | Mon, 01 Dec 2014 05:18:12 -0800 |
parents | 94092019e839 |
children | 759202b64f49 |
files | mercurial/revset.py tests/test-issue619.t |
diffstat | 2 files changed, 8 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/revset.py Fri Nov 28 02:57:33 2014 +0100 +++ b/mercurial/revset.py Mon Dec 01 05:18:12 2014 -0800 @@ -2804,7 +2804,7 @@ pass return self.first() if self: - return it.next() + return it().next() return None def last(self): @@ -2818,7 +2818,7 @@ pass return self.first() if self: - return it.next() + return it().next() return None def spanset(repo, start=None, end=None):
--- a/tests/test-issue619.t Fri Nov 28 02:57:33 2014 +0100 +++ b/tests/test-issue619.t Mon Dec 01 05:18:12 2014 -0800 @@ -28,3 +28,9 @@ abort: merging with a working directory ancestor has no effect [255] +Even with strange revset (issue4465) + + $ hg merge ::. + abort: merging with a working directory ancestor has no effect + [255] +