diff --git a/rhodecode/lib/vcs/backends/__init__.py b/rhodecode/lib/vcs/backends/__init__.py --- a/rhodecode/lib/vcs/backends/__init__.py +++ b/rhodecode/lib/vcs/backends/__init__.py @@ -30,7 +30,7 @@ def get_repo(path=None, alias=None, crea if path is None: path = abspath(os.path.curdir) try: - scm, path = get_scm(path, search_recursively=True) + scm, path = get_scm(path, search_up=True) path = abspath(path) alias = scm except VCSError: diff --git a/rhodecode/lib/vcs/utils/helpers.py b/rhodecode/lib/vcs/utils/helpers.py --- a/rhodecode/lib/vcs/utils/helpers.py +++ b/rhodecode/lib/vcs/utils/helpers.py @@ -15,14 +15,14 @@ from rhodecode.lib.vcs.utils.paths impor ALIASES = ['hg', 'git'] -def get_scm(path, search_recursively=False, explicit_alias=None): +def get_scm(path, search_up=False, explicit_alias=None): """ Returns one of alias from ``ALIASES`` (in order of precedence same as shortcuts given in ``ALIASES``) and top working dir path for the given argument. If no scm-specific directory is found or more than one scm is found at that directory, ``VCSError`` is raised. - :param search_recursively: if set to ``True``, this function would try to + :param search_up: if set to ``True``, this function would try to move up to parent directory every time no scm is recognized for the currently checked path. Default: ``False``. :param explicit_alias: can be one of available backend aliases, when given @@ -37,7 +37,7 @@ def get_scm(path, search_recursively=Fal return [(scm, path) for scm in get_scms_for_path(path)] found_scms = get_scms(path) - while not found_scms and search_recursively: + while not found_scms and search_up: newpath = abspath(path, '..') if newpath == path: break