mail[Wesnoth-commits] r29069 - /trunk/data/tools/wesnoth/wmltools.py


Others Months | Index by Date | Thread Index
>>   [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Header


Content

Posted by esr on August 29, 2008 - 03:47:
Author: esr
Date: Fri Aug 29 03:47:09 2008
New Revision: 29069

URL: http://svn.gna.org/viewcvs/wesnoth?rev=29069&view=rev
Log:
Ignore .git as well as .svn directories when assembling forests.

Modified:
    trunk/data/tools/wesnoth/wmltools.py

Modified: trunk/data/tools/wesnoth/wmltools.py
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/data/tools/wesnoth/wmltools.py?rev=29069&r1=29068&r2=29069&view=diff
==============================================================================
--- trunk/data/tools/wesnoth/wmltools.py (original)
+++ trunk/data/tools/wesnoth/wmltools.py Fri Aug 29 03:47:09 2008
@@ -66,7 +66,7 @@
 class Forest:
     "Return an iterable directory forest object."
     def __init__(self, dirpath, exclude=None):
-        "Get the names of all files under dirpath, ignoring .svn 
directories."
+        "Get the names of all files under dirpath, ignoring .svn and .git 
directories."
         self.forest = []
         self.dirpath = dirpath
         for dir in dirpath:
@@ -77,7 +77,7 @@
                          None)
             self.forest.append(subtree)
         for i in range(len(self.forest)):
-            self.forest[i] = filter(lambda x: ".svn" not in x, 
self.forest[i])
+            self.forest[i] = filter(lambda x: ".svn" not in x and ".git" not 
in x, self.forest[i])
             self.forest[i] = filter(lambda x: not os.path.isdir(x), 
self.forest[i])
             if exclude:
                 self.forest[i] = filter(lambda x: not re.search(exclude, x), 
self.forest[i])




Related Messages


Powered by MHonArc, Updated Fri Aug 29 04:22:49 2008