Show More
@@ -724,12 +724,6 b' class svn_source(converter_source):' | |||
|
724 | 724 | |
|
725 | 725 | self.child_cset = None |
|
726 | 726 | |
|
727 | def isdescendantof(parent, child): | |
|
728 | if not child or not parent or not child.startswith(parent): | |
|
729 | return False | |
|
730 | subpath = child[len(parent):] | |
|
731 | return len(subpath) > 1 and subpath[0] == '/' | |
|
732 | ||
|
733 | 727 | def parselogentry(orig_paths, revnum, author, date, message): |
|
734 | 728 | """Return the parsed commit object or None, and True if |
|
735 | 729 | the revision is a branch root. |
@@ -752,21 +746,10 b' class svn_source(converter_source):' | |||
|
752 | 746 | if root_paths: |
|
753 | 747 | path, ent = root_paths[-1] |
|
754 | 748 | if ent.copyfrom_path: |
|
755 | # If dir was moved while one of its file was removed | |
|
756 | # the log may look like: | |
|
757 | # A /dir (from /dir:x) | |
|
758 | # A /dir/a (from /dir/a:y) | |
|
759 | # A /dir/b (from /dir/b:z) | |
|
760 | # ... | |
|
761 | # for all remaining children. | |
|
762 | # Let's take the highest child element from rev as source. | |
|
763 | copies = [(p,e) for p,e in orig_paths[:-1] | |
|
764 | if isdescendantof(ent.copyfrom_path, e.copyfrom_path)] | |
|
765 | fromrev = max([e.copyfrom_rev for p,e in copies] + [ent.copyfrom_rev]) | |
|
766 | 749 | branched = True |
|
767 | 750 | newpath = ent.copyfrom_path + self.module[len(path):] |
|
768 | 751 | # ent.copyfrom_rev may not be the actual last revision |
|
769 | previd = self.latest(newpath, fromrev) | |
|
752 | previd = self.latest(newpath, ent.copyfrom_rev) | |
|
770 | 753 | if previd is not None: |
|
771 | 754 | prevmodule, prevnum = self.revsplit(previd)[1:] |
|
772 | 755 | if prevnum >= self.startrev: |
@@ -37,8 +37,8 b' o branch=old3 11 branch trunk@1 into ol' | |||
|
37 | 37 | | | | |
|
38 | 38 | | o | branch= 3 change a files: a |
|
39 | 39 | | | | |
|
40 |
|
|
|
41 |
| | |
|
|
40 | +---o branch=old 2 branch trunk, remove c files: a b | |
|
41 | | | | |
|
42 | 42 | | o branch= 1 hello files: a b c |
|
43 | 43 | |/ |
|
44 | 44 | o branch= 0 init projA files: |
General Comments 0
You need to be logged in to leave comments.
Login now