# HG changeset patch # User Patrick Mezard # Date 2011-03-14 20:35:31 # Node ID 9777df929035ed35cda8c98aac846b7d138b7645 # Parent 994510694b1d12f121dce2e5a585abaf13514259 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 diff --git a/hgext/convert/subversion.py b/hgext/convert/subversion.py --- a/hgext/convert/subversion.py +++ b/hgext/convert/subversion.py @@ -866,7 +866,9 @@ class svn_source(converter_source): 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):