Show More
@@ -724,12 +724,6 class svn_source(converter_source): | |||||
724 |
|
724 | |||
725 | self.child_cset = None |
|
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 | def parselogentry(orig_paths, revnum, author, date, message): |
|
727 | def parselogentry(orig_paths, revnum, author, date, message): | |
734 | """Return the parsed commit object or None, and True if |
|
728 | """Return the parsed commit object or None, and True if | |
735 | the revision is a branch root. |
|
729 | the revision is a branch root. | |
@@ -752,21 +746,10 class svn_source(converter_source): | |||||
752 | if root_paths: |
|
746 | if root_paths: | |
753 | path, ent = root_paths[-1] |
|
747 | path, ent = root_paths[-1] | |
754 | if ent.copyfrom_path: |
|
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 | branched = True |
|
749 | branched = True | |
767 | newpath = ent.copyfrom_path + self.module[len(path):] |
|
750 | newpath = ent.copyfrom_path + self.module[len(path):] | |
768 | # ent.copyfrom_rev may not be the actual last revision |
|
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 | if previd is not None: |
|
753 | if previd is not None: | |
771 | prevmodule, prevnum = self.revsplit(previd)[1:] |
|
754 | prevmodule, prevnum = self.revsplit(previd)[1:] | |
772 | if prevnum >= self.startrev: |
|
755 | if prevnum >= self.startrev: |
@@ -37,8 +37,8 o branch=old3 11 branch trunk@1 into ol | |||||
37 | | | | |
|
37 | | | | | |
38 | | o | branch= 3 change a files: a |
|
38 | | o | branch= 3 change a files: a | |
39 | | | | |
|
39 | | | | | |
40 |
|
|
40 | +---o branch=old 2 branch trunk, remove c files: a b | |
41 |
| | |
|
41 | | | | |
42 | | o branch= 1 hello files: a b c |
|
42 | | o branch= 1 hello files: a b c | |
43 | |/ |
|
43 | |/ | |
44 | o branch= 0 init projA files: |
|
44 | o branch= 0 init projA files: |
General Comments 0
You need to be logged in to leave comments.
Login now