# HG changeset patch # User Marcin Kuzminski # Date 1325639550 -7200 # Node ID 6b318706f712c8e8b0f25043cbaa6dfdd25b4d14 # Parent 99c70e97ce480b8633dcbf6f69fe1b2fe2114d63 fixes issue #331 RC mangles repository names if the a repository group contains the "full path" to the repositories diff -r 99c70e97ce48 -r 6b318706f712 rhodecode/lib/utils.py --- a/rhodecode/lib/utils.py Wed Dec 21 02:47:39 2011 +0200 +++ b/rhodecode/lib/utils.py Wed Jan 04 03:12:30 2012 +0200 @@ -154,9 +154,8 @@ from vcs.utils.helpers import get_scm from vcs.exceptions import VCSError - if path.endswith(os.sep): - #remove ending slash for better results - path = path[:-1] + # remove ending slash for better results + path = path.rstrip('/') def _get_repos(p): if not os.access(p, os.W_OK): @@ -167,7 +166,7 @@ cur_path = os.path.join(p, dirpath) try: scm_info = get_scm(cur_path) - yield scm_info[1].split(path)[-1].lstrip(os.sep), scm_info + yield scm_info[1].split(path, 1)[-1].lstrip(os.sep), scm_info except VCSError: if not recursive: continue