##// END OF EJS Templates
test-keyword: make it run under Windows...
Patrick Mezard -
r6061:de087885 default
parent child Browse files
Show More
1 NO CONTENT: new file 100644, binary diff hidden
NO CONTENT: new file 100644, binary diff hidden
@@ -30,13 +30,25 b' cd Test-bndl'
30 echo % kwshrink should exit silently in empty/invalid repo
30 echo % kwshrink should exit silently in empty/invalid repo
31 hg kwshrink
31 hg kwshrink
32
32
33 # Symlinks cannot be created on Windows. The bundle was made with:
34 #
35 # hg init t
36 # cd t
37 # echo a > a
38 # ln -s a sym
39 # hg add sym
40 # hg ci -m addsym -u mercurial
41 # hg bundle --base null ../test-keyword.hg
42 #
43 hg pull -u "$TESTDIR/test-keyword.hg" \
44 | sed 's/pulling from.*test-keyword.hg/pulling from test-keyword.hg/'
45
33 echo 'expand $Id$' > a
46 echo 'expand $Id$' > a
34 echo 'do not process $Id:' >> a
47 echo 'do not process $Id:' >> a
35 echo 'xxx $' >> a
48 echo 'xxx $' >> a
36 echo 'ignore $Id$' > b
49 echo 'ignore $Id$' > b
37 ln -s a sym
38 echo % cat
50 echo % cat
39 cat sym a b
51 cat a b
40
52
41 echo % addremove
53 echo % addremove
42 hg addremove
54 hg addremove
@@ -56,7 +68,7 b' hg status'
56 echo % identify
68 echo % identify
57 hg --quiet identify
69 hg --quiet identify
58 echo % cat
70 echo % cat
59 cat sym a b
71 cat a b
60 echo % hg cat
72 echo % hg cat
61 hg cat sym a b
73 hg cat sym a b
62
74
@@ -88,7 +100,7 b' rm sym a b'
88 echo % update
100 echo % update
89 hg update
101 hg update
90 echo % cat
102 echo % cat
91 cat sym a b
103 cat a b
92
104
93 echo % check whether expansion is filewise
105 echo % check whether expansion is filewise
94 echo '$Id$' > c
106 echo '$Id$' > c
@@ -137,7 +149,7 b' echo % kwfiles'
137 hg kwfiles
149 hg kwfiles
138
150
139 echo % diff --rev
151 echo % diff --rev
140 hg diff --rev 0 | grep -v 'b/c'
152 hg diff --rev 1 | grep -v 'b/c'
141
153
142 echo % rollback
154 echo % rollback
143 hg rollback
155 hg rollback
@@ -157,7 +169,7 b' Xinfo = {author}: {desc}'
157 EOF
169 EOF
158
170
159 echo % cat
171 echo % cat
160 cat sym a b
172 cat a b
161 echo % hg cat
173 echo % hg cat
162 hg cat sym a b
174 hg cat sym a b
163
175
@@ -180,7 +192,7 b' echo % status'
180 hg status
192 hg status
181
193
182 echo % cat
194 echo % cat
183 cat sym a b
195 cat a b
184 echo % hg cat
196 echo % hg cat
185 hg cat sym a b
197 hg cat sym a b
186 echo
198 echo
@@ -201,7 +213,7 b' cat a'
201
213
202 echo % clone to test incoming
214 echo % clone to test incoming
203 cd ..
215 cd ..
204 hg clone -r0 Test Test-a
216 hg clone -r1 Test Test-a
205 cd Test-a
217 cd Test-a
206 cat <<EOF >> .hg/hgrc
218 cat <<EOF >> .hg/hgrc
207 [paths]
219 [paths]
@@ -222,7 +234,7 b' cd ../Test'
222 echo % import
234 echo % import
223 hg import ../rejecttest.diff
235 hg import ../rejecttest.diff
224 echo % cat
236 echo % cat
225 cat sym a b
237 cat a b
226 echo
238 echo
227 echo % rollback
239 echo % rollback
228 hg rollback
240 hg rollback
@@ -248,20 +260,20 b' cat a'
248 cd ..
260 cd ..
249
261
250 echo % kwexpand nonexistent
262 echo % kwexpand nonexistent
251 hg kwexpand nonexistent
263 hg kwexpand nonexistent 2>&1 | sed 's/nonexistent:.*/nonexistent:/'
252
264
253 echo % switch off expansion
265 echo % switch off expansion
254 echo % kwshrink with unknown file u
266 echo % kwshrink with unknown file u
255 cp a u
267 cp a u
256 hg --verbose kwshrink
268 hg --verbose kwshrink
257 echo % cat
269 echo % cat
258 cat sym a b
270 cat a b
259 echo % hg cat
271 echo % hg cat
260 hg cat sym a b
272 hg cat sym a b
261 echo
273 echo
262 rm $HGRCPATH
274 rm $HGRCPATH
263 echo % cat
275 echo % cat
264 cat sym a b
276 cat a b
265 echo % hg cat
277 echo % hg cat
266 hg cat sym a b
278 hg cat sym a b
267 echo
279 echo
@@ -84,54 +84,50 b' demo.txt ='
84 Branch = {branches}
84 Branch = {branches}
85 $Branch: demobranch $
85 $Branch: demobranch $
86 % kwshrink should exit silently in empty/invalid repo
86 % kwshrink should exit silently in empty/invalid repo
87 pulling from test-keyword.hg
88 requesting all changes
89 adding changesets
90 adding manifests
91 adding file changes
92 added 1 changesets with 1 changes to 1 files
93 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
87 % cat
94 % cat
88 expand $Id$
95 expand $Id$
89 do not process $Id:
96 do not process $Id:
90 xxx $
97 xxx $
91 expand $Id$
92 do not process $Id:
93 xxx $
94 ignore $Id$
98 ignore $Id$
95 % addremove
99 % addremove
96 adding a
100 adding a
97 adding b
101 adding b
98 adding sym
99 % status
102 % status
100 A a
103 A a
101 A b
104 A b
102 A sym
103 % default keyword expansion including commit hook
105 % default keyword expansion including commit hook
104 % interrupted commit should not change state or run commit hook
106 % interrupted commit should not change state or run commit hook
105 a
107 a
106 b
108 b
107 sym
108 transaction abort!
109 transaction abort!
109 rollback completed
110 rollback completed
110 abort: empty commit message
111 abort: empty commit message
111 % status
112 % status
112 A a
113 A a
113 A b
114 A b
114 A sym
115 % commit
115 % commit
116 a
116 a
117 b
117 b
118 sym
119 overwriting a expanding keywords
118 overwriting a expanding keywords
120 running hook commit.test: cp a hooktest
119 running hook commit.test: cp a hooktest
121 % status
120 % status
122 ? hooktest
121 ? hooktest
123 % identify
122 % identify
124 f782df5f9602
123 ef63ca68695b
125 % cat
124 % cat
126 expand $Id: a,v f782df5f9602 1970/01/01 00:00:00 user $
125 expand $Id: a,v ef63ca68695b 1970/01/01 00:00:00 user $
127 do not process $Id:
128 xxx $
129 expand $Id: a,v f782df5f9602 1970/01/01 00:00:00 user $
130 do not process $Id:
126 do not process $Id:
131 xxx $
127 xxx $
132 ignore $Id$
128 ignore $Id$
133 % hg cat
129 % hg cat
134 expand $Id: a,v f782df5f9602 1970/01/01 00:00:00 user $
130 expand $Id: a,v ef63ca68695b 1970/01/01 00:00:00 user $
135 do not process $Id:
131 do not process $Id:
136 xxx $
132 xxx $
137 ignore $Id$
133 ignore $Id$
@@ -139,24 +135,21 b' a'
139 % diff a hooktest
135 % diff a hooktest
140 % removing commit hook from config
136 % removing commit hook from config
141 % bundle
137 % bundle
142 1 changesets found
138 2 changesets found
143 % pull from bundle
139 % pull from bundle
144 pulling from ../kw.hg
140 pulling from ../kw.hg
145 requesting all changes
141 requesting all changes
146 adding changesets
142 adding changesets
147 adding manifests
143 adding manifests
148 adding file changes
144 adding file changes
149 added 1 changesets with 3 changes to 3 files
145 added 2 changesets with 3 changes to 3 files
150 3 files updated, 0 files merged, 0 files removed, 0 files unresolved
146 3 files updated, 0 files merged, 0 files removed, 0 files unresolved
151 % touch
147 % touch
152 % status
148 % status
153 % update
149 % update
154 3 files updated, 0 files merged, 0 files removed, 0 files unresolved
150 3 files updated, 0 files merged, 0 files removed, 0 files unresolved
155 % cat
151 % cat
156 expand $Id: a,v f782df5f9602 1970/01/01 00:00:00 user $
152 expand $Id: a,v ef63ca68695b 1970/01/01 00:00:00 user $
157 do not process $Id:
158 xxx $
159 expand $Id: a,v f782df5f9602 1970/01/01 00:00:00 user $
160 do not process $Id:
153 do not process $Id:
161 xxx $
154 xxx $
162 ignore $Id$
155 ignore $Id$
@@ -167,10 +160,10 b' adding c'
167 overwriting a expanding keywords
160 overwriting a expanding keywords
168 overwriting c expanding keywords
161 overwriting c expanding keywords
169 % compare changenodes in a c
162 % compare changenodes in a c
170 expand $Id: a,v f782df5f9602 1970/01/01 00:00:00 user $
163 expand $Id: a,v ef63ca68695b 1970/01/01 00:00:00 user $
171 do not process $Id:
164 do not process $Id:
172 xxx $
165 xxx $
173 $Id: c,v ba4426d1938e 1970/01/01 00:00:01 user $
166 $Id: c,v 40a904bbbe4c 1970/01/01 00:00:01 user $
174 tests for different changenodes
167 tests for different changenodes
175 % qinit -c
168 % qinit -c
176 % qimport
169 % qimport
@@ -179,11 +172,11 b' tests for different changenodes'
179 # HG changeset patch
172 # HG changeset patch
180 # User User Name <user@example.com>
173 # User User Name <user@example.com>
181 # Date 1 0
174 # Date 1 0
182 # Node ID ba4426d1938ec9673e03ab274d88c44e24618f7f
175 # Node ID 40a904bbbe4cd4ab0a1f28411e35db26341a40ad
183 # Parent f782df5f9602483b4e51c31a12315f353bba380c
176 # Parent ef63ca68695bc9495032c6fda1350c71e6d256e9
184 cndiff
177 cndiff
185
178
186 diff -r f782df5f9602 -r ba4426d1938e c
179 diff -r ef63ca68695b -r 40a904bbbe4c c
187 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
180 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
188 +++ b/c Thu Jan 01 00:00:01 1970 +0000
181 +++ b/c Thu Jan 01 00:00:01 1970 +0000
189 @@ -0,0 +1,2 @@
182 @@ -0,0 +1,2 @@
@@ -195,7 +188,7 b' Patch queue now empty'
195 applying mqtest.diff
188 applying mqtest.diff
196 Now at: mqtest.diff
189 Now at: mqtest.diff
197 % cat
190 % cat
198 $Id: c,v ba4426d1938e 1970/01/01 00:00:01 user $
191 $Id: c,v 40a904bbbe4c 1970/01/01 00:00:01 user $
199 tests for different changenodes
192 tests for different changenodes
200 % qpop and move on
193 % qpop and move on
201 Patch queue now empty
194 Patch queue now empty
@@ -208,10 +201,10 b' c'
208 c: copy a:0045e12f6c5791aac80ca6cbfd97709a88307292
201 c: copy a:0045e12f6c5791aac80ca6cbfd97709a88307292
209 overwriting c expanding keywords
202 overwriting c expanding keywords
210 % cat a c
203 % cat a c
211 expand $Id: a,v f782df5f9602 1970/01/01 00:00:00 user $
204 expand $Id: a,v ef63ca68695b 1970/01/01 00:00:00 user $
212 do not process $Id:
205 do not process $Id:
213 xxx $
206 xxx $
214 expand $Id: c,v 0ba462c0f077 1970/01/01 00:00:01 user $
207 expand $Id: c,v e22d299ac0c2 1970/01/01 00:00:01 user $
215 do not process $Id:
208 do not process $Id:
216 xxx $
209 xxx $
217 % touch copied c after 1 second
210 % touch copied c after 1 second
@@ -220,7 +213,7 b' xxx $'
220 a
213 a
221 c
214 c
222 % diff --rev
215 % diff --rev
223 diff -r f782df5f9602 c
216 diff -r ef63ca68695b c
224 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
217 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
225 @@ -0,0 +1,3 @@
218 @@ -0,0 +1,3 @@
226 +expand $Id$
219 +expand $Id$
@@ -244,15 +237,12 b' demo.txt ='
244 Xinfo = {author}: {desc}
237 Xinfo = {author}: {desc}
245 $Xinfo: test: hg keyword config and expansion example $
238 $Xinfo: test: hg keyword config and expansion example $
246 % cat
239 % cat
247 expand $Id: a,v f782df5f9602 1970/01/01 00:00:00 user $
240 expand $Id: a,v ef63ca68695b 1970/01/01 00:00:00 user $
248 do not process $Id:
249 xxx $
250 expand $Id: a,v f782df5f9602 1970/01/01 00:00:00 user $
251 do not process $Id:
241 do not process $Id:
252 xxx $
242 xxx $
253 ignore $Id$
243 ignore $Id$
254 % hg cat
244 % hg cat
255 expand $Id: a f782df5f9602 Thu, 01 Jan 1970 00:00:00 +0000 user $
245 expand $Id: a ef63ca68695b Thu, 01 Jan 1970 00:00:00 +0000 user $
256 do not process $Id:
246 do not process $Id:
257 xxx $
247 xxx $
258 ignore $Id$
248 ignore $Id$
@@ -269,17 +259,13 b' a'
269 overwriting a expanding keywords
259 overwriting a expanding keywords
270 % status
260 % status
271 % cat
261 % cat
272 expand $Id: a 0729690beff6 Thu, 01 Jan 1970 00:00:02 +0000 user $
262 expand $Id: a bb948857c743 Thu, 01 Jan 1970 00:00:02 +0000 user $
273 do not process $Id:
274 xxx $
275 $Xinfo: User Name <user@example.com>: firstline $
276 expand $Id: a 0729690beff6 Thu, 01 Jan 1970 00:00:02 +0000 user $
277 do not process $Id:
263 do not process $Id:
278 xxx $
264 xxx $
279 $Xinfo: User Name <user@example.com>: firstline $
265 $Xinfo: User Name <user@example.com>: firstline $
280 ignore $Id$
266 ignore $Id$
281 % hg cat
267 % hg cat
282 expand $Id: a 0729690beff6 Thu, 01 Jan 1970 00:00:02 +0000 user $
268 expand $Id: a bb948857c743 Thu, 01 Jan 1970 00:00:02 +0000 user $
283 do not process $Id:
269 do not process $Id:
284 xxx $
270 xxx $
285 $Xinfo: User Name <user@example.com>: firstline $
271 $Xinfo: User Name <user@example.com>: firstline $
@@ -293,7 +279,7 b' rolling back last transaction'
293 R a
279 R a
294 % revert a
280 % revert a
295 % cat a
281 % cat a
296 expand $Id: a 0729690beff6 Thu, 01 Jan 1970 00:00:02 +0000 user $
282 expand $Id: a bb948857c743 Thu, 01 Jan 1970 00:00:02 +0000 user $
297 do not process $Id:
283 do not process $Id:
298 xxx $
284 xxx $
299 $Xinfo: User Name <user@example.com>: firstline $
285 $Xinfo: User Name <user@example.com>: firstline $
@@ -302,12 +288,12 b' requesting all changes'
302 adding changesets
288 adding changesets
303 adding manifests
289 adding manifests
304 adding file changes
290 adding file changes
305 added 1 changesets with 3 changes to 3 files
291 added 2 changesets with 3 changes to 3 files
306 3 files updated, 0 files merged, 0 files removed, 0 files unresolved
292 3 files updated, 0 files merged, 0 files removed, 0 files unresolved
307 % incoming
293 % incoming
308 comparing with test-keyword/Test
294 comparing with test-keyword/Test
309 searching for changes
295 searching for changes
310 changeset: 1:0729690beff6
296 changeset: 2:bb948857c743
311 tag: tip
297 tag: tip
312 user: User Name <user@example.com>
298 user: User Name <user@example.com>
313 date: Thu Jan 01 00:00:02 1970 +0000
299 date: Thu Jan 01 00:00:02 1970 +0000
@@ -320,11 +306,7 b' overwriting a expanding keywords'
320 % import
306 % import
321 applying ../rejecttest.diff
307 applying ../rejecttest.diff
322 % cat
308 % cat
323 expand $Id: a 82983f13f138 Thu, 01 Jan 1970 00:00:03 +0000 user $ rejecttest
309 expand $Id: a 4e0994474d25 Thu, 01 Jan 1970 00:00:03 +0000 user $ rejecttest
324 do not process $Id: rejecttest
325 xxx $
326 $Xinfo: User Name <user@example.com>: rejects? $
327 expand $Id: a 82983f13f138 Thu, 01 Jan 1970 00:00:03 +0000 user $ rejecttest
328 do not process $Id: rejecttest
310 do not process $Id: rejecttest
329 xxx $
311 xxx $
330 $Xinfo: User Name <user@example.com>: rejects? $
312 $Xinfo: User Name <user@example.com>: rejects? $
@@ -344,7 +326,7 b' x/a'
344 x/a: copy a:779c764182ce5d43e2b1eb66ce06d7b47bfe342e
326 x/a: copy a:779c764182ce5d43e2b1eb66ce06d7b47bfe342e
345 overwriting x/a expanding keywords
327 overwriting x/a expanding keywords
346 % cat a
328 % cat a
347 expand $Id: x/a f27c134d2d9b Thu, 01 Jan 1970 00:00:03 +0000 user $
329 expand $Id: x/a cfa68229c116 Thu, 01 Jan 1970 00:00:03 +0000 user $
348 do not process $Id:
330 do not process $Id:
349 xxx $
331 xxx $
350 $Xinfo: User Name <user@example.com>: xa $
332 $Xinfo: User Name <user@example.com>: xa $
@@ -356,7 +338,7 b' do not process $Id:'
356 xxx $
338 xxx $
357 $Xinfo$
339 $Xinfo$
358 % kwexpand nonexistent
340 % kwexpand nonexistent
359 nonexistent: No such file or directory
341 nonexistent:
360 % switch off expansion
342 % switch off expansion
361 % kwshrink with unknown file u
343 % kwshrink with unknown file u
362 overwriting a shrinking keywords
344 overwriting a shrinking keywords
@@ -366,13 +348,9 b' expand $Id$'
366 do not process $Id:
348 do not process $Id:
367 xxx $
349 xxx $
368 $Xinfo$
350 $Xinfo$
369 expand $Id$
370 do not process $Id:
371 xxx $
372 $Xinfo$
373 ignore $Id$
351 ignore $Id$
374 % hg cat
352 % hg cat
375 expand $Id: a 0729690beff6 Thu, 01 Jan 1970 00:00:02 +0000 user $
353 expand $Id: a bb948857c743 Thu, 01 Jan 1970 00:00:02 +0000 user $
376 do not process $Id:
354 do not process $Id:
377 xxx $
355 xxx $
378 $Xinfo: User Name <user@example.com>: firstline $
356 $Xinfo: User Name <user@example.com>: firstline $
@@ -383,10 +361,6 b' expand $Id$'
383 do not process $Id:
361 do not process $Id:
384 xxx $
362 xxx $
385 $Xinfo$
363 $Xinfo$
386 expand $Id$
387 do not process $Id:
388 xxx $
389 $Xinfo$
390 ignore $Id$
364 ignore $Id$
391 % hg cat
365 % hg cat
392 expand $Id$
366 expand $Id$
General Comments 0
You need to be logged in to leave comments. Login now