evolve: fix --rev with --list stable
authorPierre-Yves David <pierre-yves.david@octobus.net>
Thu, 25 May 2017 21:14:04 +0200
branchstable
changeset 2479 df9233aa4bac
parent 2478 e3ddb534e5d9
child 2481 d63f383e43b6
evolve: fix --rev with --list This was untested and never worked.
hgext3rd/evolve/__init__.py
tests/test-evolve-list.t
--- a/hgext3rd/evolve/__init__.py	Wed May 24 18:17:01 2017 +0200
+++ b/hgext3rd/evolve/__init__.py	Thu May 25 21:14:04 2017 +0200
@@ -1317,7 +1317,7 @@
 
     revs = repo.revs('+'.join("%s()" % t for t in troublecategories))
     if opts.get('rev'):
-        revs = revs & repo.revs(opts.get('rev'))
+        revs = scmutil.revrange(repo, opts.get('rev'))
 
     fm = ui.formatter('evolvelist', opts)
     for rev in revs:
--- a/tests/test-evolve-list.t	Wed May 24 18:17:01 2017 +0200
+++ b/tests/test-evolve-list.t	Thu May 25 21:14:04 2017 +0200
@@ -72,6 +72,10 @@
   a922b3733e98: b
     divergent: c882616e9d84 (draft) (precursor d2ae7f538514)
   
+  $ hg evolve --list --rev c882616e9d84
+  c882616e9d84: b
+    divergent: a922b3733e98 (draft) (precursor d2ae7f538514)
+  
   $ hg phase -p a922b3733e98
   $ hg evolve --list
   c882616e9d84: b