Selamlar,

Pisi'deki index kodunu biraz daha hızlandırmak şöyle bir yama yaptım:

Index: index.py
===================================================================
--- index.py    (revision 37006)
+++ index.py    (working copy)
@@ -92,6 +92,8 @@
         deltas = {}
 
         for root, dirs, files in os.walk(repo_uri):
+            dirs[:] = [d for d in dirs if d not in ['.svn', '.git', '.hg']]
+
             for fn in files:
 
                 if fn.endswith(ctx.const.delta_package_suffix):

Fakat burada okunabilirliği azalttığı ve tavsiye edilmediği için [:] hack'ini 
kullanmak istemiyorum, zira kullanmayınca da dirs değişkeni değiştirilmiyor. 
Tek tek dirs.remove(x) ile silmek de hoşuma gitmiyor. 

Başka çözüm bilen var mı?

-- 
Gökçen Eraslan

Attachment: signature.asc
Description: This is a digitally signed message part.

_______________________________________________
Gelistirici mailing list
Gelistirici@pardus.org.tr
http://liste.pardus.org.tr/mailman/listinfo/gelistirici

Reply via email to