Changeset - 891be8b07407
[Not reviewed]
beta
0 1 0
Mads Kiilerich - 13 years ago 2013-03-26 23:15:22
madski@unity3d.com
warn when repo path is skipped because it is read-only
1 file changed with 1 insertions and 0 deletions:
0 comments (0 inline, 0 general)
rhodecode/lib/utils.py
Show inline comments
 
@@ -176,24 +176,25 @@ def get_repos(path, recursive=False, ski
 
    Scans given path for repos and return (name,(type,path)) tuple
 

	
 
    :param path: path to scan for repositories
 
    :param recursive: recursive search and return names with subdirs in front
 
    """
 

	
 
    # remove ending slash for better results
 
    path = path.rstrip(os.sep)
 
    log.debug('now scanning in %s location recursive:%s...' % (path, recursive))
 

	
 
    def _get_repos(p):
 
        if not os.access(p, os.W_OK):
 
            log.warn('ignoring repo path without write access: %s', p)
 
            return
 
        for dirpath in os.listdir(p):
 
            if os.path.isfile(os.path.join(p, dirpath)):
 
                continue
 
            cur_path = os.path.join(p, dirpath)
 

	
 
            # skip removed repos
 
            if skip_removed_repos and REMOVED_REPO_PAT.match(dirpath):
 
                continue
 

	
 
            #skip .<somethin> dirs
 
            if dirpath.startswith('.'):
0 comments (0 inline, 0 general)