Show More
@@ -649,10 +649,10 b' class svn_source(converter_source):' | |||
|
649 | 649 | elif fromkind == svn.core.svn_node_dir: |
|
650 | 650 | oroot = parentpath.strip('/') |
|
651 | 651 | nroot = path.strip('/') |
|
652 |
children = self._ |
|
|
653 |
|
|
|
654 |
|
|
|
655 | childpath = self.getrelpath("/" + child, pmodule) | |
|
652 | children = self._listfiles(oroot, prevnum) | |
|
653 | for childpath in children: | |
|
654 | childpath = childpath.replace(oroot, nroot) | |
|
655 | childpath = self.getrelpath("/" + childpath, pmodule) | |
|
656 | 656 | if childpath: |
|
657 | 657 | removed.add(self.recode(childpath)) |
|
658 | 658 | else: |
@@ -671,18 +671,11 b' class svn_source(converter_source):' | |||
|
671 | 671 | if pkind == svn.core.svn_node_file: |
|
672 | 672 | removed.add(self.recode(entrypath)) |
|
673 | 673 | |
|
674 |
children = sorted(self._ |
|
|
675 | for child in children: | |
|
676 | # Can we move a child directory and its | |
|
677 | # parent in the same commit? (probably can). Could | |
|
678 | # cause problems if instead of revnum -1, | |
|
679 | # we have to look in (copyfrom_path, revnum - 1) | |
|
680 | entrypath = self.getrelpath("/" + child) | |
|
681 | if entrypath: | |
|
682 | # Need to filter out directories here... | |
|
683 | kind = self._checkpath(entrypath, revnum) | |
|
684 | if kind != svn.core.svn_node_dir: | |
|
685 | changed.add(self.recode(entrypath)) | |
|
674 | children = sorted(self._listfiles(path, revnum)) | |
|
675 | for childpath in children: | |
|
676 | childpath = self.getrelpath("/" + childpath) | |
|
677 | if childpath: | |
|
678 | changed.add(self.recode(childpath)) | |
|
686 | 679 | |
|
687 | 680 | # Handle directory copies |
|
688 | 681 | if not ent.copyfrom_path or not parents: |
@@ -697,15 +690,15 b' class svn_source(converter_source):' | |||
|
697 | 690 | continue |
|
698 | 691 | self.ui.debug("mark %s came from %s:%d\n" |
|
699 | 692 | % (path, copyfrompath, ent.copyfrom_rev)) |
|
700 |
children = self._ |
|
|
693 | children = self._listfiles(ent.copyfrom_path, ent.copyfrom_rev) | |
|
701 | 694 | children.sort() |
|
702 | for child in children: | |
|
703 |
|
|
|
704 |
if not |
|
|
695 | for childpath in children: | |
|
696 | childpath = self.getrelpath("/" + childpath, pmodule) | |
|
697 | if not childpath: | |
|
705 | 698 | continue |
|
706 |
copytopath = path + |
|
|
699 | copytopath = path + childpath[len(copyfrompath):] | |
|
707 | 700 | copytopath = self.getrelpath(copytopath) |
|
708 |
copies[self.recode(copytopath)] = self.recode( |
|
|
701 | copies[self.recode(copytopath)] = self.recode(childpath) | |
|
709 | 702 | |
|
710 | 703 | changed.update(removed) |
|
711 | 704 | return (list(changed), removed, copies) |
@@ -867,12 +860,14 b' class svn_source(converter_source):' | |||
|
867 | 860 | data = data[len(link_prefix):] |
|
868 | 861 | return data, mode |
|
869 | 862 | |
|
870 |
def _ |
|
|
863 | def _listfiles(self, path, revnum): | |
|
864 | """List all files in path at revnum, recursively.""" | |
|
871 | 865 | path = path.strip('/') |
|
872 | 866 | pool = Pool() |
|
873 | 867 | rpath = '/'.join([self.baseurl, urllib.quote(path)]).strip('/') |
|
874 | return ['%s/%s' % (path, x) for x in | |
|
875 | svn.client.ls(rpath, optrev(revnum), True, self.ctx, pool).keys()] | |
|
868 | entries = svn.client.ls(rpath, optrev(revnum), True, self.ctx, pool) | |
|
869 | return [(path + '/' + p) for p, e in entries.iteritems() | |
|
870 | if e.kind == svn.core.svn_node_file] | |
|
876 | 871 | |
|
877 | 872 | def getrelpath(self, path, module=None): |
|
878 | 873 | if module is None: |
General Comments 0
You need to be logged in to leave comments.
Login now