Changeset - 00cac9e13622
[Not reviewed]
stable
0 1 0
Mads Kiilerich - 9 years ago 2017-01-22 01:16:52
madski@unity3d.com
Grafted from: 347f38529080
cleanup: make sure the kind of repos found by scanning also are ignored for cleanup - don't recurse into non-bare git or svn repos
1 file changed with 2 insertions and 0 deletions:
0 comments (0 inline, 0 general)
kallithea/lib/paster_commands/cleanup.py
Show inline comments
 
@@ -86,12 +86,14 @@ class Command(BasePasterCommand):
 
        repos_location = Ui.get_repos_location()
 
        to_remove = []
 
        for dn_, dirs, f in os.walk(safe_str(repos_location)):
 
            alldirs = list(dirs)
 
            del dirs[:]
 
            if ('.hg' in alldirs or
 
                '.git' in alldirs or
 
                '.svn' in alldirs or
 
                'objects' in alldirs and ('refs' in alldirs or 'packed-refs' in f)):
 
                continue
 
            for loc in alldirs:
 
                if REMOVED_REPO_PAT.match(loc):
 
                    to_remove.append([os.path.join(dn_, loc),
 
                                      self._extract_date(loc)])
0 comments (0 inline, 0 general)