transplant: use set for prune lookup
authorMads Kiilerich <madski@unity3d.com>
Tue, 16 Apr 2013 19:31:59 +0200
changeset 19055 0fc41f88f148
parent 19054 d5f968f7716f
child 19056 ac41bb76c737
transplant: use set for prune lookup
hgext/transplant.py
--- a/hgext/transplant.py	Wed Apr 17 11:47:49 2013 +0200
+++ b/hgext/transplant.py	Tue Apr 16 19:31:59 2013 +0200
@@ -633,8 +633,8 @@
 
         tf = tp.transplantfilter(repo, source, p1)
         if opts.get('prune'):
-            prune = [source.lookup(r)
-                     for r in scmutil.revrange(source, opts.get('prune'))]
+            prune = set(source.lookup(r)
+                        for r in scmutil.revrange(source, opts.get('prune')))
             matchfn = lambda x: tf(x) and x not in prune
         else:
             matchfn = tf