Mercurial > hg
diff hgext/convert/subversion.py @ 13651:9777df929035 stable
convert/svn: fix _iterfiles() output in root dir case (issue2647)
When converting directory additions/replacement with project directory set to
root, _iterfiles() sometimes returned paths starting with a slash making
following svn calls to fail.
I could not reproduce the issue with hand-crafted repositories.
Report and first analysis by Clinton Chau <clinton@clearcanvas.ca>
author | Patrick Mezard <pmezard@gmail.com> |
---|---|
date | Mon, 14 Mar 2011 21:35:31 +0100 |
parents | 3178aca36b0f |
children | 30a0e3519f69 |
line wrap: on
line diff
--- a/hgext/convert/subversion.py Tue Jan 04 00:24:34 2011 +1100 +++ b/hgext/convert/subversion.py Mon Mar 14 21:35:31 2011 +0100 @@ -866,7 +866,9 @@ pool = Pool() rpath = '/'.join([self.baseurl, urllib.quote(path)]).strip('/') entries = svn.client.ls(rpath, optrev(revnum), True, self.ctx, pool) - return ((path + '/' + p) for p, e in entries.iteritems() + if path: + path += '/' + return ((path + p) for p, e in entries.iteritems() if e.kind == svn.core.svn_node_file) def getrelpath(self, path, module=None):