Show More
@@ -1,104 +1,108 b'' | |||
|
1 | 1 | #!/bin/sh |
|
2 | 2 | |
|
3 | 3 | "$TESTDIR/hghave" cvs || exit 80 |
|
4 | 4 | |
|
5 | 5 | cvscall() |
|
6 | 6 | { |
|
7 | 7 | cvs -f "$@" |
|
8 | 8 | } |
|
9 | 9 | |
|
10 | 10 | hgcat() |
|
11 | 11 | { |
|
12 | 12 | hg --cwd src-hg cat -r tip "$1" |
|
13 | 13 | } |
|
14 | 14 | |
|
15 | 15 | echo "[extensions]" >> $HGRCPATH |
|
16 | 16 | echo "convert = " >> $HGRCPATH |
|
17 | 17 | echo "graphlog = " >> $HGRCPATH |
|
18 | 18 | echo "[convert]" >> $HGRCPATH |
|
19 | 19 | echo "cvsps=builtin" >> $HGRCPATH |
|
20 | 20 | |
|
21 | 21 | echo % create cvs repository |
|
22 | 22 | mkdir cvsrepo |
|
23 | 23 | cd cvsrepo |
|
24 | 24 | export CVSROOT=`pwd` |
|
25 | 25 | export CVS_OPTIONS=-f |
|
26 | 26 | cd .. |
|
27 | 27 | |
|
28 | 28 | cvscall -q -d "$CVSROOT" init |
|
29 | 29 | |
|
30 | 30 | echo % create source directory |
|
31 | 31 | mkdir src-temp |
|
32 | 32 | cd src-temp |
|
33 | 33 | echo a > a |
|
34 | 34 | mkdir b |
|
35 | 35 | cd b |
|
36 | 36 | echo c > c |
|
37 | 37 | cd .. |
|
38 | 38 | |
|
39 | 39 | echo % import source directory |
|
40 | 40 | cvscall -q import -m import src INITIAL start |
|
41 | 41 | cd .. |
|
42 | 42 | |
|
43 | 43 | echo % checkout source directory |
|
44 | 44 | cvscall -q checkout src |
|
45 | 45 | |
|
46 | 46 | echo % commit a new revision changing b/c |
|
47 | 47 | cd src |
|
48 | 48 | sleep 1 |
|
49 | 49 | echo c >> b/c |
|
50 | 50 | cvscall -q commit -mci0 . | grep '<--' |\ |
|
51 | 51 | sed -e 's:.*src/\(.*\),v.*:checking in src/\1,v:g' |
|
52 | 52 | cd .. |
|
53 | 53 | |
|
54 | 54 | echo % convert fresh repo |
|
55 | 55 | hg convert src src-hg | sed -e 's/connecting to.*cvsrepo/connecting to cvsrepo/g' |
|
56 | 56 | hgcat a |
|
57 | 57 | hgcat b/c |
|
58 | 58 | |
|
59 | 59 | echo % convert fresh repo with --filemap |
|
60 | 60 | echo include b/c > filemap |
|
61 | 61 | hg convert --filemap filemap src src-filemap | sed -e 's/connecting to.*cvsrepo/connecting to cvsrepo/g' |
|
62 | 62 | hgcat b/c |
|
63 | 63 | hg -R src-filemap log --template '#rev# #desc# files: #files#\n' |
|
64 | 64 | |
|
65 | 65 | echo % commit new file revisions |
|
66 | 66 | cd src |
|
67 | 67 | echo a >> a |
|
68 | 68 | echo c >> b/c |
|
69 | 69 | cvscall -q commit -mci1 . | grep '<--' |\ |
|
70 | 70 | sed -e 's:.*src/\(.*\),v.*:checking in src/\1,v:g' |
|
71 | 71 | cd .. |
|
72 | 72 | |
|
73 | 73 | echo % convert again |
|
74 | 74 | hg convert src src-hg | sed -e 's/connecting to.*cvsrepo/connecting to cvsrepo/g' |
|
75 | 75 | hgcat a |
|
76 | 76 | hgcat b/c |
|
77 | 77 | |
|
78 | 78 | echo % convert again with --filemap |
|
79 | 79 | hg convert --filemap filemap src src-filemap | sed -e 's/connecting to.*cvsrepo/connecting to cvsrepo/g' |
|
80 | 80 | hgcat b/c |
|
81 | 81 | hg -R src-filemap log --template '#rev# #desc# files: #files#\n' |
|
82 | 82 | |
|
83 | 83 | echo % commit branch |
|
84 | 84 | cd src |
|
85 | 85 | cvs -q update -r1.1 b/c |
|
86 | 86 | cvs -q tag -b branch |
|
87 | 87 | cvs -q update -r branch |
|
88 | 88 | echo d >> b/c |
|
89 | 89 | cvs -q commit -mci2 . | grep '<--' |\ |
|
90 | 90 | sed -e 's:.*src/\(.*\),v.*:checking in src/\1,v:g' |
|
91 | 91 | cd .. |
|
92 | 92 | |
|
93 | 93 | echo % convert again |
|
94 | 94 | hg convert src src-hg | sed -e 's/connecting to.*cvsrepo/connecting to cvsrepo/g' |
|
95 | 95 | hgcat a |
|
96 | 96 | hgcat b/c |
|
97 | 97 | |
|
98 | 98 | echo % convert again with --filemap |
|
99 | 99 | hg convert --filemap filemap src src-filemap | sed -e 's/connecting to.*cvsrepo/connecting to cvsrepo/g' |
|
100 | 100 | hgcat b/c |
|
101 | 101 | hg -R src-filemap log --template '#rev# #desc# files: #files#\n' |
|
102 | 102 | |
|
103 | 103 | echo "graphlog = " >> $HGRCPATH |
|
104 | 104 | hg -R src-hg glog --template '#rev# (#branches#) #desc# files: #files#\n' |
|
105 | ||
|
106 | echo % testing debugcvsps | |
|
107 | cd src | |
|
108 | hg debugcvsps | sed -e 's/Author:.*/Author:/' -e 's/Date:.*/Date:/' |
@@ -1,138 +1,206 b'' | |||
|
1 | 1 | % create cvs repository |
|
2 | 2 | % create source directory |
|
3 | 3 | % import source directory |
|
4 | 4 | N src/a |
|
5 | 5 | N src/b/c |
|
6 | 6 | |
|
7 | 7 | No conflicts created by this import |
|
8 | 8 | |
|
9 | 9 | % checkout source directory |
|
10 | 10 | U src/a |
|
11 | 11 | U src/b/c |
|
12 | 12 | % commit a new revision changing b/c |
|
13 | 13 | checking in src/b/c,v |
|
14 | 14 | % convert fresh repo |
|
15 | 15 | initializing destination src-hg repository |
|
16 | 16 | using builtin cvsps |
|
17 | 17 | collecting CVS rlog |
|
18 | 18 | 5 log entries |
|
19 | 19 | creating changesets |
|
20 | 20 | 3 changeset entries |
|
21 | 21 | connecting to cvsrepo |
|
22 | 22 | scanning source... |
|
23 | 23 | sorting... |
|
24 | 24 | converting... |
|
25 | 25 | 2 Initial revision |
|
26 | 26 | 1 import |
|
27 | 27 | 0 ci0 |
|
28 | 28 | updating tags |
|
29 | 29 | a |
|
30 | 30 | c |
|
31 | 31 | c |
|
32 | 32 | % convert fresh repo with --filemap |
|
33 | 33 | initializing destination src-filemap repository |
|
34 | 34 | using builtin cvsps |
|
35 | 35 | collecting CVS rlog |
|
36 | 36 | 5 log entries |
|
37 | 37 | creating changesets |
|
38 | 38 | 3 changeset entries |
|
39 | 39 | connecting to cvsrepo |
|
40 | 40 | scanning source... |
|
41 | 41 | sorting... |
|
42 | 42 | converting... |
|
43 | 43 | 2 Initial revision |
|
44 | 44 | 1 import |
|
45 | 45 | rolling back last transaction |
|
46 | 46 | 0 ci0 |
|
47 | 47 | updating tags |
|
48 | 48 | c |
|
49 | 49 | c |
|
50 | 50 | 2 update tags files: .hgtags |
|
51 | 51 | 1 ci0 files: b/c |
|
52 | 52 | 0 Initial revision files: b/c |
|
53 | 53 | % commit new file revisions |
|
54 | 54 | checking in src/a,v |
|
55 | 55 | checking in src/b/c,v |
|
56 | 56 | % convert again |
|
57 | 57 | using builtin cvsps |
|
58 | 58 | collecting CVS rlog |
|
59 | 59 | 7 log entries |
|
60 | 60 | creating changesets |
|
61 | 61 | 4 changeset entries |
|
62 | 62 | connecting to cvsrepo |
|
63 | 63 | scanning source... |
|
64 | 64 | sorting... |
|
65 | 65 | converting... |
|
66 | 66 | 0 ci1 |
|
67 | 67 | a |
|
68 | 68 | a |
|
69 | 69 | c |
|
70 | 70 | c |
|
71 | 71 | c |
|
72 | 72 | % convert again with --filemap |
|
73 | 73 | using builtin cvsps |
|
74 | 74 | collecting CVS rlog |
|
75 | 75 | 7 log entries |
|
76 | 76 | creating changesets |
|
77 | 77 | 4 changeset entries |
|
78 | 78 | connecting to cvsrepo |
|
79 | 79 | scanning source... |
|
80 | 80 | sorting... |
|
81 | 81 | converting... |
|
82 | 82 | 0 ci1 |
|
83 | 83 | c |
|
84 | 84 | c |
|
85 | 85 | c |
|
86 | 86 | 3 ci1 files: b/c |
|
87 | 87 | 2 update tags files: .hgtags |
|
88 | 88 | 1 ci0 files: b/c |
|
89 | 89 | 0 Initial revision files: b/c |
|
90 | 90 | % commit branch |
|
91 | 91 | U b/c |
|
92 | 92 | T a |
|
93 | 93 | T b/c |
|
94 | 94 | checking in src/b/c,v |
|
95 | 95 | % convert again |
|
96 | 96 | using builtin cvsps |
|
97 | 97 | collecting CVS rlog |
|
98 | 98 | 8 log entries |
|
99 | 99 | creating changesets |
|
100 | 100 | 5 changeset entries |
|
101 | 101 | connecting to cvsrepo |
|
102 | 102 | scanning source... |
|
103 | 103 | sorting... |
|
104 | 104 | converting... |
|
105 | 105 | 0 ci2 |
|
106 | 106 | a |
|
107 | 107 | c |
|
108 | 108 | d |
|
109 | 109 | % convert again with --filemap |
|
110 | 110 | using builtin cvsps |
|
111 | 111 | collecting CVS rlog |
|
112 | 112 | 8 log entries |
|
113 | 113 | creating changesets |
|
114 | 114 | 5 changeset entries |
|
115 | 115 | connecting to cvsrepo |
|
116 | 116 | scanning source... |
|
117 | 117 | sorting... |
|
118 | 118 | converting... |
|
119 | 119 | 0 ci2 |
|
120 | 120 | c |
|
121 | 121 | d |
|
122 | 122 | 4 ci2 files: b/c |
|
123 | 123 | 3 ci1 files: b/c |
|
124 | 124 | 2 update tags files: .hgtags |
|
125 | 125 | 1 ci0 files: b/c |
|
126 | 126 | 0 Initial revision files: b/c |
|
127 | 127 | o 5 (branch) ci2 files: b/c |
|
128 | 128 | | |
|
129 | 129 | | o 4 () ci1 files: a b/c |
|
130 | 130 | | | |
|
131 | 131 | | o 3 () update tags files: .hgtags |
|
132 | 132 | | | |
|
133 | 133 | | o 2 () ci0 files: b/c |
|
134 | 134 | |/ |
|
135 | 135 | | o 1 (INITIAL) import files: |
|
136 | 136 | |/ |
|
137 | 137 | o 0 () Initial revision files: a b/c |
|
138 | 138 | |
|
139 | % testing debugcvsps | |
|
140 | collecting CVS rlog | |
|
141 | 8 log entries | |
|
142 | creating changesets | |
|
143 | 5 changeset entries | |
|
144 | --------------------- | |
|
145 | PatchSet 1 | |
|
146 | Date: | |
|
147 | Author: | |
|
148 | Branch: HEAD | |
|
149 | Tag: (none) | |
|
150 | Log: | |
|
151 | Initial revision | |
|
152 | ||
|
153 | Members: | |
|
154 | a:INITIAL->1.1 | |
|
155 | b/c:INITIAL->1.1 | |
|
156 | ||
|
157 | --------------------- | |
|
158 | PatchSet 2 | |
|
159 | Date: | |
|
160 | Author: | |
|
161 | Branch: INITIAL | |
|
162 | Tag: start | |
|
163 | Log: | |
|
164 | import | |
|
165 | ||
|
166 | Members: | |
|
167 | a:1.1->1.1.1.1 | |
|
168 | b/c:1.1->1.1.1.1 | |
|
169 | ||
|
170 | --------------------- | |
|
171 | PatchSet 3 | |
|
172 | Date: | |
|
173 | Author: | |
|
174 | Branch: HEAD | |
|
175 | Tag: (none) | |
|
176 | Log: | |
|
177 | ci0 | |
|
178 | ||
|
179 | Members: | |
|
180 | b/c:1.1->1.2 | |
|
181 | ||
|
182 | --------------------- | |
|
183 | PatchSet 4 | |
|
184 | Date: | |
|
185 | Author: | |
|
186 | Branch: HEAD | |
|
187 | Tag: (none) | |
|
188 | Log: | |
|
189 | ci1 | |
|
190 | ||
|
191 | Members: | |
|
192 | a:1.1->1.2 | |
|
193 | b/c:1.2->1.3 | |
|
194 | ||
|
195 | --------------------- | |
|
196 | PatchSet 5 | |
|
197 | Date: | |
|
198 | Author: | |
|
199 | Branch: branch | |
|
200 | Tag: (none) | |
|
201 | Log: | |
|
202 | ci2 | |
|
203 | ||
|
204 | Members: | |
|
205 | b/c:1.1->1.1.2.1 | |
|
206 |
General Comments 0
You need to be logged in to leave comments.
Login now