Show More
@@ -675,28 +675,30 b' class svn_source(converter_source):' | |||
|
675 | 675 | # Copies here (must copy all from source) |
|
676 | 676 | # Probably not a real problem for us if |
|
677 | 677 | # source does not exist |
|
678 | if not ent.copyfrom_path: | |
|
678 | if not ent.copyfrom_path or not parents: | |
|
679 | 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 | 687 | if not copyfrompath: |
|
682 | 688 | continue |
|
683 | 689 | copyfrom[path] = ent |
|
684 | 690 | self.ui.debug("mark %s came from %s:%d\n" |
|
685 | 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 | 692 | children = self._find_children(ent.copyfrom_path, ent.copyfrom_rev) |
|
691 | 693 | children.sort() |
|
692 | 694 | for child in children: |
|
693 | entrypath = self.getrelpath("/" + child) | |
|
695 | entrypath = self.getrelpath("/" + child, pmodule) | |
|
694 | 696 | if not entrypath: |
|
695 | 697 | continue |
|
696 | 698 | entry = entrypath.decode(self.encoding) |
|
697 | 699 | copytopath = path + entry[len(copyfrompath):] |
|
698 | 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 | 703 | return (util.unique(entries), copies) |
|
702 | 704 |
@@ -27,8 +27,10 b' cd projA' | |||
|
27 | 27 | mkdir trunk |
|
28 | 28 | echo a > trunk/a |
|
29 | 29 | mkdir trunk/d1 |
|
30 | mkdir trunk/d2 | |
|
30 | 31 | echo b > trunk/d1/b |
|
31 | 32 | echo c > trunk/d1/c |
|
33 | echo d > trunk/d2/d | |
|
32 | 34 | cd .. |
|
33 | 35 | |
|
34 | 36 | svnurl=file://$svnpath/svn-repo/projA |
@@ -50,10 +52,14 b' mkdir subproject/branches' | |||
|
50 | 52 | svn add subproject/branches |
|
51 | 53 | svn ci -m createbranches |
|
52 | 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 | 56 | svn up |
|
54 | 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 | 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 | 63 | cd .. |
|
58 | 64 | |
|
59 | 65 | echo % convert trunk and branches |
@@ -4,6 +4,8 b' Adding projA/trunk/a' | |||
|
4 | 4 | Adding projA/trunk/d1 |
|
5 | 5 | Adding projA/trunk/d1/b |
|
6 | 6 | Adding projA/trunk/d1/c |
|
7 | Adding projA/trunk/d2 | |
|
8 | Adding projA/trunk/d2/d | |
|
7 | 9 | |
|
8 | 10 | Committed revision 1. |
|
9 | 11 | % update svn repository |
@@ -12,6 +14,8 b' A A/trunk/a' | |||
|
12 | 14 | A A/trunk/d1 |
|
13 | 15 | A A/trunk/d1/b |
|
14 | 16 | A A/trunk/d1/c |
|
17 | A A/trunk/d2 | |
|
18 | A A/trunk/d2/d | |
|
15 | 19 | Checked out revision 1. |
|
16 | 20 | Sending trunk/a |
|
17 | 21 | Sending trunk/d1/c |
@@ -25,6 +29,8 b' A subproject/a' | |||
|
25 | 29 | A subproject/d1 |
|
26 | 30 | A subproject/d1/b |
|
27 | 31 | A subproject/d1/c |
|
32 | A subproject/d2 | |
|
33 | A subproject/d2/d | |
|
28 | 34 | Updated to revision 3. |
|
29 | 35 | A subproject/trunk |
|
30 | 36 | Adding subproject/trunk |
@@ -36,35 +42,52 b' Adding subproject/branches' | |||
|
36 | 42 | Committed revision 5. |
|
37 | 43 | |
|
38 | 44 | Committed revision 6. |
|
45 | ||
|
46 | Committed revision 7. | |
|
39 | 47 | A subproject/trunk/d1 |
|
40 | 48 | A subproject/trunk/d1/b |
|
41 | 49 | A subproject/trunk/d1/c |
|
50 | A subproject/trunk/d2 | |
|
51 | A subproject/trunk/d2/d | |
|
42 | 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 | 57 | Sending subproject/trunk/d1/b |
|
58 | Deleting subproject/trunk/d2 | |
|
45 | 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 | 66 | % convert trunk and branches |
|
50 | 67 | initializing destination A-hg repository |
|
51 | 68 | scanning source... |
|
52 | 69 | sorting... |
|
53 | 70 | converting... |
|
54 |
|
|
|
55 |
|
|
|
56 |
|
|
|
57 | 3 changeb | |
|
58 | 2 changeb | |
|
71 | 8 createtrunk | |
|
72 | 7 moved1 | |
|
73 | 6 moved1 | |
|
74 | 5 moved2 | |
|
75 | 4 changeb and rm d2 | |
|
76 | 3 changeb and rm d2 | |
|
77 | 2 moved1again | |
|
59 | 78 | 1 moved1again |
|
60 | 0 moved1again | |
|
61 | o 6 moved1again files: d1/b d1/c | |
|
79 | 0 copydirfrompast | |
|
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 | 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 | 96 | o 0 createtrunk files: |
|
74 | 97 | |
|
75 |
default |
|
|
76 |
d1 |
|
|
98 | default 8: | |
|
99 | d1 6: |
General Comments 0
You need to be logged in to leave comments.
Login now