Show More
@@ -386,7 +386,7 b' class svn_source(converter_source):' | |||||
386 | self.modecache = {} |
|
386 | self.modecache = {} | |
387 | (paths, parents) = self.paths[rev] |
|
387 | (paths, parents) = self.paths[rev] | |
388 | if parents: |
|
388 | if parents: | |
389 | files, copies = self.expandpaths(rev, paths, parents) |
|
389 | files, self.removed, copies = self.expandpaths(rev, paths, parents) | |
390 | else: |
|
390 | else: | |
391 | # Perform a full checkout on roots |
|
391 | # Perform a full checkout on roots | |
392 | uuid, module, revnum = self.revsplit(rev) |
|
392 | uuid, module, revnum = self.revsplit(rev) | |
@@ -395,6 +395,7 b' class svn_source(converter_source):' | |||||
395 | files = [n for n, e in entries.iteritems() |
|
395 | files = [n for n, e in entries.iteritems() | |
396 | if e.kind == svn.core.svn_node_file] |
|
396 | if e.kind == svn.core.svn_node_file] | |
397 | copies = {} |
|
397 | copies = {} | |
|
398 | self.removed = set() | |||
398 |
|
399 | |||
399 | files.sort() |
|
400 | files.sort() | |
400 | files = zip(files, [rev] * len(files)) |
|
401 | files = zip(files, [rev] * len(files)) | |
@@ -610,7 +611,7 b' class svn_source(converter_source):' | |||||
610 | return prevmodule |
|
611 | return prevmodule | |
611 |
|
612 | |||
612 | def expandpaths(self, rev, paths, parents): |
|
613 | def expandpaths(self, rev, paths, parents): | |
613 | entries = [] |
|
614 | changed, removed = set(), set() | |
614 | # Map of entrypath, revision for finding source of deleted |
|
615 | # Map of entrypath, revision for finding source of deleted | |
615 | # revisions. |
|
616 | # revisions. | |
616 | copyfrom = {} |
|
617 | copyfrom = {} | |
@@ -626,7 +627,7 b' class svn_source(converter_source):' | |||||
626 |
|
627 | |||
627 | kind = self._checkpath(entrypath, revnum) |
|
628 | kind = self._checkpath(entrypath, revnum) | |
628 | if kind == svn.core.svn_node_file: |
|
629 | if kind == svn.core.svn_node_file: | |
629 |
|
|
630 | changed.add(self.recode(entrypath)) | |
630 | if not ent.copyfrom_path or not parents: |
|
631 | if not ent.copyfrom_path or not parents: | |
631 | continue |
|
632 | continue | |
632 | # Copy sources not in parent revisions cannot be |
|
633 | # Copy sources not in parent revisions cannot be | |
@@ -654,7 +655,7 b' class svn_source(converter_source):' | |||||
654 | self.reparent(prevmodule) |
|
655 | self.reparent(prevmodule) | |
655 |
|
656 | |||
656 | if fromkind == svn.core.svn_node_file: |
|
657 | if fromkind == svn.core.svn_node_file: | |
657 |
|
|
658 | removed.add(self.recode(entrypath)) | |
658 | elif fromkind == svn.core.svn_node_dir: |
|
659 | elif fromkind == svn.core.svn_node_dir: | |
659 | oroot = parentpath.strip('/') |
|
660 | oroot = parentpath.strip('/') | |
660 | nroot = path.strip('/') |
|
661 | nroot = path.strip('/') | |
@@ -663,7 +664,7 b' class svn_source(converter_source):' | |||||
663 | for child in children: |
|
664 | for child in children: | |
664 | childpath = self.getrelpath("/" + child, pmodule) |
|
665 | childpath = self.getrelpath("/" + child, pmodule) | |
665 | if childpath: |
|
666 | if childpath: | |
666 |
|
|
667 | removed.add(self.recode(childpath)) | |
667 | else: |
|
668 | else: | |
668 | self.ui.debug('unknown path in revision %d: %s\n' % \ |
|
669 | self.ui.debug('unknown path in revision %d: %s\n' % \ | |
669 | (revnum, path)) |
|
670 | (revnum, path)) | |
@@ -684,7 +685,7 b' class svn_source(converter_source):' | |||||
684 | # Need to filter out directories here... |
|
685 | # Need to filter out directories here... | |
685 | kind = self._checkpath(entrypath, revnum) |
|
686 | kind = self._checkpath(entrypath, revnum) | |
686 | if kind != svn.core.svn_node_dir: |
|
687 | if kind != svn.core.svn_node_dir: | |
687 |
|
|
688 | changed.add(self.recode(entrypath)) | |
688 |
|
689 | |||
689 | # Handle directory copies |
|
690 | # Handle directory copies | |
690 | if not ent.copyfrom_path or not parents: |
|
691 | if not ent.copyfrom_path or not parents: | |
@@ -710,7 +711,8 b' class svn_source(converter_source):' | |||||
710 | copytopath = self.getrelpath(copytopath) |
|
711 | copytopath = self.getrelpath(copytopath) | |
711 | copies[self.recode(copytopath)] = self.recode(entrypath) |
|
712 | copies[self.recode(copytopath)] = self.recode(entrypath) | |
712 |
|
713 | |||
713 | return (list(set(entries)), copies) |
|
714 | changed.update(removed) | |
|
715 | return (list(changed), removed, copies) | |||
714 |
|
716 | |||
715 | def _fetch_revisions(self, from_revnum, to_revnum): |
|
717 | def _fetch_revisions(self, from_revnum, to_revnum): | |
716 | if from_revnum < to_revnum: |
|
718 | if from_revnum < to_revnum: | |
@@ -839,6 +841,8 b' class svn_source(converter_source):' | |||||
839 |
|
841 | |||
840 | def _getfile(self, file, rev): |
|
842 | def _getfile(self, file, rev): | |
841 | # TODO: ra.get_file transmits the whole file instead of diffs. |
|
843 | # TODO: ra.get_file transmits the whole file instead of diffs. | |
|
844 | if file in self.removed: | |||
|
845 | raise IOError() | |||
842 | mode = '' |
|
846 | mode = '' | |
843 | try: |
|
847 | try: | |
844 | new_module, revnum = self.revsplit(rev)[1:] |
|
848 | new_module, revnum = self.revsplit(rev)[1:] |
General Comments 0
You need to be logged in to leave comments.
Login now