Mercurial > kallithea
changeset 1821:6b318706f712
fixes issue #331 RC mangles repository names if the a repository group contains the "full path" to the repositories
author | Marcin Kuzminski <marcin@python-works.com> |
---|---|
date | Wed, 04 Jan 2012 03:12:30 +0200 |
parents | 99c70e97ce48 |
children | 9e53425ca824 |
files | rhodecode/lib/utils.py |
diffstat | 1 files changed, 3 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- 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