# HG changeset patch # User Marcin Kuzminski # Date 1325639550 -7200 # Node ID 9130fa3c6d61c2d70a9d2d1ad61bb408d26ba797 # Parent 9451a569aee58af1a245ccdd77725eb38fa9e070 fixes issue #331 RC mangles repository names if the a repository group contains the "full path" to the repositories diff -r 9451a569aee5 -r 9130fa3c6d61 rhodecode/lib/utils.py --- 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