Show More
@@ -22,11 +22,10 b' class converter_source(object):' | |||
|
22 | 22 | self.rev = rev |
|
23 | 23 | |
|
24 | 24 | self.encoding = 'utf-8' |
|
25 | self.revmap = {} | |
|
26 | 25 | |
|
27 | 26 | def setrevmap(self, revmap): |
|
28 | 27 | """set the map of already-converted revisions""" |
|
29 | self.revmap = revmap | |
|
28 | pass | |
|
30 | 29 | |
|
31 | 30 | def getheads(self): |
|
32 | 31 | """Return a list of this repository's heads""" |
@@ -87,6 +87,8 b' class convert_svn(converter_source):' | |||
|
87 | 87 | raise NoRepo(msg) |
|
88 | 88 | |
|
89 | 89 | self.encoding = locale.getpreferredencoding() |
|
90 | self.lastrevs = {} | |
|
91 | ||
|
90 | 92 | latest = None |
|
91 | 93 | if rev: |
|
92 | 94 | try: |
@@ -455,13 +457,21 b' class convert_svn(converter_source):' | |||
|
455 | 457 | receivelog) |
|
456 | 458 | for entry in received: |
|
457 | 459 | parselogentry(*entry) |
|
458 | self.last_revnum = to_revnum | |
|
459 | 460 | except SubversionException, (_, num): |
|
460 | 461 | if num == svn.core.SVN_ERR_FS_NO_SUCH_REVISION: |
|
461 | 462 | raise NoSuchRevision(branch=self, |
|
462 | 463 | revision="Revision number %d" % to_revnum) |
|
463 | 464 | raise |
|
464 | 465 | |
|
466 | def setrevmap(self, revmap): | |
|
467 | lastrevs = {} | |
|
468 | for revid in revmap.keys(): | |
|
469 | uuid, module, revnum = self.revsplit(revid) | |
|
470 | lastrevnum = lastrevs.setdefault(module, revnum) | |
|
471 | if revnum > lastrevnum: | |
|
472 | lastrevs[module] = revnum | |
|
473 | self.lastrevs = lastrevs | |
|
474 | ||
|
465 | 475 | def getheads(self): |
|
466 | 476 | # detect standard /branches, /tags, /trunk layout |
|
467 | 477 | optrev = svn.core.svn_opt_revision_t() |
@@ -532,7 +542,8 b' class convert_svn(converter_source):' | |||
|
532 | 542 | uuid, module, revnum = self.revsplit(rev) |
|
533 | 543 | self.module = module |
|
534 | 544 | self.reparent(module) |
|
535 | self._fetch_revisions(from_revnum=revnum, to_revnum=0) | |
|
545 | stop = self.lastrevs.get(module, 0) | |
|
546 | self._fetch_revisions(from_revnum=revnum, to_revnum=stop) | |
|
536 | 547 | return self.commits[rev] |
|
537 | 548 | |
|
538 | 549 | def gettags(self): |
General Comments 0
You need to be logged in to leave comments.
Login now