Show More
@@ -675,28 +675,30 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 not ent.copyfrom_path: |
|
678 | if not ent.copyfrom_path or not parents: | |
679 | continue |
|
679 | continue | |
680 | copyfrompath = self.getrelpath(ent.copyfrom_path.decode(self.encoding)) |
|
680 | # Copy sources not in parent revisions cannot be represented, | |
|
681 | # ignore their origin for now | |||
|
682 | pmodule, prevnum = self.revsplit(parents[0])[1:] | |||
|
683 | if ent.copyfrom_rev < prevnum: | |||
|
684 | continue | |||
|
685 | copyfrompath = ent.copyfrom_path.decode(self.encoding) | |||
|
686 | copyfrompath = self.getrelpath(copyfrompath, pmodule) | |||
681 | if not copyfrompath: |
|
687 | if not copyfrompath: | |
682 | continue |
|
688 | continue | |
683 | copyfrom[path] = ent |
|
689 | copyfrom[path] = ent | |
684 | self.ui.debug("mark %s came from %s:%d\n" |
|
690 | self.ui.debug("mark %s came from %s:%d\n" | |
685 | % (path, copyfrompath, ent.copyfrom_rev)) |
|
691 | % (path, copyfrompath, ent.copyfrom_rev)) | |
686 |
|
||||
687 | # Good, /probably/ a regular copy. Really should check |
|
|||
688 | # to see whether the parent revision actually contains |
|
|||
689 | # the directory in question. |
|
|||
690 | children = self._find_children(ent.copyfrom_path, ent.copyfrom_rev) |
|
692 | children = self._find_children(ent.copyfrom_path, ent.copyfrom_rev) | |
691 | children.sort() |
|
693 | children.sort() | |
692 | for child in children: |
|
694 | for child in children: | |
693 | entrypath = self.getrelpath("/" + child) |
|
695 | entrypath = self.getrelpath("/" + child, pmodule) | |
694 | if not entrypath: |
|
696 | if not entrypath: | |
695 | continue |
|
697 | continue | |
696 | entry = entrypath.decode(self.encoding) |
|
698 | entry = entrypath.decode(self.encoding) | |
697 | copytopath = path + entry[len(copyfrompath):] |
|
699 | copytopath = path + entry[len(copyfrompath):] | |
698 | copytopath = self.getrelpath(copytopath) |
|
700 | copytopath = self.getrelpath(copytopath) | |
699 | copies[self.recode(copytopath)] = self.recode(entry) |
|
701 | copies[self.recode(copytopath)] = self.recode(entry, pmodule) | |
700 |
|
702 | |||
701 | return (util.unique(entries), copies) |
|
703 | return (util.unique(entries), copies) | |
702 |
|
704 |
@@ -27,8 +27,10 b' cd projA' | |||||
27 | mkdir trunk |
|
27 | mkdir trunk | |
28 | echo a > trunk/a |
|
28 | echo a > trunk/a | |
29 | mkdir trunk/d1 |
|
29 | mkdir trunk/d1 | |
|
30 | mkdir trunk/d2 | |||
30 | echo b > trunk/d1/b |
|
31 | echo b > trunk/d1/b | |
31 | echo c > trunk/d1/c |
|
32 | echo c > trunk/d1/c | |
|
33 | echo d > trunk/d2/d | |||
32 | cd .. |
|
34 | cd .. | |
33 |
|
35 | |||
34 | svnurl=file://$svnpath/svn-repo/projA |
|
36 | svnurl=file://$svnpath/svn-repo/projA | |
@@ -50,10 +52,14 b' mkdir subproject/branches' | |||||
50 | svn add subproject/branches |
|
52 | svn add subproject/branches | |
51 | svn ci -m createbranches |
|
53 | svn ci -m createbranches | |
52 | svn mv $svnurl/subproject/d1 $svnurl/subproject/trunk/d1 -m moved1 |
|
54 | svn mv $svnurl/subproject/d1 $svnurl/subproject/trunk/d1 -m moved1 | |
|
55 | svn mv $svnurl/subproject/d2 $svnurl/subproject/trunk/d2 -m moved2 | |||
53 | svn up |
|
56 | svn up | |
54 | "$TESTDIR/svn-safe-append.py" b subproject/trunk/d1/b |
|
57 | "$TESTDIR/svn-safe-append.py" b subproject/trunk/d1/b | |
55 | svn ci -m changeb |
|
58 | svn rm subproject/trunk/d2 | |
|
59 | svn ci -m "changeb and rm d2" | |||
56 | svn mv $svnurl/subproject/trunk/d1 $svnurl/subproject/branches/d1 -m moved1again |
|
60 | svn mv $svnurl/subproject/trunk/d1 $svnurl/subproject/branches/d1 -m moved1again | |
|
61 | echo % copy a directory from a past revision | |||
|
62 | svn copy -r 7 $svnurl/subproject/trunk/d2 $svnurl/subproject/trunk -m copydirfrompast | |||
57 | cd .. |
|
63 | cd .. | |
58 |
|
64 | |||
59 | echo % convert trunk and branches |
|
65 | echo % convert trunk and branches |
@@ -4,6 +4,8 b' Adding projA/trunk/a' | |||||
4 | Adding projA/trunk/d1 |
|
4 | Adding projA/trunk/d1 | |
5 | Adding projA/trunk/d1/b |
|
5 | Adding projA/trunk/d1/b | |
6 | Adding projA/trunk/d1/c |
|
6 | Adding projA/trunk/d1/c | |
|
7 | Adding projA/trunk/d2 | |||
|
8 | Adding projA/trunk/d2/d | |||
7 |
|
9 | |||
8 | Committed revision 1. |
|
10 | Committed revision 1. | |
9 | % update svn repository |
|
11 | % update svn repository | |
@@ -12,6 +14,8 b' A A/trunk/a' | |||||
12 | A A/trunk/d1 |
|
14 | A A/trunk/d1 | |
13 | A A/trunk/d1/b |
|
15 | A A/trunk/d1/b | |
14 | A A/trunk/d1/c |
|
16 | A A/trunk/d1/c | |
|
17 | A A/trunk/d2 | |||
|
18 | A A/trunk/d2/d | |||
15 | Checked out revision 1. |
|
19 | Checked out revision 1. | |
16 | Sending trunk/a |
|
20 | Sending trunk/a | |
17 | Sending trunk/d1/c |
|
21 | Sending trunk/d1/c | |
@@ -25,6 +29,8 b' A subproject/a' | |||||
25 | A subproject/d1 |
|
29 | A subproject/d1 | |
26 | A subproject/d1/b |
|
30 | A subproject/d1/b | |
27 | A subproject/d1/c |
|
31 | A subproject/d1/c | |
|
32 | A subproject/d2 | |||
|
33 | A subproject/d2/d | |||
28 | Updated to revision 3. |
|
34 | Updated to revision 3. | |
29 | A subproject/trunk |
|
35 | A subproject/trunk | |
30 | Adding subproject/trunk |
|
36 | Adding subproject/trunk | |
@@ -36,35 +42,52 b' Adding subproject/branches' | |||||
36 | Committed revision 5. |
|
42 | Committed revision 5. | |
37 |
|
43 | |||
38 | Committed revision 6. |
|
44 | Committed revision 6. | |
|
45 | ||||
|
46 | Committed revision 7. | |||
39 | A subproject/trunk/d1 |
|
47 | A subproject/trunk/d1 | |
40 | A subproject/trunk/d1/b |
|
48 | A subproject/trunk/d1/b | |
41 | A subproject/trunk/d1/c |
|
49 | A subproject/trunk/d1/c | |
|
50 | A subproject/trunk/d2 | |||
|
51 | A subproject/trunk/d2/d | |||
42 | D subproject/d1 |
|
52 | D subproject/d1 | |
43 | Updated to revision 6. |
|
53 | D subproject/d2 | |
|
54 | Updated to revision 7. | |||
|
55 | D subproject/trunk/d2/d | |||
|
56 | D subproject/trunk/d2 | |||
44 | Sending subproject/trunk/d1/b |
|
57 | Sending subproject/trunk/d1/b | |
|
58 | Deleting subproject/trunk/d2 | |||
45 | Transmitting file data . |
|
59 | Transmitting file data . | |
46 |
Committed revision |
|
60 | Committed revision 8. | |
47 |
|
61 | |||
48 |
Committed revision |
|
62 | Committed revision 9. | |
|
63 | % copy a directory from a past revision | |||
|
64 | ||||
|
65 | Committed revision 10. | |||
49 | % convert trunk and branches |
|
66 | % convert trunk and branches | |
50 | initializing destination A-hg repository |
|
67 | initializing destination A-hg repository | |
51 | scanning source... |
|
68 | scanning source... | |
52 | sorting... |
|
69 | sorting... | |
53 | converting... |
|
70 | converting... | |
54 |
|
|
71 | 8 createtrunk | |
55 |
|
|
72 | 7 moved1 | |
56 |
|
|
73 | 6 moved1 | |
57 | 3 changeb |
|
74 | 5 moved2 | |
58 | 2 changeb |
|
75 | 4 changeb and rm d2 | |
|
76 | 3 changeb and rm d2 | |||
|
77 | 2 moved1again | |||
59 | 1 moved1again |
|
78 | 1 moved1again | |
60 | 0 moved1again |
|
79 | 0 copydirfrompast | |
61 | o 6 moved1again files: d1/b d1/c |
|
80 | o 8 copydirfrompast files: d2/d | |
|
81 | | | |||
|
82 | o 7 moved1again files: d1/b d1/c | |||
62 | | |
|
83 | | | |
63 |
| o |
|
84 | | o 6 moved1again files: | |
|
85 | | | | |||
|
86 | o | 5 changeb and rm d2 files: d1/b d2/d | |||
64 | | | |
|
87 | | | | |
65 |
|
|
88 | | o 4 changeb and rm d2 files: b | |
66 | | | |
|
89 | | | | |
67 | | o 3 changeb files: b |
|
90 | o | 3 moved2 files: d2/d | |
68 | | | |
|
91 | | | | |
69 | o | 2 moved1 files: d1/b d1/c |
|
92 | o | 2 moved1 files: d1/b d1/c | |
70 | | | |
|
93 | | | | |
@@ -72,5 +95,5 b' o | 2 moved1 files: d1/b d1/c' | |||||
72 | | |
|
95 | | | |
73 | o 0 createtrunk files: |
|
96 | o 0 createtrunk files: | |
74 |
|
97 | |||
75 |
default |
|
98 | default 8: | |
76 |
d1 |
|
99 | d1 6: |
General Comments 0
You need to be logged in to leave comments.
Login now