##// END OF EJS Templates
convert: more cleanup in svn directory copy handling
Patrick Mezard -
r6542:e7810e61 default
parent child Browse files
Show More
@@ -675,26 +675,28 b' class svn_source(converter_source):'
675 # Copies here (must copy all from source)
675 # Copies here (must copy all from source)
676 # Probably not a real problem for us if
676 # Probably not a real problem for us if
677 # source does not exist
677 # source does not exist
678 if ent.copyfrom_path:
678 if not ent.copyfrom_path:
679 copyfrompath = self.getrelpath(ent.copyfrom_path.decode(self.encoding))
679 continue
680 if copyfrompath:
680 copyfrompath = self.getrelpath(ent.copyfrom_path.decode(self.encoding))
681 copyfrom[path] = ent
681 if not copyfrompath:
682 self.ui.debug("mark %s came from %s:%d\n"
682 continue
683 % (path, copyfrompath, ent.copyfrom_rev))
683 copyfrom[path] = ent
684 self.ui.debug("mark %s came from %s:%d\n"
685 % (path, copyfrompath, ent.copyfrom_rev))
684
686
685 # Good, /probably/ a regular copy. Really should check
687 # Good, /probably/ a regular copy. Really should check
686 # to see whether the parent revision actually contains
688 # to see whether the parent revision actually contains
687 # the directory in question.
689 # the directory in question.
688 children = self._find_children(ent.copyfrom_path, ent.copyfrom_rev)
690 children = self._find_children(ent.copyfrom_path, ent.copyfrom_rev)
689 children.sort()
691 children.sort()
690 for child in children:
692 for child in children:
691 entrypath = self.getrelpath("/" + child)
693 entrypath = self.getrelpath("/" + child)
692 if not entrypath:
694 if not entrypath:
693 continue
695 continue
694 entry = entrypath.decode(self.encoding)
696 entry = entrypath.decode(self.encoding)
695 copytopath = path + entry[len(copyfrompath):]
697 copytopath = path + entry[len(copyfrompath):]
696 copytopath = self.getrelpath(copytopath)
698 copytopath = self.getrelpath(copytopath)
697 copies[self.recode(copytopath)] = self.recode(entry)
699 copies[self.recode(copytopath)] = self.recode(entry)
698
700
699 return (util.unique(entries), copies)
701 return (util.unique(entries), copies)
700
702
General Comments 0
You need to be logged in to leave comments. Login now