Show More
@@ -500,9 +500,10 b' class svn_source(converter_source):' | |||
|
500 | 500 | if tagid and tagname not in tags: |
|
501 | 501 | tags[tagname] = tagid |
|
502 | 502 | except SvnPathNotFound: |
|
503 |
# It happens when we are following directories |
|
|
504 |
# were copied with their parents |
|
|
505 |
# in the tag |
|
|
503 | # It happens when we are following directories | |
|
504 | # we assumed were copied with their parents | |
|
505 | # but were really created in the tag | |
|
506 | # directory. | |
|
506 | 507 | pass |
|
507 | 508 | pendings = remainings |
|
508 | 509 | tagspath = srctagspath |
@@ -563,9 +564,9 b' class svn_source(converter_source):' | |||
|
563 | 564 | if not dirent: |
|
564 | 565 | raise SvnPathNotFound(_('%s not found up to revision %d') % (path, stop)) |
|
565 | 566 | |
|
566 |
# stat() gives us the previous revision on this line of |
|
|
567 |
# it might be in *another module*. Fetch the |
|
|
568 | # to the latest revision. | |
|
567 | # stat() gives us the previous revision on this line of | |
|
568 | # development, but it might be in *another module*. Fetch the | |
|
569 | # log and detect renames down to the latest revision. | |
|
569 | 570 | stream = self._getlog([path], stop, dirent.created_rev) |
|
570 | 571 | try: |
|
571 | 572 | for entry in stream: |
@@ -623,7 +624,9 b' class svn_source(converter_source):' | |||
|
623 | 624 | |
|
624 | 625 | def expandpaths(self, rev, paths, parents): |
|
625 | 626 | entries = [] |
|
626 |
|
|
|
627 | # Map of entrypath, revision for finding source of deleted | |
|
628 | # revisions. | |
|
629 | copyfrom = {} | |
|
627 | 630 | copies = {} |
|
628 | 631 | |
|
629 | 632 | new_module, revnum = self.revsplit(rev)[1:] |
@@ -640,8 +643,8 b' class svn_source(converter_source):' | |||
|
640 | 643 | entries.append(self.recode(entry)) |
|
641 | 644 | if not ent.copyfrom_path or not parents: |
|
642 | 645 | continue |
|
643 |
# Copy sources not in parent revisions cannot be |
|
|
644 | # ignore their origin for now | |
|
646 | # Copy sources not in parent revisions cannot be | |
|
647 | # represented, ignore their origin for now | |
|
645 | 648 | pmodule, prevnum = self.revsplit(parents[0])[1:] |
|
646 | 649 | if ent.copyfrom_rev < prevnum: |
|
647 | 650 | continue |
@@ -654,10 +657,10 b' class svn_source(converter_source):' | |||
|
654 | 657 | elif kind == 0: # gone, but had better be a deleted *file* |
|
655 | 658 | self.ui.debug(_("gone from %s\n") % ent.copyfrom_rev) |
|
656 | 659 | |
|
657 |
# if a branch is created but entries are removed in |
|
|
658 | # changeset, get the right fromrev | |
|
659 |
# parents cannot be empty here, you cannot remove |
|
|
660 | # a root revision. | |
|
660 | # if a branch is created but entries are removed in | |
|
661 | # the same changeset, get the right fromrev | |
|
662 | # parents cannot be empty here, you cannot remove | |
|
663 | # things from a root revision. | |
|
661 | 664 | uuid, old_module, fromrev = self.revsplit(parents[0]) |
|
662 | 665 | |
|
663 | 666 | basepath = old_module + "/" + self.getrelpath(path) |
@@ -678,7 +681,8 b' class svn_source(converter_source):' | |||
|
678 | 681 | |
|
679 | 682 | frompath, froment = lookup_parts(entrypath) or (None, revnum - 1) |
|
680 | 683 | |
|
681 |
# need to remove fragment from lookup_parts and |
|
|
684 | # need to remove fragment from lookup_parts and | |
|
685 | # replace with copyfrom_path | |
|
682 | 686 | if frompath is not None: |
|
683 | 687 | self.ui.debug(_("munge-o-matic\n")) |
|
684 | 688 | self.ui.debug(entrypath + '\n') |
@@ -687,8 +691,8 b' class svn_source(converter_source):' | |||
|
687 | 691 | fromrev = froment.copyfrom_rev |
|
688 | 692 | self.ui.debug(_("info: %s %s %s %s\n") % (frompath, froment, ent, entrypath)) |
|
689 | 693 | |
|
690 |
# We can avoid the reparent calls if the module has |
|
|
691 | # but it probably does not worth the pain. | |
|
694 | # We can avoid the reparent calls if the module has | |
|
695 | # not changed but it probably does not worth the pain. | |
|
692 | 696 | prevmodule = self.reparent('') |
|
693 | 697 | fromkind = svn.ra.check_path(self.ra, entrypath.strip('/'), fromrev) |
|
694 | 698 | self.reparent(prevmodule) |
@@ -698,7 +702,8 b' class svn_source(converter_source):' | |||
|
698 | 702 | elif fromkind == svn.core.svn_node_dir: |
|
699 | 703 | # print "Deleted/moved non-file:", revnum, path, ent |
|
700 | 704 | # children = self._find_children(path, revnum - 1) |
|
701 |
# print "find children %s@%d from %d action %s" % |
|
|
705 | # print ("find children %s@%d from %d action %s" % | |
|
706 | # (path, revnum, ent.copyfrom_rev, ent.action)) | |
|
702 | 707 | # Sometimes this is tricky. For example: in |
|
703 | 708 | # The Subversion Repository revision 6940 a dir |
|
704 | 709 | # was copied and one of its files was deleted |
@@ -739,7 +744,8 b' class svn_source(converter_source):' | |||
|
739 | 744 | |
|
740 | 745 | # Also this could create duplicate entries. Not sure |
|
741 | 746 | # whether this will matter. Maybe should make entries a set. |
|
742 |
# print "Changed directory", revnum, path, ent.action, |
|
|
747 | # print "Changed directory", revnum, path, ent.action, \ | |
|
748 | # ent.copyfrom_path, ent.copyfrom_rev | |
|
743 | 749 | # This will fail if a directory was copied |
|
744 | 750 | # from another branch and then some of its files |
|
745 | 751 | # were deleted in the same transaction. |
@@ -757,13 +763,12 b' class svn_source(converter_source):' | |||
|
757 | 763 | if kind != svn.core.svn_node_dir: |
|
758 | 764 | entries.append(self.recode(entrypath)) |
|
759 | 765 | |
|
760 | # Copies here (must copy all from source) | |
|
761 |
# |
|
|
762 | # source does not exist | |
|
766 | # Copies here (must copy all from source) Probably not | |
|
767 | # a real problem for us if source does not exist | |
|
763 | 768 | if not ent.copyfrom_path or not parents: |
|
764 | 769 | continue |
|
765 |
# Copy sources not in parent revisions cannot be |
|
|
766 | # ignore their origin for now | |
|
770 | # Copy sources not in parent revisions cannot be | |
|
771 | # represented, ignore their origin for now | |
|
767 | 772 | pmodule, prevnum = self.revsplit(parents[0])[1:] |
|
768 | 773 | if ent.copyfrom_rev < prevnum: |
|
769 | 774 | continue |
General Comments 0
You need to be logged in to leave comments.
Login now