convert: svn: disable batched fetch - get the whole log immediately
authorBrendan Cully <brendan@kublai.com>
Mon, 02 Jul 2007 07:54:51 -0700
changeset 4775 739fd34f5d66
parent 4774 d305852a5ec8
child 4776 03844af5ebcd
convert: svn: disable batched fetch - get the whole log immediately
hgext/convert/subversion.py
--- a/hgext/convert/subversion.py	Mon Jul 02 07:28:54 2007 -0700
+++ b/hgext/convert/subversion.py	Mon Jul 02 07:54:51 2007 -0700
@@ -160,11 +160,21 @@
         svn.ra.reparent(self.ra, svn_url.encode(self.encoding))
 
     def _fetch_revisions(self, from_revnum = 0, to_revnum = 347, pb=None):
+        # batching is broken for branches
+        to_revnum = 0
         if not hasattr(self, 'child_rev'):
             self.child_rev = from_revnum
             self.child_cset = self.commits.get(self.child_rev)
         else:
             self.commits[self.child_rev] = self.child_cset
+            # batching broken
+            return
+            # if the branch was created in the middle of the last batch,
+            # svn log will complain that the path doesn't exist in this batch
+            # so we roll the parser back to the last revision where this branch appeared
+            revnum = self.revnum(self.child_rev)
+            if revnum > from_revnum:
+                from_revnum = revnum
 
         self.ui.debug('Fetching revisions %d to %d\n' % (from_revnum, to_revnum))