hgkw/kwexpander.py
branchupdatehook
changeset 23 9fdf507badfc
parent 21 536c1797202d
child 24 1083d250d1b2
--- a/hgkw/kwexpander.py	Sat Dec 16 15:55:11 2006 +0100
+++ b/hgkw/kwexpander.py	Sun Dec 17 10:16:16 2006 +0100
@@ -24,14 +24,15 @@
 
     # only check files that have hgkwencode assigned as encode filter
     files = []
+    # python2.4: files = set()
     for pat, cmd in repo.ui.configitems('encode'):
         if cmd.endswith(kwencodefilter):
             mf = mercurial.util.matcher(repo.root, '', [pat], [], [])[1]
             for candidate in candidates:
-                if mf(candidate):
-                    # check again that there really are no duplicates
-                    # if candidate not in files ???
+                if mf(candidate) and candidate not in files:
                     files.append(candidate)
+                # python2.4:
+                # if mf(candidate): files.add(candidate)
 
     if not files: # nothing to do
         return False