Show More
@@ -9,15 +9,10 fix_path() | |||
|
9 | 9 | |
|
10 | 10 | echo "[extensions]" >> $HGRCPATH |
|
11 | 11 | echo "convert = " >> $HGRCPATH |
|
12 | echo 'hgext.graphlog =' >> $HGRCPATH | |
|
12 | 13 | |
|
13 | 14 | svnadmin create svn-repo |
|
14 | 15 | |
|
15 | echo % initial svn import | |
|
16 | mkdir t | |
|
17 | cd t | |
|
18 | echo a > a | |
|
19 | cd .. | |
|
20 | ||
|
21 | 16 | svnpath=`pwd | fix_path` |
|
22 | 17 | # SVN wants all paths to start with a slash. Unfortunately, |
|
23 | 18 | # Windows ones don't. Handle that. |
@@ -26,106 +21,6 if [ $? -ne 0 ]; then | |||
|
26 | 21 | svnpath='/'$svnpath |
|
27 | 22 | fi |
|
28 | 23 | |
|
29 | svnurl=file://$svnpath/svn-repo/trunk/test | |
|
30 | svn import -m init t $svnurl | fix_path | |
|
31 | ||
|
32 | echo % update svn repository | |
|
33 | svn co $svnurl t2 | fix_path | |
|
34 | cd t2 | |
|
35 | echo b >> a | |
|
36 | echo b > b | |
|
37 | svn add b | |
|
38 | svn ci -m changea | |
|
39 | cd .. | |
|
40 | ||
|
41 | echo % convert to hg once | |
|
42 | hg convert $svnurl | |
|
43 | ||
|
44 | echo % update svn repository again | |
|
45 | cd t2 | |
|
46 | echo c >> a | |
|
47 | echo c >> b | |
|
48 | svn ci -m changeb | |
|
49 | cd .. | |
|
50 | ||
|
51 | echo % test incremental conversion | |
|
52 | hg convert -v $svnurl | sed 's/source:.*/source:/' | |
|
53 | ||
|
54 | echo % test filemap | |
|
55 | echo 'include b' > filemap | |
|
56 | hg convert --filemap filemap $svnurl fmap | |
|
57 | echo '[extensions]' >> $HGRCPATH | |
|
58 | echo 'hgext.graphlog =' >> $HGRCPATH | |
|
59 | hg glog -R fmap --template '#rev# #desc|firstline# files: #files#\n' | |
|
60 | ||
|
61 | echo % test stop revision | |
|
62 | hg convert --rev 1 $svnurl stoprev | |
|
63 | # Check convert_revision extra-records. | |
|
64 | # This is also the only place testing more than one extra field | |
|
65 | # in a revision. | |
|
66 | hg --cwd stoprev tip --debug | grep extra | sed 's/=.*/=/' | |
|
67 | ||
|
68 | ######################################## | |
|
69 | ||
|
70 | echo "# now tests that it works with trunk/branches/tags layout" | |
|
71 | echo | |
|
72 | echo % initial svn import | |
|
73 | mkdir projA | |
|
74 | cd projA | |
|
75 | mkdir trunk | |
|
76 | mkdir branches | |
|
77 | mkdir tags | |
|
78 | cd .. | |
|
79 | ||
|
80 | svnurl=file://$svnpath/svn-repo/projA | |
|
81 | svn import -m "init projA" projA $svnurl | fix_path | |
|
82 | ||
|
83 | ||
|
84 | echo % update svn repository | |
|
85 | svn co $svnurl/trunk A | fix_path | |
|
86 | cd A | |
|
87 | echo hello > letter.txt | |
|
88 | svn add letter.txt | |
|
89 | svn ci -m hello | |
|
90 | ||
|
91 | echo world >> letter.txt | |
|
92 | svn ci -m world | |
|
93 | ||
|
94 | svn copy -m "tag v0.1" $svnurl/trunk $svnurl/tags/v0.1 | |
|
95 | ||
|
96 | echo 'nice day today!' >> letter.txt | |
|
97 | svn ci -m "nice day" | |
|
98 | cd .. | |
|
99 | ||
|
100 | echo % convert to hg once | |
|
101 | hg convert $svnurl A-hg | |
|
102 | ||
|
103 | echo % update svn repository again | |
|
104 | cd A | |
|
105 | echo "see second letter" >> letter.txt | |
|
106 | # Put it in a subdirectory to test duplicate file records | |
|
107 | # from svn source (issue 714) | |
|
108 | mkdir todo | |
|
109 | echo "nice to meet you" > todo/letter2.txt | |
|
110 | svn add todo | |
|
111 | svn ci -m "second letter" | |
|
112 | ||
|
113 | svn copy -m "tag v0.2" $svnurl/trunk $svnurl/tags/v0.2 | |
|
114 | ||
|
115 | echo "blah-blah-blah" >> todo/letter2.txt | |
|
116 | svn ci -m "work in progress" | |
|
117 | cd .. | |
|
118 | ||
|
119 | echo % test incremental conversion | |
|
120 | hg convert $svnurl A-hg | |
|
121 | ||
|
122 | cd A-hg | |
|
123 | hg glog --template '#rev# #desc|firstline# files: #files#\n' | |
|
124 | hg tags -q | |
|
125 | cd .. | |
|
126 | ||
|
127 | ######################################## | |
|
128 | ||
|
129 | 24 | echo "# now tests that it works with trunk/tags layout, but no branches yet" |
|
130 | 25 | echo |
|
131 | 26 | echo % initial svn import |
@@ -171,6 +66,8 echo "blah-blah-blah" >> letter2.txt | |||
|
171 | 66 | svn ci -m "work in progress" |
|
172 | 67 | cd .. |
|
173 | 68 | |
|
69 | ######################################## | |
|
70 | ||
|
174 | 71 | echo % test incremental conversion |
|
175 | 72 | hg convert $svnurl B-hg |
|
176 | 73 | |
@@ -178,3 +75,15 cd B-hg | |||
|
178 | 75 | hg glog --template '#rev# #desc|firstline# files: #files#\n' |
|
179 | 76 | hg tags -q |
|
180 | 77 | cd .. |
|
78 | ||
|
79 | echo % test filemap | |
|
80 | echo 'include letter2.txt' > filemap | |
|
81 | hg convert --filemap filemap $svnurl/trunk fmap | |
|
82 | hg glog -R fmap --template '#rev# #desc|firstline# files: #files#\n' | |
|
83 | ||
|
84 | echo % test stop revision | |
|
85 | hg convert --rev 1 $svnurl/trunk stoprev | |
|
86 | # Check convert_revision extra-records. | |
|
87 | # This is also the only place testing more than one extra field | |
|
88 | # in a revision. | |
|
89 | hg --cwd stoprev tip --debug | grep extra | sed 's/=.*/=/' |
@@ -1,151 +1,24 | |||
|
1 | % initial svn import | |
|
2 | Adding t/a | |
|
3 | ||
|
4 | Committed revision 1. | |
|
5 | % update svn repository | |
|
6 | A t2/a | |
|
7 | Checked out revision 1. | |
|
8 | A b | |
|
9 | Sending a | |
|
10 | Adding b | |
|
11 | Transmitting file data .. | |
|
12 | Committed revision 2. | |
|
13 | % convert to hg once | |
|
14 | assuming destination test-hg | |
|
15 | initializing destination test-hg repository | |
|
16 | scanning source... | |
|
17 | sorting... | |
|
18 | converting... | |
|
19 | 1 init | |
|
20 | 0 changea | |
|
21 | % update svn repository again | |
|
22 | Sending a | |
|
23 | Sending b | |
|
24 | Transmitting file data .. | |
|
25 | Committed revision 3. | |
|
26 | % test incremental conversion | |
|
27 | assuming destination test-hg | |
|
28 | scanning source... | |
|
29 | fetching revision log for "/trunk/test" from 3 to 2 | |
|
30 | sorting... | |
|
31 | converting... | |
|
32 | 0 changeb | |
|
33 | source: | |
|
34 | a | |
|
35 | b | |
|
36 | no tags found at revision 3 | |
|
37 | % test filemap | |
|
38 | initializing destination fmap repository | |
|
39 | scanning source... | |
|
40 | sorting... | |
|
41 | converting... | |
|
42 | 2 init | |
|
43 | 1 changea | |
|
44 | 0 changeb | |
|
45 | o 1 changeb files: b | |
|
46 | | | |
|
47 | o 0 changea files: b | |
|
48 | ||
|
49 | % test stop revision | |
|
50 | initializing destination stoprev repository | |
|
51 | scanning source... | |
|
52 | sorting... | |
|
53 | converting... | |
|
54 | 0 init | |
|
55 | extra: branch= | |
|
56 | extra: convert_revision= | |
|
57 | # now tests that it works with trunk/branches/tags layout | |
|
58 | ||
|
59 | % initial svn import | |
|
60 | Adding projA/trunk | |
|
61 | Adding projA/branches | |
|
62 | Adding projA/tags | |
|
63 | ||
|
64 | Committed revision 4. | |
|
65 | % update svn repository | |
|
66 | Checked out revision 4. | |
|
67 | A letter.txt | |
|
68 | Adding letter.txt | |
|
69 | Transmitting file data . | |
|
70 | Committed revision 5. | |
|
71 | Sending letter.txt | |
|
72 | Transmitting file data . | |
|
73 | Committed revision 6. | |
|
74 | ||
|
75 | Committed revision 7. | |
|
76 | Sending letter.txt | |
|
77 | Transmitting file data . | |
|
78 | Committed revision 8. | |
|
79 | % convert to hg once | |
|
80 | initializing destination A-hg repository | |
|
81 | scanning source... | |
|
82 | sorting... | |
|
83 | converting... | |
|
84 | 3 init projA | |
|
85 | 2 hello | |
|
86 | 1 world | |
|
87 | 0 nice day | |
|
88 | updating tags | |
|
89 | % update svn repository again | |
|
90 | A todo | |
|
91 | A todo/letter2.txt | |
|
92 | Sending letter.txt | |
|
93 | Adding todo | |
|
94 | Adding todo/letter2.txt | |
|
95 | Transmitting file data .. | |
|
96 | Committed revision 9. | |
|
97 | ||
|
98 | Committed revision 10. | |
|
99 | Sending todo/letter2.txt | |
|
100 | Transmitting file data . | |
|
101 | Committed revision 11. | |
|
102 | % test incremental conversion | |
|
103 | scanning source... | |
|
104 | sorting... | |
|
105 | converting... | |
|
106 | 1 second letter | |
|
107 | 0 work in progress | |
|
108 | updating tags | |
|
109 | o 7 update tags files: .hgtags | |
|
110 | | | |
|
111 | o 6 work in progress files: todo/letter2.txt | |
|
112 | | | |
|
113 | o 5 second letter files: letter.txt todo/letter2.txt | |
|
114 | | | |
|
115 | o 4 update tags files: .hgtags | |
|
116 | | | |
|
117 | o 3 nice day files: letter.txt | |
|
118 | | | |
|
119 | o 2 world files: letter.txt | |
|
120 | | | |
|
121 | o 1 hello files: letter.txt | |
|
122 | | | |
|
123 | o 0 init projA files: | |
|
124 | ||
|
125 | tip | |
|
126 | v0.2 | |
|
127 | v0.1 | |
|
128 | 1 | # now tests that it works with trunk/tags layout, but no branches yet |
|
129 | 2 | |
|
130 | 3 | % initial svn import |
|
131 | 4 | Adding projB/trunk |
|
132 | 5 | Adding projB/tags |
|
133 | 6 | |
|
134 |
Committed revision 1 |
|
|
7 | Committed revision 1. | |
|
135 | 8 | % update svn repository |
|
136 |
Checked out revision 1 |
|
|
9 | Checked out revision 1. | |
|
137 | 10 | A letter.txt |
|
138 | 11 | Adding letter.txt |
|
139 | 12 | Transmitting file data . |
|
140 |
Committed revision |
|
|
13 | Committed revision 2. | |
|
141 | 14 | Sending letter.txt |
|
142 | 15 | Transmitting file data . |
|
143 |
Committed revision |
|
|
16 | Committed revision 3. | |
|
144 | 17 | |
|
145 |
Committed revision |
|
|
18 | Committed revision 4. | |
|
146 | 19 | Sending letter.txt |
|
147 | 20 | Transmitting file data . |
|
148 |
Committed revision |
|
|
21 | Committed revision 5. | |
|
149 | 22 | % convert to hg once |
|
150 | 23 | initializing destination B-hg repository |
|
151 | 24 | scanning source... |
@@ -161,12 +34,12 A letter2.txt | |||
|
161 | 34 | Sending letter.txt |
|
162 | 35 | Adding letter2.txt |
|
163 | 36 | Transmitting file data .. |
|
164 |
Committed revision |
|
|
37 | Committed revision 6. | |
|
165 | 38 | |
|
166 |
Committed revision |
|
|
39 | Committed revision 7. | |
|
167 | 40 | Sending letter2.txt |
|
168 | 41 | Transmitting file data . |
|
169 |
Committed revision |
|
|
42 | Committed revision 8. | |
|
170 | 43 | % test incremental conversion |
|
171 | 44 | scanning source... |
|
172 | 45 | sorting... |
@@ -193,3 +66,26 o 0 init projB files: | |||
|
193 | 66 | tip |
|
194 | 67 | v0.2 |
|
195 | 68 | v0.1 |
|
69 | % test filemap | |
|
70 | initializing destination fmap repository | |
|
71 | scanning source... | |
|
72 | sorting... | |
|
73 | converting... | |
|
74 | 5 init projB | |
|
75 | 4 hello | |
|
76 | 3 world | |
|
77 | 2 nice day | |
|
78 | 1 second letter | |
|
79 | 0 work in progress | |
|
80 | o 1 work in progress files: letter2.txt | |
|
81 | | | |
|
82 | o 0 second letter files: letter2.txt | |
|
83 | ||
|
84 | % test stop revision | |
|
85 | initializing destination stoprev repository | |
|
86 | scanning source... | |
|
87 | sorting... | |
|
88 | converting... | |
|
89 | 0 init projB | |
|
90 | extra: branch= | |
|
91 | extra: convert_revision= |
General Comments 0
You need to be logged in to leave comments.
Login now