changeset 5250: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 0d28d4e5fe1f
children 90919a6f5c8f 0b0caffcf175 be4835ad9a85
files hgext/convert/subversion.py
diffstat 1 files changed, 4 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/hgext/convert/subversion.py	Mon Aug 27 14:55:33 2007 -0300
+++ b/hgext/convert/subversion.py	Mon Aug 27 11:56:53 2007 -0700
@@ -539,12 +539,9 @@
                 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 @@
 
             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: