Mercurial > hg-stable
changeset 6538:05dff77bfbd9
convert: fix subpaths detection in svn source
author | Patrick Mezard <pmezard@gmail.com> |
---|---|
date | Mon, 14 Apr 2008 22:31:33 +0200 |
parents | b6a24c273c30 |
children | 7814d7bb77bc |
files | hgext/convert/subversion.py |
diffstat | 1 files changed, 4 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- 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...