Mercurial > kallithea
changeset 1820:9130fa3c6d61 beta
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 | 9451a569aee5 |
children | 363f5dce1a95 |
files | rhodecode/lib/utils.py |
diffstat | 1 files changed, 3 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/rhodecode/lib/utils.py Thu Dec 29 07:36:53 2011 +0200 +++ b/rhodecode/lib/utils.py Wed Jan 04 03:12:30 2012 +0200 @@ -156,9 +156,8 @@ :param recursive: recursive search and return names with subdirs in front """ - 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): @@ -169,7 +168,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