convert: fix invalid svn.ra.check_path() call (issue 771)
authorPatrick Mezard <pmezard@gmail.com>
Sat, 19 Jan 2008 14:39:30 +0100
changeset 5880 b32a0596b2d7
parent 5879 cacfeee38870
child 5881 4bb64294e5b4
child 5896 ff7fb4f0db53
convert: fix invalid svn.ra.check_path() call (issue 771) The svn transport must be reparented to repository root before using check_path() with full entrypaths.
hgext/convert/subversion.py
--- a/hgext/convert/subversion.py	Fri Jan 18 23:56:51 2008 +0100
+++ b/hgext/convert/subversion.py	Sat Jan 19 14:39:30 2008 +0100
@@ -439,7 +439,12 @@
                     fromrev = froment.copyfrom_rev
                     self.ui.debug("Info: %s %s %s %s\n" % (frompath, froment, ent, entrypath))
 
-                fromkind = svn.ra.check_path(self.ra, entrypath, fromrev)
+                # We can avoid the reparent calls if the module has not changed
+                # but it probably does not worth the pain.
+                self.reparent('')
+                fromkind = svn.ra.check_path(self.ra, entrypath.strip('/'), fromrev)
+                self.reparent(self.module)
+                
                 if fromkind == svn.core.svn_node_file:   # a deleted file
                     entries.append(self.recode(entry))
                 elif fromkind == svn.core.svn_node_dir: