Show More
@@ -130,6 +130,16 b' class convert_svn(converter_source):' | |||
|
130 | 130 | def revnum(self, rev): |
|
131 | 131 | return int(rev.split('@')[-1]) |
|
132 | 132 | |
|
133 | def revsplit(self, rev): | |
|
134 | url, revnum = rev.encode(self.encoding).split('@', 1) | |
|
135 | revnum = int(revnum) | |
|
136 | parts = url.split('/', 1) | |
|
137 | uuid = parts.pop(0)[4:] | |
|
138 | mod = '/' | |
|
139 | if parts: | |
|
140 | mod += parts[0] | |
|
141 | return uuid, mod, revnum | |
|
142 | ||
|
133 | 143 | def latest(self, path, stop=0): |
|
134 | 144 | 'find the latest revision affecting path, up to stop' |
|
135 | 145 | if not stop: |
@@ -170,7 +180,7 b' class convert_svn(converter_source):' | |||
|
170 | 180 | self.ui.debug("reparent to %s\n" % svn_url.encode(self.encoding)) |
|
171 | 181 | svn.ra.reparent(self.ra, svn_url.encode(self.encoding)) |
|
172 | 182 | |
|
173 |
def _fetch_revisions(self, from_revnum = 0, to_revnum = 347, |
|
|
183 | def _fetch_revisions(self, from_revnum = 0, to_revnum = 347, module=None): | |
|
174 | 184 | # batching is broken for branches |
|
175 | 185 | to_revnum = 0 |
|
176 | 186 | if not hasattr(self, 'child_rev'): |
@@ -433,10 +443,12 b' class convert_svn(converter_source):' | |||
|
433 | 443 | self.child_cset = cset |
|
434 | 444 | self.child_rev = rev |
|
435 | 445 | |
|
446 | if module is None: | |
|
447 | module = self.module | |
|
436 | 448 | try: |
|
437 | 449 | discover_changed_paths = True |
|
438 | 450 | strict_node_history = False |
|
439 |
svn.ra.get_log(self.ra, [ |
|
|
451 | svn.ra.get_log(self.ra, [module], from_revnum, to_revnum, 0, | |
|
440 | 452 | discover_changed_paths, strict_node_history, |
|
441 | 453 | parselogentry) |
|
442 | 454 | self.last_revnum = to_revnum |
@@ -497,9 +509,10 b' class convert_svn(converter_source):' | |||
|
497 | 509 | |
|
498 | 510 | def getcommit(self, rev): |
|
499 | 511 | if rev not in self.commits: |
|
500 |
revnum = self.rev |
|
|
512 | uuid, module, revnum = self.revsplit(rev) | |
|
501 | 513 | minrev = revnum - LOG_BATCH_SIZE > 0 and revnum - LOG_BATCH_SIZE or 0 |
|
502 |
self._fetch_revisions(from_revnum=revnum, to_revnum=minrev |
|
|
514 | self._fetch_revisions(from_revnum=revnum, to_revnum=minrev, | |
|
515 | module=module) | |
|
503 | 516 | return self.commits[rev] |
|
504 | 517 | |
|
505 | 518 | def gettags(self): |
General Comments 0
You need to be logged in to leave comments.
Login now