evolve: don't use python sets on top of revset for evolve --rev
authorLaurent Charignon <lcharignon@fb.com>
Wed, 13 May 2015 09:03:11 -0700
changeset 1336 10d2ef1f7ed4
parent 1334 b8f880d4171d
child 1338 77cbf9121e8a
evolve: don't use python sets on top of revset for evolve --rev In --rev we were wrapping the revsets in python sets. This is wrong as the use python sets force the wrapper revision set to be computed earlier than it has to and have no order guarantee. Removing this wrapping changes a test because the ordering does not appear to be the same but the end result is the same.
hgext/evolve.py
tests/test-evolve.t
--- a/hgext/evolve.py	Tue May 12 13:52:29 2015 -0700
+++ b/hgext/evolve.py	Wed May 13 09:03:11 2015 -0700
@@ -1303,8 +1303,8 @@
         return graftcmd(ui, repo, old_obsolete=True, **{'continue': True})
     # Rev specified on the commands line
     if revopt:
-        revs = set(repo.revs(revopt))
-        troubled = set(repo.revs('troubled()'))
+        revs = repo.revs(revopt)
+        troubled = repo.revs('troubled()')
         _revs = revs & troubled
         if not _revs:
             ui.write_err("No troubled changes in the specified revset")
--- a/tests/test-evolve.t	Tue May 12 13:52:29 2015 -0700
+++ b/tests/test-evolve.t	Wed May 13 09:03:11 2015 -0700
@@ -1002,15 +1002,15 @@
   o  0	: a0 - test
   
   $ hg evolve --rev "14::"
-  move:[16] add gh
-  atop:[18] a3
   move:[15] add gg
   atop:[18] a3
-  working directory is now at 10ffdd7e3cc9
+  move:[16] add gh
+  atop:[18] a3
+  working directory is now at db3d894869b0
   $ hg glog
-  @  20	: add gg - test
+  @  20	: add gh - test
   |
-  | o  19	: add gh - test
+  | o  19	: add gg - test
   |/
   o  18	: a3 - test
   |