Changeset - 280ac97cb37f
[Not reviewed]
beta
0 2 0
Mads Kiilerich - 13 years ago 2012-12-12 18:11:33
madski@unity3d.com
Grafted from: 31d406b02288
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.
2 files changed with 4 insertions and 1 deletions:
0 comments (0 inline, 0 general)
rhodecode/lib/vcs/utils/helpers.py
Show inline comments
 
@@ -75,12 +75,15 @@ def get_scms_for_path(path):
 
    result = []
 
    for key in ALIASES:
 
        dirname = os.path.join(path, '.' + key)
 
        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:
 
            get_backend(key)(path)
 
            result.append(key)
 
            continue
rhodecode/model/scm.py
Show inline comments
 
@@ -222,13 +222,13 @@ class ScmModel(BaseModel):
 

	
 
        baseui = make_ui('db')
 
        repos = {}
 

	
 
        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 /
 
            # since this is internal storage separator for rhodecode
 
            name = Repository.url_sep().join(name.split(os.sep))
 

	
0 comments (0 inline, 0 general)