##// END OF EJS Templates
convert: svn: parse log entries as they arrive instead of deferring it
Brendan Cully -
r4793:9f20f4b2 default
parent child Browse files
Show More
@@ -209,19 +209,18 b' class convert_svn(converter_source):'
209 self.ui.debug('Ignoring %r since it is not under %r\n' % (path, module))
209 self.ui.debug('Ignoring %r since it is not under %r\n' % (path, module))
210 return None
210 return None
211
211
212 received = []
212 def parselogentry(*arg, **args):
213 def rcvr(*arg, **args):
214 orig_paths, revnum, author, date, message, pool = arg
213 orig_paths, revnum, author, date, message, pool = arg
215 new_orig_paths = svn_paths(orig_paths)
214 orig_paths = svn_paths(orig_paths)
216 rcvr2(new_orig_paths, revnum, author, date, message, pool)
217
215
218 def rcvr2(orig_paths, revnum, author, date, message, pool, better_paths = None):
216 if self.is_blacklisted(revnum):
219 if not self.is_blacklisted(revnum):
217 self.ui.note('skipping blacklisted revision %d\n' % revnum)
220 received.append((orig_paths, revnum, author, date, message))
218 return
221
219
222 def after_received(orig_paths, revnum, author, date, message):
223 self.ui.note("parsing revision %d\n" % revnum)
220 self.ui.note("parsing revision %d\n" % revnum)
221
224 if orig_paths is None:
222 if orig_paths is None:
223 self.ui.debug('revision %d has no entries\n' % revnum)
225 return
224 return
226
225
227 if revnum in self.modulemap:
226 if revnum in self.modulemap:
@@ -437,10 +436,9 b' class convert_svn(converter_source):'
437 try:
436 try:
438 discover_changed_paths = True
437 discover_changed_paths = True
439 strict_node_history = False
438 strict_node_history = False
440 svn.ra.get_log(self.ra, [self.module], from_revnum, to_revnum,
439 svn.ra.get_log(self.ra, [self.module], from_revnum, to_revnum, 0,
441 0, discover_changed_paths, strict_node_history, rcvr)
440 discover_changed_paths, strict_node_history,
442 for args in received:
441 parselogentry)
443 after_received(*args)
444 self.last_revnum = to_revnum
442 self.last_revnum = to_revnum
445 except SubversionException, (_, num):
443 except SubversionException, (_, num):
446 if num == svn.core.SVN_ERR_FS_NO_SUCH_REVISION:
444 if num == svn.core.SVN_ERR_FS_NO_SUCH_REVISION:
General Comments 0
You need to be logged in to leave comments. Login now