Show More
@@ -130,6 +130,16 b' class convert_svn(converter_source):' | |||||
130 | def revnum(self, rev): |
|
130 | def revnum(self, rev): | |
131 | return int(rev.split('@')[-1]) |
|
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 | def latest(self, path, stop=0): |
|
143 | def latest(self, path, stop=0): | |
134 | 'find the latest revision affecting path, up to stop' |
|
144 | 'find the latest revision affecting path, up to stop' | |
135 | if not stop: |
|
145 | if not stop: | |
@@ -170,7 +180,7 b' class convert_svn(converter_source):' | |||||
170 | self.ui.debug("reparent to %s\n" % svn_url.encode(self.encoding)) |
|
180 | self.ui.debug("reparent to %s\n" % svn_url.encode(self.encoding)) | |
171 | svn.ra.reparent(self.ra, svn_url.encode(self.encoding)) |
|
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 | # batching is broken for branches |
|
184 | # batching is broken for branches | |
175 | to_revnum = 0 |
|
185 | to_revnum = 0 | |
176 | if not hasattr(self, 'child_rev'): |
|
186 | if not hasattr(self, 'child_rev'): | |
@@ -433,10 +443,12 b' class convert_svn(converter_source):' | |||||
433 | self.child_cset = cset |
|
443 | self.child_cset = cset | |
434 | self.child_rev = rev |
|
444 | self.child_rev = rev | |
435 |
|
445 | |||
|
446 | if module is None: | |||
|
447 | module = self.module | |||
436 | try: |
|
448 | try: | |
437 | discover_changed_paths = True |
|
449 | discover_changed_paths = True | |
438 | strict_node_history = False |
|
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 | discover_changed_paths, strict_node_history, |
|
452 | discover_changed_paths, strict_node_history, | |
441 | parselogentry) |
|
453 | parselogentry) | |
442 | self.last_revnum = to_revnum |
|
454 | self.last_revnum = to_revnum | |
@@ -497,9 +509,10 b' class convert_svn(converter_source):' | |||||
497 |
|
509 | |||
498 | def getcommit(self, rev): |
|
510 | def getcommit(self, rev): | |
499 | if rev not in self.commits: |
|
511 | if rev not in self.commits: | |
500 |
revnum = self.rev |
|
512 | uuid, module, revnum = self.revsplit(rev) | |
501 | minrev = revnum - LOG_BATCH_SIZE > 0 and revnum - LOG_BATCH_SIZE or 0 |
|
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 | return self.commits[rev] |
|
516 | return self.commits[rev] | |
504 |
|
517 | |||
505 | def gettags(self): |
|
518 | def gettags(self): |
General Comments 0
You need to be logged in to leave comments.
Login now