changeset 661:d0692ce98ea6

svnmeta: strip all repeated slashes from subdir
author Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
date Tue, 27 Jul 2010 15:26:31 +0200
parents 67b54cb38843
children a8d5eec1326b a8101fc49663
files hgsubversion/svnmeta.py
diffstat 1 files changed, 1 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/hgsubversion/svnmeta.py
+++ b/hgsubversion/svnmeta.py
@@ -55,9 +55,7 @@ class SVNMeta(object):
                                                  'usebranchnames', True)
 
         # FIXME: test that this hasn't changed! defer & compare?
-        self.subdir = subdir
-        if self.subdir and self.subdir[0] == '/':
-            self.subdir = self.subdir[1:]
+        self.subdir = subdir and '/'.join(p for p in subdir.split('/') if p) or ''
         self.branches = {}
         if os.path.exists(self.branch_info_file):
             f = open(self.branch_info_file)