hgext/evolve.py
branchstable
changeset 685 7398f9729821
parent 684 19a1a8f93c07
child 687 6c1fbef2952e
--- a/hgext/evolve.py	Mon Feb 04 18:07:09 2013 +0100
+++ b/hgext/evolve.py	Mon Feb 04 18:42:50 2013 +0100
@@ -1257,10 +1257,11 @@
     succs = opts['new'] + opts['succ']
     wlock = lock = None
     wlock = repo.wlock()
+    sortedrevs = lambda specs: sorted(set(scmutil.revrange(repo, specs)))
     try:
         lock = repo.lock()
         precs = []
-        for p in sorted(set(scmutil.revrange(repo, revs))):
+        for p in sortedrevs(revs):
             cp = repo[p]
             precs.append(cp)
         if not precs:
@@ -1268,8 +1269,7 @@
         else:
             sucs = ()
 
-        sucs = tuple(repo[n]
-                     for n in sorted(set(scmutil.revrange(repo, succs))))
+        sucs = tuple(repo[n] for n in sortedrevs(succs))
         if len(sucs) > 1 and len(precs) > 1:
             msg = "Can't use multiple successors for multiple precursors"
             raise util.Abort(msg)