changeset 22791:a074421fa4e1

addset: use the ascending argument in _iterordered Fix a bug where fastasc and fastdesc were iterator in the same order as self._ascending.
author Pierre-Yves David <pierre-yves.david@fb.com>
date Thu, 09 Oct 2014 05:27:23 -0700
parents c64f9e0beead
children bec4365a0707
files mercurial/revset.py tests/test-tag.t
diffstat 2 files changed, 7 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/revset.py	Wed Oct 08 14:03:07 2014 -0500
+++ b/mercurial/revset.py	Thu Oct 09 05:27:23 2014 -0700
@@ -2553,7 +2553,7 @@
         val2 = None
 
         choice = max
-        if self._ascending:
+        if ascending:
             choice = min
         try:
             # Consume both iterators in an ordered way until one is
--- a/tests/test-tag.t	Wed Oct 08 14:03:07 2014 -0500
+++ b/tests/test-tag.t	Thu Oct 09 05:27:23 2014 -0700
@@ -552,6 +552,12 @@
   $ printf '' > .hgtags
   $ hg commit -m 'delete all tags'
   created new head
+  $ hg log -r 'max(t7::)'
+  changeset:   17:ffe462b50880
+  user:        test
+  date:        Thu Jan 01 00:00:00 1970 +0000
+  summary:     Added tag t7 for changeset fd3a9e394ce3
+  
   $ hg update -r 'max(t7::)'
   2 files updated, 0 files merged, 0 files removed, 0 files unresolved
   $ hg merge -r tip --tool internal:tagmerge