# HG changeset patch # User Patrick Mezard # Date 1208205093 -7200 # Node ID 05dff77bfbd9c253eef29855df9500e22c723589 # Parent b6a24c273c308b5586712f384f9e65605402be71 convert: fix subpaths detection in svn source diff -r b6a24c273c30 -r 05dff77bfbd9 hgext/convert/subversion.py --- a/hgext/convert/subversion.py Mon Apr 14 22:31:33 2008 +0200 +++ b/hgext/convert/subversion.py Mon Apr 14 22:31:33 2008 +0200 @@ -185,6 +185,8 @@ self.ra = self.transport.ra self.ctx = self.transport.client self.base = svn.ra.get_repos_root(self.ra) + # Module is either empty or a repository path starting with + # a slash and not ending with a slash. self.module = self.url[len(self.base):] self.rootmodule = self.module self.commits = {} @@ -543,10 +545,10 @@ # "/CMFPlone/branches/Plone-2_0-branch/tests/PloneTestCase.py" # that is to say "tests/PloneTestCase.py" if path.startswith(module): - relative = path[len(module):] + relative = path.rstrip('/')[len(module):] if relative.startswith('/'): return relative[1:] - else: + elif relative == '': return relative # The path is outside our tracked tree...