Mercurial > hg
changeset 4811:f7c8222920ee
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.
author | Brendan Cully <brendan@kublai.com> |
---|---|
date | Thu, 05 Jul 2007 12:18:01 -0700 |
parents | c2d529f288a1 |
children | a5209b0487e0 |
files | hgext/convert/subversion.py |
diffstat | 1 files changed, 9 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- 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: