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]) _______________________________________________ Wesnoth-commits mailing list Wesnoth-commits@gna.org https://mail.gna.org/listinfo/wesnoth-commits