convert: svn: defer get_log parsing until after get_log completes.
According to the documentation, it is not safe to perform any other
operation on the ra object until get_log completes.
--- a/hgext/convert/subversion.py Thu Jul 05 12:08:48 2007 -0700
+++ b/hgext/convert/subversion.py Thu Jul 05 12:18:01 2007 -0700
@@ -202,6 +202,12 @@
self.ui.debug('Ignoring %r since it is not under %r\n' % (path, module))
return None
+ received = []
+ # svn.ra.get_log requires no other calls to the ra until it completes,
+ # so we just collect the log entries and parse them afterwards
+ def receivelog(*arg, **args):
+ received.append(arg)
+
self.child_cset = None
def parselogentry(*arg, **args):
orig_paths, revnum, author, date, message, pool = arg
@@ -446,7 +452,9 @@
strict_node_history = False
svn.ra.get_log(self.ra, [self.module], from_revnum, to_revnum, 0,
discover_changed_paths, strict_node_history,
- parselogentry)
+ receivelog)
+ for entry in received:
+ parselogentry(*entry)
self.last_revnum = to_revnum
except SubversionException, (_, num):
if num == svn.core.SVN_ERR_FS_NO_SUCH_REVISION: