# HG changeset patch # User Marcin Kuzminski # Date 2011-04-06 18:16:02 # Node ID e4784e2b03f7d07d4f99965a1257ecca749a1a8b # Parent 208b15340dfa5a1edff5a823e445191ba77c3296 strip os.sep instead of '/' in repo scanner diff --git a/rhodecode/lib/utils.py b/rhodecode/lib/utils.py --- a/rhodecode/lib/utils.py +++ b/rhodecode/lib/utils.py @@ -152,12 +152,15 @@ def get_repos(path, recursive=False): from vcs.utils.helpers import get_scm from vcs.exceptions import VCSError - if path.endswith('/'): - #add ending slash for better results + if path.endswith(os.sep): + #remove ending slash for better results path = path[:-1] def _get_repos(p): + if not os.access(p, os.W_OK): + return for dirpath in os.listdir(p): + print dirpath if os.path.isfile(os.path.join(p, dirpath)): continue cur_path = os.path.join(p, dirpath) @@ -616,7 +619,6 @@ def create_test_env(repos_test_path, con tar.extractall(jn(TESTS_TMP_PATH, HG_REPO)) tar.close() - #============================================================================== # PASTER COMMANDS #==============================================================================