changeset 8883:ede2247e61aa

convert/svn: remove a useless recode() call in deletion path
author Patrick Mezard <pmezard@gmail.com>
date Sun, 21 Jun 2009 23:04:02 +0200
parents 48a04961b0dd
children 8b603c7c808e
files hgext/convert/subversion.py
diffstat 1 files changed, 7 insertions(+), 13 deletions(-) [+]
line wrap: on
line diff
--- a/hgext/convert/subversion.py	Sun Jun 21 23:04:02 2009 +0200
+++ b/hgext/convert/subversion.py	Sun Jun 21 23:04:02 2009 +0200
@@ -700,20 +700,14 @@
                         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))