Show More
@@ -188,6 +188,7 b' class svn_source(converter_source):' | |||
|
188 | 188 | # Module is either empty or a repository path starting with |
|
189 | 189 | # a slash and not ending with a slash. |
|
190 | 190 | self.module = self.url[len(self.base):] |
|
191 | self.prevmodule = None | |
|
191 | 192 | self.rootmodule = self.module |
|
192 | 193 | self.commits = {} |
|
193 | 194 | self.paths = {} |
@@ -478,9 +479,9 b' class svn_source(converter_source):' | |||
|
478 | 479 | if not stop: |
|
479 | 480 | stop = svn.ra.get_latest_revnum(self.ra) |
|
480 | 481 | try: |
|
481 | self.reparent('') | |
|
482 | prevmodule = self.reparent('') | |
|
482 | 483 | dirent = svn.ra.stat(self.ra, path.strip('/'), stop) |
|
483 |
self.reparent( |
|
|
484 | self.reparent(prevmodule) | |
|
484 | 485 | except SubversionException: |
|
485 | 486 | dirent = None |
|
486 | 487 | if not dirent: |
@@ -532,9 +533,17 b' class svn_source(converter_source):' | |||
|
532 | 533 | return svn_rev in self.blacklist |
|
533 | 534 | |
|
534 | 535 | def reparent(self, module): |
|
535 | svn_url = self.base + module | |
|
536 | self.ui.debug("reparent to %s\n" % svn_url.encode(self.encoding)) | |
|
537 | svn.ra.reparent(self.ra, svn_url.encode(self.encoding)) | |
|
536 | """Reparent the svn transport and return the previous parent.""" | |
|
537 | if self.prevmodule == module: | |
|
538 | return module | |
|
539 | svn_url = (self.base + module).encode(self.encoding) | |
|
540 | prevmodule = self.prevmodule | |
|
541 | if prevmodule is None: | |
|
542 | prevmodule = '' | |
|
543 | self.ui.debug("reparent to %s\n" % svn_url) | |
|
544 | svn.ra.reparent(self.ra, svn_url) | |
|
545 | self.prevmodule = module | |
|
546 | return prevmodule | |
|
538 | 547 | |
|
539 | 548 | def expandpaths(self, rev, paths, parents): |
|
540 | 549 | entries = [] |
@@ -604,9 +613,9 b' class svn_source(converter_source):' | |||
|
604 | 613 | |
|
605 | 614 | # We can avoid the reparent calls if the module has not changed |
|
606 | 615 | # but it probably does not worth the pain. |
|
607 | self.reparent('') | |
|
616 | prevmodule = self.reparent('') | |
|
608 | 617 | fromkind = svn.ra.check_path(self.ra, entrypath.strip('/'), fromrev) |
|
609 |
self.reparent( |
|
|
618 | self.reparent(prevmodule) | |
|
610 | 619 | |
|
611 | 620 | if fromkind == svn.core.svn_node_file: # a deleted file |
|
612 | 621 | entries.append(self.recode(entry)) |
General Comments 0
You need to be logged in to leave comments.
Login now