diff hgext/convert/subversion.py @ 5246:585471802a01

convert: svn: check for branch movement in any log entry, not just the first. This fixes, for example, r4151 D /branches A /project/branches (from /branches:4150) A /project/tags (from /tags:4150) A /project/trunk (from /trunk:4150) D /tags D /trunk
author Brendan Cully <brendan@kublai.com>
date Mon, 27 Aug 2007 11:56:53 -0700
parents 0751c25ea0c0
children 694eb9ccb54d
line wrap: on
line diff
--- a/hgext/convert/subversion.py
+++ b/hgext/convert/subversion.py
@@ -539,12 +539,9 @@ class convert_svn(converter_source):
                 return
 
             parents = []
-            orig_paths = orig_paths.items()
-            orig_paths.sort()
-
             # check whether this revision is the start of a branch
-            path, ent = orig_paths and orig_paths[0] or (None, None)
-            if ent and path == self.module:
+            if self.module in orig_paths:
+                ent = orig_paths[self.module]
                 if ent.copyfrom_path:
                     # ent.copyfrom_rev may not be the actual last revision
                     prev = self.latest(ent.copyfrom_path, ent.copyfrom_rev)
@@ -557,6 +554,8 @@ class convert_svn(converter_source):
 
             self.modulemap[revnum] = self.module # track backwards in time
 
+            orig_paths = orig_paths.items()
+            orig_paths.sort()
             paths = []
             # filter out unrelated paths
             for path, ent in orig_paths: