# HG changeset patch # User Patrick Mezard # Date 2009-06-21 21:04:02 # Node ID ede2247e61aab691f7404dce8872aed799cf13ed # Parent 48a04961b0dd1929362d9cc07633142436aff457 convert/svn: remove a useless recode() call in deletion path diff --git a/hgext/convert/subversion.py b/hgext/convert/subversion.py --- a/hgext/convert/subversion.py +++ b/hgext/convert/subversion.py @@ -700,20 +700,14 @@ class svn_source(converter_source): nroot = path.strip('/') children = self._find_children(oroot, fromrev) children = [s.replace(oroot,nroot) for s in children] - # Mark all [files, not directories] as deleted. + for child in children: - # Can we move a child directory and its - # parent in the same commit? (probably can). Could - # cause problems if instead of revnum -1, - # we have to look in (copyfrom_path, revnum - 1) - entrypath = self.getrelpath("/" + child, module=old_module) - if entrypath: - entry = self.recode(entrypath.decode(self.encoding)) - if entry in copies: - # deleted file within a copy - del copies[entry] - else: - entries.append(entry) + entrypath = self.getrelpath("/" + child, old_module) + if not entrypath: + continue + if entrypath in copies: + del copies[entrypath] + entries.append(entrypath) else: self.ui.debug(_('unknown path in revision %d: %s\n') % \ (revnum, path))