changeset 14212:8f551386abf0

transplant: remove unneeded loop over repo in revset
author Idan Kamara <idankk86@gmail.com>
date Fri, 06 May 2011 16:00:48 +0300
parents 68ade2a6b30a
children 30273f0c776b
files hgext/transplant.py
diffstat 1 files changed, 1 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/hgext/transplant.py	Fri May 06 16:07:35 2011 +0300
+++ b/hgext/transplant.py	Fri May 06 16:00:48 2011 +0300
@@ -602,11 +602,7 @@
       s = revset.getset(repo, subset, x)
     else:
       s = subset
-    cs = set()
-    for r in xrange(0, len(repo)):
-      if repo[r].extra().get('transplant_source'):
-        cs.add(r)
-    return [r for r in s if r in cs]
+    return [r for r in s if repo[r].extra().get('transplant_source')]
 
 def kwtransplanted(repo, ctx, **args):
     """:transplanted: String. The node identifier of the transplanted