Changeset - 24e24661c0eb
[Not reviewed]
beta
0 1 0
Mads Kiilerich - 13 years ago 2013-04-02 19:01:25
madski@unity3d.com
util: remove attempt of renaming get_filesystem_repos while remaining backward compatible
1 file changed with 1 insertions and 4 deletions:
0 comments (0 inline, 0 general)
rhodecode/lib/utils.py
Show inline comments
 
@@ -168,13 +168,13 @@ def action_logger(user, action, repo, ip
 
            sa.commit()
 
    except Exception:
 
        log.error(traceback.format_exc())
 
        raise
 

	
 

	
 
def get_repos(path, recursive=False, skip_removed_repos=True):
 
def get_filesystem_repos(path, recursive=False, skip_removed_repos=True):
 
    """
 
    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
 
    """
 
@@ -211,15 +211,12 @@ def get_repos(path, recursive=False, ski
 
                if os.path.isdir(rec_path):
 
                    for inner_scm in _get_repos(rec_path):
 
                        yield inner_scm
 

	
 
    return _get_repos(path)
 

	
 
#alias for backward compat
 
get_filesystem_repos = get_repos
 

	
 

	
 
def is_valid_repo(repo_name, base_path, scm=None):
 
    """
 
    Returns True if given path is a valid repository False otherwise.
 
    If scm param is given also compare if given scm is the same as expected
 
    from scm parameter
0 comments (0 inline, 0 general)