Skip .git instead of .svn directories

This commit is contained in:
Nick Hall 2013-11-09 00:10:46 +00:00
parent 57daf4f269
commit 9050f96dad
2 changed files with 6 additions and 6 deletions

View File

@ -672,8 +672,8 @@ class ImagesNotIncluded(BatchOp):
self.set_total(len(self.dir_list))
for directory in self.dir_list:
for (dirpath, dirnames, filenames) in os.walk(directory):
if ".svn" in dirnames:
dirnames.remove('.svn') # don't visit .svn directories
if ".git" in dirnames:
dirnames.remove('.git') # don't visit .git directories
for filename in filenames:
media_full_path = os.path.join(dirpath, filename)
if media_full_path not in self.path_list:

View File

@ -53,7 +53,7 @@ def make_parser():
def getTestSuites(loc=gramps_root):
# in a developer's checkout, it is worth filtering-out .svn
# in a developer's checkout, it is worth filtering-out .git
# and we only need to look inside test subdirs
# (this might change)
# this is not so performance critical that we can't afford
@ -65,9 +65,9 @@ def getTestSuites(loc=gramps_root):
test_dirname = "test"
test_suffix = "_test.py"
def test_mod(p,ds):
""" test for path p=test dir; removes a dir '.svn' in ds """
if ".svn" in ds:
ds.remove(".svn")
""" test for path p=test dir; removes a dir '.git' in ds """
if ".git" in ds:
ds.remove(".git")
return os.path.basename(p) == test_dirname
def match_mod(fs):
""" test for any test modules; deletes all non-tests """