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