# HG changeset patch # User Mads Kiilerich # Date 1355332293 -3600 # Node ID 280ac97cb37fd0391e02f5650d318d67c3f7a602 # Parent 4cc9bb83ecb4334488f9ab6bfabe186d041f4fd6 don't recurse into '.hg' of removed repositories Walking through the content of a '.hg' that has been renamed to 'rm__.hg' on startup can take a lot of time. diff -r 4cc9bb83ecb4 -r 280ac97cb37f rhodecode/lib/vcs/utils/helpers.py --- a/rhodecode/lib/vcs/utils/helpers.py Thu Dec 13 03:34:19 2012 +0100 +++ b/rhodecode/lib/vcs/utils/helpers.py Wed Dec 12 18:11:33 2012 +0100 @@ -78,6 +78,9 @@ if os.path.isdir(dirname): result.append(key) continue + dirname = os.path.join(path, 'rm__.' + key) + if os.path.isdir(dirname): + return [None] # We still need to check if it's not bare repository as # bare repos don't have working directories try: diff -r 4cc9bb83ecb4 -r 280ac97cb37f rhodecode/model/scm.py --- a/rhodecode/model/scm.py Thu Dec 13 03:34:19 2012 +0100 +++ b/rhodecode/model/scm.py Wed Dec 12 18:11:33 2012 +0100 @@ -225,7 +225,7 @@ for name, path in get_filesystem_repos(repos_path, recursive=True): # skip removed repos - if REMOVED_REPO_PAT.match(name): + if REMOVED_REPO_PAT.match(name) or path[0] is None: continue # name need to be decomposed and put back together using the /