##// END OF EJS Templates
test-keyword: ignore subject in notify hook mails...
Mads Kiilerich -
r12648:8be2d784 default
parent child Browse files
Show More
@@ -1,1014 +1,1015 b''
1 $ cat <<EOF >> $HGRCPATH
1 $ cat <<EOF >> $HGRCPATH
2 > [extensions]
2 > [extensions]
3 > keyword =
3 > keyword =
4 > mq =
4 > mq =
5 > notify =
5 > notify =
6 > record =
6 > record =
7 > transplant =
7 > transplant =
8 > [ui]
8 > [ui]
9 > interactive = true
9 > interactive = true
10 > EOF
10 > EOF
11
11
12 Run kwdemo before [keyword] files are set up
12 Run kwdemo before [keyword] files are set up
13 as it would succeed without uisetup otherwise
13 as it would succeed without uisetup otherwise
14
14
15 $ hg --quiet kwdemo
15 $ hg --quiet kwdemo
16 [extensions]
16 [extensions]
17 keyword =
17 keyword =
18 [keyword]
18 [keyword]
19 demo.txt =
19 demo.txt =
20 [keywordmaps]
20 [keywordmaps]
21 Author = {author|user}
21 Author = {author|user}
22 Date = {date|utcdate}
22 Date = {date|utcdate}
23 Header = {root}/{file},v {node|short} {date|utcdate} {author|user}
23 Header = {root}/{file},v {node|short} {date|utcdate} {author|user}
24 Id = {file|basename},v {node|short} {date|utcdate} {author|user}
24 Id = {file|basename},v {node|short} {date|utcdate} {author|user}
25 RCSFile = {file|basename},v
25 RCSFile = {file|basename},v
26 RCSfile = {file|basename},v
26 RCSfile = {file|basename},v
27 Revision = {node|short}
27 Revision = {node|short}
28 Source = {root}/{file},v
28 Source = {root}/{file},v
29 $Author: test $
29 $Author: test $
30 $Date: ????/??/?? ??:??:?? $ (glob)
30 $Date: ????/??/?? ??:??:?? $ (glob)
31 $Header: */demo.txt,v ???????????? ????/??/?? ??:??:?? test $ (glob)
31 $Header: */demo.txt,v ???????????? ????/??/?? ??:??:?? test $ (glob)
32 $Id: demo.txt,v ???????????? ????/??/?? ??:??:?? test $ (glob)
32 $Id: demo.txt,v ???????????? ????/??/?? ??:??:?? test $ (glob)
33 $RCSFile: demo.txt,v $
33 $RCSFile: demo.txt,v $
34 $RCSfile: demo.txt,v $
34 $RCSfile: demo.txt,v $
35 $Revision: ???????????? $ (glob)
35 $Revision: ???????????? $ (glob)
36 $Source: */demo.txt,v $ (glob)
36 $Source: */demo.txt,v $ (glob)
37
37
38 $ hg --quiet kwdemo "Branch = {branches}"
38 $ hg --quiet kwdemo "Branch = {branches}"
39 [extensions]
39 [extensions]
40 keyword =
40 keyword =
41 [keyword]
41 [keyword]
42 demo.txt =
42 demo.txt =
43 [keywordmaps]
43 [keywordmaps]
44 Branch = {branches}
44 Branch = {branches}
45 $Branch: demobranch $
45 $Branch: demobranch $
46
46
47 $ cat <<EOF >> $HGRCPATH
47 $ cat <<EOF >> $HGRCPATH
48 > [keyword]
48 > [keyword]
49 > ** =
49 > ** =
50 > b = ignore
50 > b = ignore
51 > i = ignore
51 > i = ignore
52 > [hooks]
52 > [hooks]
53 > EOF
53 > EOF
54 $ cp $HGRCPATH $HGRCPATH.nohooks
54 $ cp $HGRCPATH $HGRCPATH.nohooks
55 > cat <<EOF >> $HGRCPATH
55 > cat <<EOF >> $HGRCPATH
56 > commit=
56 > commit=
57 > commit.test=cp a hooktest
57 > commit.test=cp a hooktest
58 > EOF
58 > EOF
59
59
60 $ hg init Test-bndl
60 $ hg init Test-bndl
61 $ cd Test-bndl
61 $ cd Test-bndl
62
62
63 kwshrink should exit silently in empty/invalid repo
63 kwshrink should exit silently in empty/invalid repo
64
64
65 $ hg kwshrink
65 $ hg kwshrink
66
66
67 Symlinks cannot be created on Windows.
67 Symlinks cannot be created on Windows.
68 A bundle to test this was made with:
68 A bundle to test this was made with:
69 hg init t
69 hg init t
70 cd t
70 cd t
71 echo a > a
71 echo a > a
72 ln -s a sym
72 ln -s a sym
73 hg add sym
73 hg add sym
74 hg ci -m addsym -u mercurial
74 hg ci -m addsym -u mercurial
75 hg bundle --base null ../test-keyword.hg
75 hg bundle --base null ../test-keyword.hg
76
76
77 $ hg pull -u "$TESTDIR"/test-keyword.hg
77 $ hg pull -u "$TESTDIR"/test-keyword.hg
78 pulling from *test-keyword.hg (glob)
78 pulling from *test-keyword.hg (glob)
79 requesting all changes
79 requesting all changes
80 adding changesets
80 adding changesets
81 adding manifests
81 adding manifests
82 adding file changes
82 adding file changes
83 added 1 changesets with 1 changes to 1 files
83 added 1 changesets with 1 changes to 1 files
84 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
84 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
85
85
86 $ echo 'expand $Id$' > a
86 $ echo 'expand $Id$' > a
87 $ echo 'do not process $Id:' >> a
87 $ echo 'do not process $Id:' >> a
88 $ echo 'xxx $' >> a
88 $ echo 'xxx $' >> a
89 $ echo 'ignore $Id$' > b
89 $ echo 'ignore $Id$' > b
90
90
91 Output files as they were created
91 Output files as they were created
92
92
93 $ cat a b
93 $ cat a b
94 expand $Id$
94 expand $Id$
95 do not process $Id:
95 do not process $Id:
96 xxx $
96 xxx $
97 ignore $Id$
97 ignore $Id$
98
98
99 no kwfiles
99 no kwfiles
100
100
101 $ hg kwfiles
101 $ hg kwfiles
102
102
103 untracked candidates
103 untracked candidates
104
104
105 $ hg -v kwfiles --unknown
105 $ hg -v kwfiles --unknown
106 k a
106 k a
107
107
108 Add files and check status
108 Add files and check status
109
109
110 $ hg addremove
110 $ hg addremove
111 adding a
111 adding a
112 adding b
112 adding b
113 $ hg status
113 $ hg status
114 A a
114 A a
115 A b
115 A b
116
116
117
117
118 Default keyword expansion including commit hook
118 Default keyword expansion including commit hook
119 Interrupted commit should not change state or run commit hook
119 Interrupted commit should not change state or run commit hook
120
120
121 $ hg --debug commit
121 $ hg --debug commit
122 abort: empty commit message
122 abort: empty commit message
123 [255]
123 [255]
124 $ hg status
124 $ hg status
125 A a
125 A a
126 A b
126 A b
127
127
128 Commit with several checks
128 Commit with several checks
129
129
130 $ hg --debug commit -mabsym -u 'User Name <user@example.com>'
130 $ hg --debug commit -mabsym -u 'User Name <user@example.com>'
131 a
131 a
132 b
132 b
133 overwriting a expanding keywords
133 overwriting a expanding keywords
134 running hook commit.test: cp a hooktest
134 running hook commit.test: cp a hooktest
135 committed changeset 1:ef63ca68695bc9495032c6fda1350c71e6d256e9
135 committed changeset 1:ef63ca68695bc9495032c6fda1350c71e6d256e9
136 $ hg status
136 $ hg status
137 ? hooktest
137 ? hooktest
138 $ hg debugrebuildstate
138 $ hg debugrebuildstate
139 $ hg --quiet identify
139 $ hg --quiet identify
140 ef63ca68695b
140 ef63ca68695b
141
141
142 cat files in working directory with keywords expanded
142 cat files in working directory with keywords expanded
143
143
144 $ cat a b
144 $ cat a b
145 expand $Id: a,v ef63ca68695b 1970/01/01 00:00:00 user $
145 expand $Id: a,v ef63ca68695b 1970/01/01 00:00:00 user $
146 do not process $Id:
146 do not process $Id:
147 xxx $
147 xxx $
148 ignore $Id$
148 ignore $Id$
149
149
150 hg cat files and symlink, no expansion
150 hg cat files and symlink, no expansion
151
151
152 $ hg cat sym a b && echo
152 $ hg cat sym a b && echo
153 expand $Id: a,v ef63ca68695b 1970/01/01 00:00:00 user $
153 expand $Id: a,v ef63ca68695b 1970/01/01 00:00:00 user $
154 do not process $Id:
154 do not process $Id:
155 xxx $
155 xxx $
156 ignore $Id$
156 ignore $Id$
157 a
157 a
158
158
159 Test hook execution
159 Test hook execution
160
160
161 $ diff a hooktest
161 $ diff a hooktest
162
162
163 $ cp $HGRCPATH.nohooks $HGRCPATH
163 $ cp $HGRCPATH.nohooks $HGRCPATH
164 $ rm hooktest
164 $ rm hooktest
165
165
166 bundle
166 bundle
167
167
168 $ hg bundle --base null ../kw.hg
168 $ hg bundle --base null ../kw.hg
169 2 changesets found
169 2 changesets found
170 $ cd ..
170 $ cd ..
171 $ hg init Test
171 $ hg init Test
172 $ cd Test
172 $ cd Test
173
173
174 Notify on pull to check whether keywords stay as is in email
174 Notify on pull to check whether keywords stay as is in email
175 ie. if patch.diff wrapper acts as it should
175 ie. if patch.diff wrapper acts as it should
176
176
177 $ cat <<EOF >> $HGRCPATH
177 $ cat <<EOF >> $HGRCPATH
178 > [hooks]
178 > [hooks]
179 > incoming.notify = python:hgext.notify.hook
179 > incoming.notify = python:hgext.notify.hook
180 > [notify]
180 > [notify]
181 > sources = pull
181 > sources = pull
182 > diffstat = False
182 > diffstat = False
183 > maxsubject = 15
183 > [reposubs]
184 > [reposubs]
184 > * = Test
185 > * = Test
185 > EOF
186 > EOF
186
187
187 Pull from bundle and trigger notify
188 Pull from bundle and trigger notify
188
189
189 $ hg pull -u ../kw.hg
190 $ hg pull -u ../kw.hg
190 pulling from ../kw.hg
191 pulling from ../kw.hg
191 requesting all changes
192 requesting all changes
192 adding changesets
193 adding changesets
193 adding manifests
194 adding manifests
194 adding file changes
195 adding file changes
195 added 2 changesets with 3 changes to 3 files
196 added 2 changesets with 3 changes to 3 files
196 Content-Type: text/plain; charset="us-ascii"
197 Content-Type: text/plain; charset="us-ascii"
197 MIME-Version: 1.0
198 MIME-Version: 1.0
198 Content-Transfer-Encoding: 7bit
199 Content-Transfer-Encoding: 7bit
199 Date: * (glob)
200 Date: * (glob)
200 Subject: changeset in $TESTTMP/Test: addsym
201 Subject: changeset in...
201 From: mercurial
202 From: mercurial
202 X-Hg-Notification: changeset a2392c293916
203 X-Hg-Notification: changeset a2392c293916
203 Message-Id: <hg.a2392c293916*> (glob)
204 Message-Id: <hg.a2392c293916*> (glob)
204 To: Test
205 To: Test
205
206
206 changeset a2392c293916 in $TESTTMP/Test
207 changeset a2392c293916 in $TESTTMP/Test
207 details: *cmd=changeset;node=a2392c293916 (glob)
208 details: *cmd=changeset;node=a2392c293916 (glob)
208 description:
209 description:
209 addsym
210 addsym
210
211
211 diffs (6 lines):
212 diffs (6 lines):
212
213
213 diff -r 000000000000 -r a2392c293916 sym
214 diff -r 000000000000 -r a2392c293916 sym
214 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
215 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
215 +++ b/sym Sat Feb 09 20:25:47 2008 +0100
216 +++ b/sym Sat Feb 09 20:25:47 2008 +0100
216 @@ -0,0 +1,1 @@
217 @@ -0,0 +1,1 @@
217 +a
218 +a
218 \ No newline at end of file
219 \ No newline at end of file
219 Content-Type: text/plain; charset="us-ascii"
220 Content-Type: text/plain; charset="us-ascii"
220 MIME-Version: 1.0
221 MIME-Version: 1.0
221 Content-Transfer-Encoding: 7bit
222 Content-Transfer-Encoding: 7bit
222 Date:* (glob)
223 Date:* (glob)
223 Subject: changeset in $TESTTMP/Test: absym
224 Subject: changeset in...
224 From: User Name <user@example.com>
225 From: User Name <user@example.com>
225 X-Hg-Notification: changeset ef63ca68695b
226 X-Hg-Notification: changeset ef63ca68695b
226 Message-Id: <hg.ef63ca68695b*> (glob)
227 Message-Id: <hg.ef63ca68695b*> (glob)
227 To: Test
228 To: Test
228
229
229 changeset ef63ca68695b in $TESTTMP/Test
230 changeset ef63ca68695b in $TESTTMP/Test
230 details: $TESTTMP/Test?cmd=changeset;node=ef63ca68695b
231 details: $TESTTMP/Test?cmd=changeset;node=ef63ca68695b
231 description:
232 description:
232 absym
233 absym
233
234
234 diffs (12 lines):
235 diffs (12 lines):
235
236
236 diff -r a2392c293916 -r ef63ca68695b a
237 diff -r a2392c293916 -r ef63ca68695b a
237 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
238 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
238 +++ b/a Thu Jan 01 00:00:00 1970 +0000
239 +++ b/a Thu Jan 01 00:00:00 1970 +0000
239 @@ -0,0 +1,3 @@
240 @@ -0,0 +1,3 @@
240 +expand $Id$
241 +expand $Id$
241 +do not process $Id:
242 +do not process $Id:
242 +xxx $
243 +xxx $
243 diff -r a2392c293916 -r ef63ca68695b b
244 diff -r a2392c293916 -r ef63ca68695b b
244 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
245 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
245 +++ b/b Thu Jan 01 00:00:00 1970 +0000
246 +++ b/b Thu Jan 01 00:00:00 1970 +0000
246 @@ -0,0 +1,1 @@
247 @@ -0,0 +1,1 @@
247 +ignore $Id$
248 +ignore $Id$
248 3 files updated, 0 files merged, 0 files removed, 0 files unresolved
249 3 files updated, 0 files merged, 0 files removed, 0 files unresolved
249
250
250 $ cp $HGRCPATH.nohooks $HGRCPATH
251 $ cp $HGRCPATH.nohooks $HGRCPATH
251
252
252 Touch files and check with status
253 Touch files and check with status
253
254
254 $ touch a b
255 $ touch a b
255 $ hg status
256 $ hg status
256
257
257 Update and expand
258 Update and expand
258
259
259 $ rm sym a b
260 $ rm sym a b
260 $ hg update -C
261 $ hg update -C
261 3 files updated, 0 files merged, 0 files removed, 0 files unresolved
262 3 files updated, 0 files merged, 0 files removed, 0 files unresolved
262 $ cat a b
263 $ cat a b
263 expand $Id: a,v ef63ca68695b 1970/01/01 00:00:00 user $
264 expand $Id: a,v ef63ca68695b 1970/01/01 00:00:00 user $
264 do not process $Id:
265 do not process $Id:
265 xxx $
266 xxx $
266 ignore $Id$
267 ignore $Id$
267
268
268 Check whether expansion is filewise
269 Check whether expansion is filewise
269
270
270 $ echo '$Id$' > c
271 $ echo '$Id$' > c
271 $ echo 'tests for different changenodes' >> c
272 $ echo 'tests for different changenodes' >> c
272
273
273 commit file c
274 commit file c
274
275
275 $ hg commit -A -mcndiff -d '1 0' -u 'User Name <user@example.com>'
276 $ hg commit -A -mcndiff -d '1 0' -u 'User Name <user@example.com>'
276 adding c
277 adding c
277
278
278 force expansion
279 force expansion
279
280
280 $ hg -v kwexpand
281 $ hg -v kwexpand
281 overwriting a expanding keywords
282 overwriting a expanding keywords
282 overwriting c expanding keywords
283 overwriting c expanding keywords
283
284
284 compare changenodes in a and c
285 compare changenodes in a and c
285
286
286 $ cat a c
287 $ cat a c
287 expand $Id: a,v ef63ca68695b 1970/01/01 00:00:00 user $
288 expand $Id: a,v ef63ca68695b 1970/01/01 00:00:00 user $
288 do not process $Id:
289 do not process $Id:
289 xxx $
290 xxx $
290 $Id: c,v 40a904bbbe4c 1970/01/01 00:00:01 user $
291 $Id: c,v 40a904bbbe4c 1970/01/01 00:00:01 user $
291 tests for different changenodes
292 tests for different changenodes
292
293
293 record chunk
294 record chunk
294
295
295 $ python -c \
296 $ python -c \
296 > 'l=open("a").readlines();l.insert(1,"foo\n");l.append("bar\n");open("a","w").writelines(l);'
297 > 'l=open("a").readlines();l.insert(1,"foo\n");l.append("bar\n");open("a","w").writelines(l);'
297 $ hg record -d '1 10' -m rectest<<EOF
298 $ hg record -d '1 10' -m rectest<<EOF
298 > y
299 > y
299 > y
300 > y
300 > n
301 > n
301 > EOF
302 > EOF
302 diff --git a/a b/a
303 diff --git a/a b/a
303 2 hunks, 2 lines changed
304 2 hunks, 2 lines changed
304 examine changes to 'a'? [Ynsfdaq?]
305 examine changes to 'a'? [Ynsfdaq?]
305 @@ -1,3 +1,4 @@
306 @@ -1,3 +1,4 @@
306 expand $Id$
307 expand $Id$
307 +foo
308 +foo
308 do not process $Id:
309 do not process $Id:
309 xxx $
310 xxx $
310 record change 1/2 to 'a'? [Ynsfdaq?]
311 record change 1/2 to 'a'? [Ynsfdaq?]
311 @@ -2,2 +3,3 @@
312 @@ -2,2 +3,3 @@
312 do not process $Id:
313 do not process $Id:
313 xxx $
314 xxx $
314 +bar
315 +bar
315 record change 2/2 to 'a'? [Ynsfdaq?]
316 record change 2/2 to 'a'? [Ynsfdaq?]
316
317
317 $ hg identify
318 $ hg identify
318 d17e03c92c97+ tip
319 d17e03c92c97+ tip
319 $ hg status
320 $ hg status
320 M a
321 M a
321
322
322 Cat modified file a
323 Cat modified file a
323
324
324 $ cat a
325 $ cat a
325 expand $Id: a,v d17e03c92c97 1970/01/01 00:00:01 test $
326 expand $Id: a,v d17e03c92c97 1970/01/01 00:00:01 test $
326 foo
327 foo
327 do not process $Id:
328 do not process $Id:
328 xxx $
329 xxx $
329 bar
330 bar
330
331
331 Diff remaining chunk
332 Diff remaining chunk
332
333
333 $ hg diff
334 $ hg diff
334 diff -r d17e03c92c97 a
335 diff -r d17e03c92c97 a
335 --- a/a Wed Dec 31 23:59:51 1969 -0000
336 --- a/a Wed Dec 31 23:59:51 1969 -0000
336 +++ b/a * (glob)
337 +++ b/a * (glob)
337 @@ -2,3 +2,4 @@
338 @@ -2,3 +2,4 @@
338 foo
339 foo
339 do not process $Id:
340 do not process $Id:
340 xxx $
341 xxx $
341 +bar
342 +bar
342
343
343 $ hg rollback
344 $ hg rollback
344 rolling back to revision 2 (undo commit)
345 rolling back to revision 2 (undo commit)
345
346
346 Record all chunks in file a
347 Record all chunks in file a
347
348
348 $ echo foo > msg
349 $ echo foo > msg
349
350
350 - do not use "hg record -m" here!
351 - do not use "hg record -m" here!
351
352
352 $ hg record -l msg -d '1 11'<<EOF
353 $ hg record -l msg -d '1 11'<<EOF
353 > y
354 > y
354 > y
355 > y
355 > y
356 > y
356 > EOF
357 > EOF
357 diff --git a/a b/a
358 diff --git a/a b/a
358 2 hunks, 2 lines changed
359 2 hunks, 2 lines changed
359 examine changes to 'a'? [Ynsfdaq?]
360 examine changes to 'a'? [Ynsfdaq?]
360 @@ -1,3 +1,4 @@
361 @@ -1,3 +1,4 @@
361 expand $Id$
362 expand $Id$
362 +foo
363 +foo
363 do not process $Id:
364 do not process $Id:
364 xxx $
365 xxx $
365 record change 1/2 to 'a'? [Ynsfdaq?]
366 record change 1/2 to 'a'? [Ynsfdaq?]
366 @@ -2,2 +3,3 @@
367 @@ -2,2 +3,3 @@
367 do not process $Id:
368 do not process $Id:
368 xxx $
369 xxx $
369 +bar
370 +bar
370 record change 2/2 to 'a'? [Ynsfdaq?]
371 record change 2/2 to 'a'? [Ynsfdaq?]
371
372
372 File a should be clean
373 File a should be clean
373
374
374 $ hg status -A a
375 $ hg status -A a
375 C a
376 C a
376
377
377 rollback and revert expansion
378 rollback and revert expansion
378
379
379 $ cat a
380 $ cat a
380 expand $Id: a,v 59f969a3b52c 1970/01/01 00:00:01 test $
381 expand $Id: a,v 59f969a3b52c 1970/01/01 00:00:01 test $
381 foo
382 foo
382 do not process $Id:
383 do not process $Id:
383 xxx $
384 xxx $
384 bar
385 bar
385 $ hg --verbose rollback
386 $ hg --verbose rollback
386 rolling back to revision 2 (undo commit)
387 rolling back to revision 2 (undo commit)
387 overwriting a expanding keywords
388 overwriting a expanding keywords
388 $ hg status a
389 $ hg status a
389 M a
390 M a
390 $ cat a
391 $ cat a
391 expand $Id: a,v ef63ca68695b 1970/01/01 00:00:00 user $
392 expand $Id: a,v ef63ca68695b 1970/01/01 00:00:00 user $
392 foo
393 foo
393 do not process $Id:
394 do not process $Id:
394 xxx $
395 xxx $
395 bar
396 bar
396 $ echo '$Id$' > y
397 $ echo '$Id$' > y
397 $ echo '$Id$' > z
398 $ echo '$Id$' > z
398 $ hg add y
399 $ hg add y
399 $ hg commit -Am "rollback only" z
400 $ hg commit -Am "rollback only" z
400 $ cat z
401 $ cat z
401 $Id: z,v 45a5d3adce53 1970/01/01 00:00:00 test $
402 $Id: z,v 45a5d3adce53 1970/01/01 00:00:00 test $
402 $ hg --verbose rollback
403 $ hg --verbose rollback
403 rolling back to revision 2 (undo commit)
404 rolling back to revision 2 (undo commit)
404 overwriting z shrinking keywords
405 overwriting z shrinking keywords
405
406
406 Only z should be overwritten
407 Only z should be overwritten
407
408
408 $ hg status a y z
409 $ hg status a y z
409 M a
410 M a
410 A y
411 A y
411 A z
412 A z
412 $ cat z
413 $ cat z
413 $Id$
414 $Id$
414 $ hg forget y z
415 $ hg forget y z
415 $ rm y z
416 $ rm y z
416
417
417 $ hg update -C
418 $ hg update -C
418 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
419 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
419
420
420 record added file
421 record added file
421
422
422 $ echo '$Id$' > r
423 $ echo '$Id$' > r
423 $ hg add r
424 $ hg add r
424 $ hg -v record -l msg -d '1 12' r<<EOF
425 $ hg -v record -l msg -d '1 12' r<<EOF
425 > y
426 > y
426 > EOF
427 > EOF
427 diff --git a/r b/r
428 diff --git a/r b/r
428 new file mode 100644
429 new file mode 100644
429 examine changes to 'r'? [Ynsfdaq?]
430 examine changes to 'r'? [Ynsfdaq?]
430 r
431 r
431 committed changeset 3:899491280810
432 committed changeset 3:899491280810
432 overwriting r expanding keywords
433 overwriting r expanding keywords
433 $ hg --verbose rollback
434 $ hg --verbose rollback
434 rolling back to revision 2 (undo commit)
435 rolling back to revision 2 (undo commit)
435 overwriting r shrinking keywords
436 overwriting r shrinking keywords
436 $ hg forget r
437 $ hg forget r
437 $ rm msg r
438 $ rm msg r
438
439
439 Test patch queue repo
440 Test patch queue repo
440
441
441 $ hg init --mq
442 $ hg init --mq
442 $ hg qimport -r tip -n mqtest.diff
443 $ hg qimport -r tip -n mqtest.diff
443 $ hg commit --mq -m mqtest
444 $ hg commit --mq -m mqtest
444
445
445 Keywords should not be expanded in patch
446 Keywords should not be expanded in patch
446
447
447 $ cat .hg/patches/mqtest.diff
448 $ cat .hg/patches/mqtest.diff
448 # HG changeset patch
449 # HG changeset patch
449 # User User Name <user@example.com>
450 # User User Name <user@example.com>
450 # Date 1 0
451 # Date 1 0
451 # Node ID 40a904bbbe4cd4ab0a1f28411e35db26341a40ad
452 # Node ID 40a904bbbe4cd4ab0a1f28411e35db26341a40ad
452 # Parent ef63ca68695bc9495032c6fda1350c71e6d256e9
453 # Parent ef63ca68695bc9495032c6fda1350c71e6d256e9
453 cndiff
454 cndiff
454
455
455 diff -r ef63ca68695b -r 40a904bbbe4c c
456 diff -r ef63ca68695b -r 40a904bbbe4c c
456 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
457 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
457 +++ b/c Thu Jan 01 00:00:01 1970 +0000
458 +++ b/c Thu Jan 01 00:00:01 1970 +0000
458 @@ -0,0 +1,2 @@
459 @@ -0,0 +1,2 @@
459 +$Id$
460 +$Id$
460 +tests for different changenodes
461 +tests for different changenodes
461
462
462 $ hg qpop
463 $ hg qpop
463 popping mqtest.diff
464 popping mqtest.diff
464 patch queue now empty
465 patch queue now empty
465
466
466 qgoto, implying qpush, should expand
467 qgoto, implying qpush, should expand
467
468
468 $ hg qgoto mqtest.diff
469 $ hg qgoto mqtest.diff
469 applying mqtest.diff
470 applying mqtest.diff
470 now at: mqtest.diff
471 now at: mqtest.diff
471 $ cat c
472 $ cat c
472 $Id: c,v 40a904bbbe4c 1970/01/01 00:00:01 user $
473 $Id: c,v 40a904bbbe4c 1970/01/01 00:00:01 user $
473 tests for different changenodes
474 tests for different changenodes
474 $ hg cat c
475 $ hg cat c
475 $Id: c,v 40a904bbbe4c 1970/01/01 00:00:01 user $
476 $Id: c,v 40a904bbbe4c 1970/01/01 00:00:01 user $
476 tests for different changenodes
477 tests for different changenodes
477
478
478 Keywords should not be expanded in filelog
479 Keywords should not be expanded in filelog
479
480
480 $ hg --config 'extensions.keyword=!' cat c
481 $ hg --config 'extensions.keyword=!' cat c
481 $Id$
482 $Id$
482 tests for different changenodes
483 tests for different changenodes
483
484
484 qpop and move on
485 qpop and move on
485
486
486 $ hg qpop
487 $ hg qpop
487 popping mqtest.diff
488 popping mqtest.diff
488 patch queue now empty
489 patch queue now empty
489
490
490 Copy and show added kwfiles
491 Copy and show added kwfiles
491
492
492 $ hg cp a c
493 $ hg cp a c
493 $ hg kwfiles
494 $ hg kwfiles
494 a
495 a
495 c
496 c
496
497
497 Commit and show expansion in original and copy
498 Commit and show expansion in original and copy
498
499
499 $ hg --debug commit -ma2c -d '1 0' -u 'User Name <user@example.com>'
500 $ hg --debug commit -ma2c -d '1 0' -u 'User Name <user@example.com>'
500 c
501 c
501 c: copy a:0045e12f6c5791aac80ca6cbfd97709a88307292
502 c: copy a:0045e12f6c5791aac80ca6cbfd97709a88307292
502 overwriting c expanding keywords
503 overwriting c expanding keywords
503 committed changeset 2:25736cf2f5cbe41f6be4e6784ef6ecf9f3bbcc7d
504 committed changeset 2:25736cf2f5cbe41f6be4e6784ef6ecf9f3bbcc7d
504 $ cat a c
505 $ cat a c
505 expand $Id: a,v ef63ca68695b 1970/01/01 00:00:00 user $
506 expand $Id: a,v ef63ca68695b 1970/01/01 00:00:00 user $
506 do not process $Id:
507 do not process $Id:
507 xxx $
508 xxx $
508 expand $Id: c,v 25736cf2f5cb 1970/01/01 00:00:01 user $
509 expand $Id: c,v 25736cf2f5cb 1970/01/01 00:00:01 user $
509 do not process $Id:
510 do not process $Id:
510 xxx $
511 xxx $
511
512
512 Touch copied c and check its status
513 Touch copied c and check its status
513
514
514 $ touch c
515 $ touch c
515 $ hg status
516 $ hg status
516
517
517 Copy kwfile to keyword ignored file unexpanding keywords
518 Copy kwfile to keyword ignored file unexpanding keywords
518
519
519 $ hg --verbose copy a i
520 $ hg --verbose copy a i
520 copying a to i
521 copying a to i
521 overwriting i shrinking keywords
522 overwriting i shrinking keywords
522 $ head -n 1 i
523 $ head -n 1 i
523 expand $Id$
524 expand $Id$
524 $ hg forget i
525 $ hg forget i
525 $ rm i
526 $ rm i
526
527
527 Copy ignored file to ignored file: no overwriting
528 Copy ignored file to ignored file: no overwriting
528
529
529 $ hg --verbose copy b i
530 $ hg --verbose copy b i
530 copying b to i
531 copying b to i
531 $ hg forget i
532 $ hg forget i
532 $ rm i
533 $ rm i
533
534
534 cp symlink (becomes regular file), and hg copy after
535 cp symlink (becomes regular file), and hg copy after
535
536
536 $ cp sym i
537 $ cp sym i
537 $ ls -l i
538 $ ls -l i
538 -rw-r--r--* (glob)
539 -rw-r--r--* (glob)
539 $ head -1 i
540 $ head -1 i
540 expand $Id: a,v ef63ca68695b 1970/01/01 00:00:00 user $
541 expand $Id: a,v ef63ca68695b 1970/01/01 00:00:00 user $
541 $ hg copy --after --verbose sym i
542 $ hg copy --after --verbose sym i
542 copying sym to i
543 copying sym to i
543 overwriting i shrinking keywords
544 overwriting i shrinking keywords
544 $ head -1 i
545 $ head -1 i
545 expand $Id$
546 expand $Id$
546 $ hg forget i
547 $ hg forget i
547 $ rm i
548 $ rm i
548
549
549 Test different options of hg kwfiles
550 Test different options of hg kwfiles
550
551
551 $ hg kwfiles
552 $ hg kwfiles
552 a
553 a
553 c
554 c
554 $ hg -v kwfiles --ignore
555 $ hg -v kwfiles --ignore
555 I b
556 I b
556 I sym
557 I sym
557 $ hg kwfiles --all
558 $ hg kwfiles --all
558 K a
559 K a
559 K c
560 K c
560 I b
561 I b
561 I sym
562 I sym
562
563
563 Diff specific revision
564 Diff specific revision
564
565
565 $ hg diff --rev 1
566 $ hg diff --rev 1
566 diff -r ef63ca68695b c
567 diff -r ef63ca68695b c
567 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
568 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
568 +++ b/c * (glob)
569 +++ b/c * (glob)
569 @@ -0,0 +1,3 @@
570 @@ -0,0 +1,3 @@
570 +expand $Id$
571 +expand $Id$
571 +do not process $Id:
572 +do not process $Id:
572 +xxx $
573 +xxx $
573
574
574 Status after rollback:
575 Status after rollback:
575
576
576 $ hg rollback
577 $ hg rollback
577 rolling back to revision 1 (undo commit)
578 rolling back to revision 1 (undo commit)
578 $ hg status
579 $ hg status
579 A c
580 A c
580 $ hg update --clean
581 $ hg update --clean
581 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
582 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
582
583
583 Custom keywordmaps as argument to kwdemo
584 Custom keywordmaps as argument to kwdemo
584
585
585 $ hg --quiet kwdemo "Xinfo = {author}: {desc}"
586 $ hg --quiet kwdemo "Xinfo = {author}: {desc}"
586 [extensions]
587 [extensions]
587 keyword =
588 keyword =
588 [keyword]
589 [keyword]
589 ** =
590 ** =
590 b = ignore
591 b = ignore
591 demo.txt =
592 demo.txt =
592 i = ignore
593 i = ignore
593 [keywordmaps]
594 [keywordmaps]
594 Xinfo = {author}: {desc}
595 Xinfo = {author}: {desc}
595 $Xinfo: test: hg keyword configuration and expansion example $
596 $Xinfo: test: hg keyword configuration and expansion example $
596
597
597 Configure custom keywordmaps
598 Configure custom keywordmaps
598
599
599 $ cat <<EOF >>$HGRCPATH
600 $ cat <<EOF >>$HGRCPATH
600 > [keywordmaps]
601 > [keywordmaps]
601 > Id = {file} {node|short} {date|rfc822date} {author|user}
602 > Id = {file} {node|short} {date|rfc822date} {author|user}
602 > Xinfo = {author}: {desc}
603 > Xinfo = {author}: {desc}
603 > EOF
604 > EOF
604
605
605 Cat and hg cat files before custom expansion
606 Cat and hg cat files before custom expansion
606
607
607 $ cat a b
608 $ cat a b
608 expand $Id: a,v ef63ca68695b 1970/01/01 00:00:00 user $
609 expand $Id: a,v ef63ca68695b 1970/01/01 00:00:00 user $
609 do not process $Id:
610 do not process $Id:
610 xxx $
611 xxx $
611 ignore $Id$
612 ignore $Id$
612 $ hg cat sym a b && echo
613 $ hg cat sym a b && echo
613 expand $Id: a ef63ca68695b Thu, 01 Jan 1970 00:00:00 +0000 user $
614 expand $Id: a ef63ca68695b Thu, 01 Jan 1970 00:00:00 +0000 user $
614 do not process $Id:
615 do not process $Id:
615 xxx $
616 xxx $
616 ignore $Id$
617 ignore $Id$
617 a
618 a
618
619
619 Write custom keyword and prepare multiline commit message
620 Write custom keyword and prepare multiline commit message
620
621
621 $ echo '$Xinfo$' >> a
622 $ echo '$Xinfo$' >> a
622 $ cat <<EOF >> log
623 $ cat <<EOF >> log
623 > firstline
624 > firstline
624 > secondline
625 > secondline
625 > EOF
626 > EOF
626
627
627 Interrupted commit should not change state
628 Interrupted commit should not change state
628
629
629 $ hg commit
630 $ hg commit
630 abort: empty commit message
631 abort: empty commit message
631 [255]
632 [255]
632 $ hg status
633 $ hg status
633 M a
634 M a
634 ? c
635 ? c
635 ? log
636 ? log
636
637
637 Commit with multiline message and custom expansion
638 Commit with multiline message and custom expansion
638
639
639 $ hg --debug commit -l log -d '2 0' -u 'User Name <user@example.com>'
640 $ hg --debug commit -l log -d '2 0' -u 'User Name <user@example.com>'
640 a
641 a
641 overwriting a expanding keywords
642 overwriting a expanding keywords
642 committed changeset 2:bb948857c743469b22bbf51f7ec8112279ca5d83
643 committed changeset 2:bb948857c743469b22bbf51f7ec8112279ca5d83
643 $ rm log
644 $ rm log
644
645
645 Stat, verify and show custom expansion (firstline)
646 Stat, verify and show custom expansion (firstline)
646
647
647 $ hg status
648 $ hg status
648 ? c
649 ? c
649 $ hg verify
650 $ hg verify
650 checking changesets
651 checking changesets
651 checking manifests
652 checking manifests
652 crosschecking files in changesets and manifests
653 crosschecking files in changesets and manifests
653 checking files
654 checking files
654 3 files, 3 changesets, 4 total revisions
655 3 files, 3 changesets, 4 total revisions
655 $ cat a b
656 $ cat a b
656 expand $Id: a bb948857c743 Thu, 01 Jan 1970 00:00:02 +0000 user $
657 expand $Id: a bb948857c743 Thu, 01 Jan 1970 00:00:02 +0000 user $
657 do not process $Id:
658 do not process $Id:
658 xxx $
659 xxx $
659 $Xinfo: User Name <user@example.com>: firstline $
660 $Xinfo: User Name <user@example.com>: firstline $
660 ignore $Id$
661 ignore $Id$
661 $ hg cat sym a b && echo
662 $ hg cat sym a b && echo
662 expand $Id: a bb948857c743 Thu, 01 Jan 1970 00:00:02 +0000 user $
663 expand $Id: a bb948857c743 Thu, 01 Jan 1970 00:00:02 +0000 user $
663 do not process $Id:
664 do not process $Id:
664 xxx $
665 xxx $
665 $Xinfo: User Name <user@example.com>: firstline $
666 $Xinfo: User Name <user@example.com>: firstline $
666 ignore $Id$
667 ignore $Id$
667 a
668 a
668
669
669 annotate
670 annotate
670
671
671 $ hg annotate a
672 $ hg annotate a
672 1: expand $Id$
673 1: expand $Id$
673 1: do not process $Id:
674 1: do not process $Id:
674 1: xxx $
675 1: xxx $
675 2: $Xinfo$
676 2: $Xinfo$
676
677
677 remove with status checks
678 remove with status checks
678
679
679 $ hg debugrebuildstate
680 $ hg debugrebuildstate
680 $ hg remove a
681 $ hg remove a
681 $ hg --debug commit -m rma
682 $ hg --debug commit -m rma
682 committed changeset 3:d14c712653769de926994cf7fbb06c8fbd68f012
683 committed changeset 3:d14c712653769de926994cf7fbb06c8fbd68f012
683 $ hg status
684 $ hg status
684 ? c
685 ? c
685
686
686 Rollback, revert, and check expansion
687 Rollback, revert, and check expansion
687
688
688 $ hg rollback
689 $ hg rollback
689 rolling back to revision 2 (undo commit)
690 rolling back to revision 2 (undo commit)
690 $ hg status
691 $ hg status
691 R a
692 R a
692 ? c
693 ? c
693 $ hg revert --no-backup --rev tip a
694 $ hg revert --no-backup --rev tip a
694 $ cat a
695 $ cat a
695 expand $Id: a bb948857c743 Thu, 01 Jan 1970 00:00:02 +0000 user $
696 expand $Id: a bb948857c743 Thu, 01 Jan 1970 00:00:02 +0000 user $
696 do not process $Id:
697 do not process $Id:
697 xxx $
698 xxx $
698 $Xinfo: User Name <user@example.com>: firstline $
699 $Xinfo: User Name <user@example.com>: firstline $
699
700
700 Clone to test global and local configurations
701 Clone to test global and local configurations
701
702
702 $ cd ..
703 $ cd ..
703
704
704 Expansion in destinaton with global configuration
705 Expansion in destinaton with global configuration
705
706
706 $ hg --quiet clone Test globalconf
707 $ hg --quiet clone Test globalconf
707 $ cat globalconf/a
708 $ cat globalconf/a
708 expand $Id: a bb948857c743 Thu, 01 Jan 1970 00:00:02 +0000 user $
709 expand $Id: a bb948857c743 Thu, 01 Jan 1970 00:00:02 +0000 user $
709 do not process $Id:
710 do not process $Id:
710 xxx $
711 xxx $
711 $Xinfo: User Name <user@example.com>: firstline $
712 $Xinfo: User Name <user@example.com>: firstline $
712
713
713 No expansion in destination with local configuration in origin only
714 No expansion in destination with local configuration in origin only
714
715
715 $ hg --quiet --config 'keyword.**=ignore' clone Test localconf
716 $ hg --quiet --config 'keyword.**=ignore' clone Test localconf
716 $ cat localconf/a
717 $ cat localconf/a
717 expand $Id$
718 expand $Id$
718 do not process $Id:
719 do not process $Id:
719 xxx $
720 xxx $
720 $Xinfo$
721 $Xinfo$
721
722
722 Clone to test incoming
723 Clone to test incoming
723
724
724 $ hg clone -r1 Test Test-a
725 $ hg clone -r1 Test Test-a
725 requesting all changes
726 requesting all changes
726 adding changesets
727 adding changesets
727 adding manifests
728 adding manifests
728 adding file changes
729 adding file changes
729 added 2 changesets with 3 changes to 3 files
730 added 2 changesets with 3 changes to 3 files
730 updating to branch default
731 updating to branch default
731 3 files updated, 0 files merged, 0 files removed, 0 files unresolved
732 3 files updated, 0 files merged, 0 files removed, 0 files unresolved
732 $ cd Test-a
733 $ cd Test-a
733 $ cat <<EOF >> .hg/hgrc
734 $ cat <<EOF >> .hg/hgrc
734 > [paths]
735 > [paths]
735 > default = ../Test
736 > default = ../Test
736 > EOF
737 > EOF
737 $ hg incoming
738 $ hg incoming
738 comparing with $TESTTMP/Test
739 comparing with $TESTTMP/Test
739 searching for changes
740 searching for changes
740 changeset: 2:bb948857c743
741 changeset: 2:bb948857c743
741 tag: tip
742 tag: tip
742 user: User Name <user@example.com>
743 user: User Name <user@example.com>
743 date: Thu Jan 01 00:00:02 1970 +0000
744 date: Thu Jan 01 00:00:02 1970 +0000
744 summary: firstline
745 summary: firstline
745
746
746 Imported patch should not be rejected
747 Imported patch should not be rejected
747
748
748 $ python -c \
749 $ python -c \
749 > 'import re; s=re.sub("(Id.*)","\\1 rejecttest",open("a").read()); open("a","wb").write(s);'
750 > 'import re; s=re.sub("(Id.*)","\\1 rejecttest",open("a").read()); open("a","wb").write(s);'
750 $ hg --debug commit -m'rejects?' -d '3 0' -u 'User Name <user@example.com>'
751 $ hg --debug commit -m'rejects?' -d '3 0' -u 'User Name <user@example.com>'
751 a
752 a
752 overwriting a expanding keywords
753 overwriting a expanding keywords
753 committed changeset 2:85e279d709ffc28c9fdd1b868570985fc3d87082
754 committed changeset 2:85e279d709ffc28c9fdd1b868570985fc3d87082
754 $ hg export -o ../rejecttest.diff tip
755 $ hg export -o ../rejecttest.diff tip
755 $ cd ../Test
756 $ cd ../Test
756 $ hg import ../rejecttest.diff
757 $ hg import ../rejecttest.diff
757 applying ../rejecttest.diff
758 applying ../rejecttest.diff
758 $ cat a b
759 $ cat a b
759 expand $Id: a 4e0994474d25 Thu, 01 Jan 1970 00:00:03 +0000 user $ rejecttest
760 expand $Id: a 4e0994474d25 Thu, 01 Jan 1970 00:00:03 +0000 user $ rejecttest
760 do not process $Id: rejecttest
761 do not process $Id: rejecttest
761 xxx $
762 xxx $
762 $Xinfo: User Name <user@example.com>: rejects? $
763 $Xinfo: User Name <user@example.com>: rejects? $
763 ignore $Id$
764 ignore $Id$
764
765
765 $ hg rollback
766 $ hg rollback
766 rolling back to revision 2 (undo commit)
767 rolling back to revision 2 (undo commit)
767 $ hg update --clean
768 $ hg update --clean
768 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
769 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
769
770
770 kwexpand/kwshrink on selected files
771 kwexpand/kwshrink on selected files
771
772
772 $ mkdir x
773 $ mkdir x
773 $ hg copy a x/a
774 $ hg copy a x/a
774 $ hg --verbose kwexpand a
775 $ hg --verbose kwexpand a
775 overwriting a expanding keywords
776 overwriting a expanding keywords
776
777
777 kwexpand x/a should abort
778 kwexpand x/a should abort
778
779
779 $ hg --verbose kwexpand x/a
780 $ hg --verbose kwexpand x/a
780 abort: outstanding uncommitted changes
781 abort: outstanding uncommitted changes
781 [255]
782 [255]
782 $ cd x
783 $ cd x
783 $ hg --debug commit -m xa -d '3 0' -u 'User Name <user@example.com>'
784 $ hg --debug commit -m xa -d '3 0' -u 'User Name <user@example.com>'
784 x/a
785 x/a
785 x/a: copy a:779c764182ce5d43e2b1eb66ce06d7b47bfe342e
786 x/a: copy a:779c764182ce5d43e2b1eb66ce06d7b47bfe342e
786 overwriting x/a expanding keywords
787 overwriting x/a expanding keywords
787 committed changeset 3:b4560182a3f9a358179fd2d835c15e9da379c1e4
788 committed changeset 3:b4560182a3f9a358179fd2d835c15e9da379c1e4
788 $ cat a
789 $ cat a
789 expand $Id: x/a b4560182a3f9 Thu, 01 Jan 1970 00:00:03 +0000 user $
790 expand $Id: x/a b4560182a3f9 Thu, 01 Jan 1970 00:00:03 +0000 user $
790 do not process $Id:
791 do not process $Id:
791 xxx $
792 xxx $
792 $Xinfo: User Name <user@example.com>: xa $
793 $Xinfo: User Name <user@example.com>: xa $
793
794
794 kwshrink a inside directory x
795 kwshrink a inside directory x
795
796
796 $ hg --verbose kwshrink a
797 $ hg --verbose kwshrink a
797 overwriting x/a shrinking keywords
798 overwriting x/a shrinking keywords
798 $ cat a
799 $ cat a
799 expand $Id$
800 expand $Id$
800 do not process $Id:
801 do not process $Id:
801 xxx $
802 xxx $
802 $Xinfo$
803 $Xinfo$
803 $ cd ..
804 $ cd ..
804
805
805 kwexpand nonexistent
806 kwexpand nonexistent
806
807
807 $ hg kwexpand nonexistent
808 $ hg kwexpand nonexistent
808 nonexistent:* (glob)
809 nonexistent:* (glob)
809
810
810
811
811 hg serve
812 hg serve
812 - expand with hgweb file
813 - expand with hgweb file
813 - no expansion with hgweb annotate/changeset/filediff
814 - no expansion with hgweb annotate/changeset/filediff
814 - check errors
815 - check errors
815
816
816 $ hg serve -p $HGPORT -d --pid-file=hg.pid -A access.log -E errors.log
817 $ hg serve -p $HGPORT -d --pid-file=hg.pid -A access.log -E errors.log
817 $ cat hg.pid >> $DAEMON_PIDS
818 $ cat hg.pid >> $DAEMON_PIDS
818 $ $TESTDIR/get-with-headers.py localhost:$HGPORT '/file/tip/a/?style=raw'
819 $ $TESTDIR/get-with-headers.py localhost:$HGPORT '/file/tip/a/?style=raw'
819 200 Script output follows
820 200 Script output follows
820
821
821 expand $Id: a bb948857c743 Thu, 01 Jan 1970 00:00:02 +0000 user $
822 expand $Id: a bb948857c743 Thu, 01 Jan 1970 00:00:02 +0000 user $
822 do not process $Id:
823 do not process $Id:
823 xxx $
824 xxx $
824 $Xinfo: User Name <user@example.com>: firstline $
825 $Xinfo: User Name <user@example.com>: firstline $
825 $ $TESTDIR/get-with-headers.py localhost:$HGPORT '/annotate/tip/a/?style=raw'
826 $ $TESTDIR/get-with-headers.py localhost:$HGPORT '/annotate/tip/a/?style=raw'
826 200 Script output follows
827 200 Script output follows
827
828
828
829
829 user@1: expand $Id$
830 user@1: expand $Id$
830 user@1: do not process $Id:
831 user@1: do not process $Id:
831 user@1: xxx $
832 user@1: xxx $
832 user@2: $Xinfo$
833 user@2: $Xinfo$
833
834
834
835
835
836
836
837
837 $ $TESTDIR/get-with-headers.py localhost:$HGPORT '/rev/tip/?style=raw'
838 $ $TESTDIR/get-with-headers.py localhost:$HGPORT '/rev/tip/?style=raw'
838 200 Script output follows
839 200 Script output follows
839
840
840
841
841 # HG changeset patch
842 # HG changeset patch
842 # User User Name <user@example.com>
843 # User User Name <user@example.com>
843 # Date 3 0
844 # Date 3 0
844 # Node ID b4560182a3f9a358179fd2d835c15e9da379c1e4
845 # Node ID b4560182a3f9a358179fd2d835c15e9da379c1e4
845 # Parent bb948857c743469b22bbf51f7ec8112279ca5d83
846 # Parent bb948857c743469b22bbf51f7ec8112279ca5d83
846 xa
847 xa
847
848
848 diff -r bb948857c743 -r b4560182a3f9 x/a
849 diff -r bb948857c743 -r b4560182a3f9 x/a
849 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
850 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
850 +++ b/x/a Thu Jan 01 00:00:03 1970 +0000
851 +++ b/x/a Thu Jan 01 00:00:03 1970 +0000
851 @@ -0,0 +1,4 @@
852 @@ -0,0 +1,4 @@
852 +expand $Id$
853 +expand $Id$
853 +do not process $Id:
854 +do not process $Id:
854 +xxx $
855 +xxx $
855 +$Xinfo$
856 +$Xinfo$
856
857
857 $ $TESTDIR/get-with-headers.py localhost:$HGPORT '/diff/bb948857c743/a?style=raw'
858 $ $TESTDIR/get-with-headers.py localhost:$HGPORT '/diff/bb948857c743/a?style=raw'
858 200 Script output follows
859 200 Script output follows
859
860
860
861
861 diff -r ef63ca68695b -r bb948857c743 a
862 diff -r ef63ca68695b -r bb948857c743 a
862 --- a/a Thu Jan 01 00:00:00 1970 +0000
863 --- a/a Thu Jan 01 00:00:00 1970 +0000
863 +++ b/a Thu Jan 01 00:00:02 1970 +0000
864 +++ b/a Thu Jan 01 00:00:02 1970 +0000
864 @@ -1,3 +1,4 @@
865 @@ -1,3 +1,4 @@
865 expand $Id$
866 expand $Id$
866 do not process $Id:
867 do not process $Id:
867 xxx $
868 xxx $
868 +$Xinfo$
869 +$Xinfo$
869
870
870
871
871
872
872
873
873 $ cat errors.log
874 $ cat errors.log
874
875
875 Prepare merge and resolve tests
876 Prepare merge and resolve tests
876
877
877 $ echo '$Id$' > m
878 $ echo '$Id$' > m
878 $ hg add m
879 $ hg add m
879 $ hg commit -m 4kw
880 $ hg commit -m 4kw
880 $ echo foo >> m
881 $ echo foo >> m
881 $ hg commit -m 5foo
882 $ hg commit -m 5foo
882
883
883 simplemerge
884 simplemerge
884
885
885 $ hg update 4
886 $ hg update 4
886 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
887 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
887 $ echo foo >> m
888 $ echo foo >> m
888 $ hg commit -m 6foo
889 $ hg commit -m 6foo
889 created new head
890 created new head
890 $ hg merge
891 $ hg merge
891 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
892 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
892 (branch merge, don't forget to commit)
893 (branch merge, don't forget to commit)
893 $ hg commit -m simplemerge
894 $ hg commit -m simplemerge
894 $ cat m
895 $ cat m
895 $Id: m 27d48ee14f67 Thu, 01 Jan 1970 00:00:00 +0000 test $
896 $Id: m 27d48ee14f67 Thu, 01 Jan 1970 00:00:00 +0000 test $
896 foo
897 foo
897
898
898 conflict: keyword should stay outside conflict zone
899 conflict: keyword should stay outside conflict zone
899
900
900 $ hg update 4
901 $ hg update 4
901 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
902 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
902 $ echo bar >> m
903 $ echo bar >> m
903 $ hg commit -m 8bar
904 $ hg commit -m 8bar
904 created new head
905 created new head
905 $ hg merge
906 $ hg merge
906 merging m
907 merging m
907 warning: conflicts during merge.
908 warning: conflicts during merge.
908 merging m failed!
909 merging m failed!
909 0 files updated, 0 files merged, 0 files removed, 1 files unresolved
910 0 files updated, 0 files merged, 0 files removed, 1 files unresolved
910 use 'hg resolve' to retry unresolved file merges or 'hg update -C .' to abandon
911 use 'hg resolve' to retry unresolved file merges or 'hg update -C .' to abandon
911 [1]
912 [1]
912 $ cat m
913 $ cat m
913 $Id$
914 $Id$
914 <<<<<<< local
915 <<<<<<< local
915 bar
916 bar
916 =======
917 =======
917 foo
918 foo
918 >>>>>>> other
919 >>>>>>> other
919
920
920 resolve to local
921 resolve to local
921
922
922 $ HGMERGE=internal:local hg resolve -a
923 $ HGMERGE=internal:local hg resolve -a
923 $ hg commit -m localresolve
924 $ hg commit -m localresolve
924 $ cat m
925 $ cat m
925 $Id: m 41efa6d38e9b Thu, 01 Jan 1970 00:00:00 +0000 test $
926 $Id: m 41efa6d38e9b Thu, 01 Jan 1970 00:00:00 +0000 test $
926 bar
927 bar
927
928
928 Test restricted mode with transplant -b
929 Test restricted mode with transplant -b
929
930
930 $ hg update 6
931 $ hg update 6
931 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
932 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
932 $ hg branch foo
933 $ hg branch foo
933 marked working directory as branch foo
934 marked working directory as branch foo
934 $ mv a a.bak
935 $ mv a a.bak
935 $ echo foobranch > a
936 $ echo foobranch > a
936 $ cat a.bak >> a
937 $ cat a.bak >> a
937 $ rm a.bak
938 $ rm a.bak
938 $ hg commit -m 9foobranch
939 $ hg commit -m 9foobranch
939 $ hg update default
940 $ hg update default
940 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
941 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
941 $ hg -y transplant -b foo tip
942 $ hg -y transplant -b foo tip
942 applying 4aa30d025d50
943 applying 4aa30d025d50
943 4aa30d025d50 transplanted to 5a4da427c162
944 4aa30d025d50 transplanted to 5a4da427c162
944
945
945 Expansion in changeset but not in file
946 Expansion in changeset but not in file
946
947
947 $ hg tip -p
948 $ hg tip -p
948 changeset: 11:5a4da427c162
949 changeset: 11:5a4da427c162
949 tag: tip
950 tag: tip
950 parent: 9:41efa6d38e9b
951 parent: 9:41efa6d38e9b
951 user: test
952 user: test
952 date: Thu Jan 01 00:00:00 1970 +0000
953 date: Thu Jan 01 00:00:00 1970 +0000
953 summary: 9foobranch
954 summary: 9foobranch
954
955
955 diff -r 41efa6d38e9b -r 5a4da427c162 a
956 diff -r 41efa6d38e9b -r 5a4da427c162 a
956 --- a/a Thu Jan 01 00:00:00 1970 +0000
957 --- a/a Thu Jan 01 00:00:00 1970 +0000
957 +++ b/a Thu Jan 01 00:00:00 1970 +0000
958 +++ b/a Thu Jan 01 00:00:00 1970 +0000
958 @@ -1,3 +1,4 @@
959 @@ -1,3 +1,4 @@
959 +foobranch
960 +foobranch
960 expand $Id$
961 expand $Id$
961 do not process $Id:
962 do not process $Id:
962 xxx $
963 xxx $
963
964
964 $ head -n 2 a
965 $ head -n 2 a
965 foobranch
966 foobranch
966 expand $Id: a 5a4da427c162 Thu, 01 Jan 1970 00:00:00 +0000 test $
967 expand $Id: a 5a4da427c162 Thu, 01 Jan 1970 00:00:00 +0000 test $
967
968
968 Turn off expansion
969 Turn off expansion
969
970
970 $ hg -q rollback
971 $ hg -q rollback
971 $ hg -q update -C
972 $ hg -q update -C
972
973
973 kwshrink with unknown file u
974 kwshrink with unknown file u
974
975
975 $ cp a u
976 $ cp a u
976 $ hg --verbose kwshrink
977 $ hg --verbose kwshrink
977 overwriting a shrinking keywords
978 overwriting a shrinking keywords
978 overwriting m shrinking keywords
979 overwriting m shrinking keywords
979 overwriting x/a shrinking keywords
980 overwriting x/a shrinking keywords
980
981
981 Keywords shrunk in working directory, but not yet disabled
982 Keywords shrunk in working directory, but not yet disabled
982 - cat shows unexpanded keywords
983 - cat shows unexpanded keywords
983 - hg cat shows expanded keywords
984 - hg cat shows expanded keywords
984
985
985 $ cat a b
986 $ cat a b
986 expand $Id$
987 expand $Id$
987 do not process $Id:
988 do not process $Id:
988 xxx $
989 xxx $
989 $Xinfo$
990 $Xinfo$
990 ignore $Id$
991 ignore $Id$
991 $ hg cat sym a b && echo
992 $ hg cat sym a b && echo
992 expand $Id: a bb948857c743 Thu, 01 Jan 1970 00:00:02 +0000 user $
993 expand $Id: a bb948857c743 Thu, 01 Jan 1970 00:00:02 +0000 user $
993 do not process $Id:
994 do not process $Id:
994 xxx $
995 xxx $
995 $Xinfo: User Name <user@example.com>: firstline $
996 $Xinfo: User Name <user@example.com>: firstline $
996 ignore $Id$
997 ignore $Id$
997 a
998 a
998
999
999 Now disable keyword expansion
1000 Now disable keyword expansion
1000
1001
1001 $ rm "$HGRCPATH"
1002 $ rm "$HGRCPATH"
1002 $ cat a b
1003 $ cat a b
1003 expand $Id$
1004 expand $Id$
1004 do not process $Id:
1005 do not process $Id:
1005 xxx $
1006 xxx $
1006 $Xinfo$
1007 $Xinfo$
1007 ignore $Id$
1008 ignore $Id$
1008 $ hg cat sym a b && echo
1009 $ hg cat sym a b && echo
1009 expand $Id$
1010 expand $Id$
1010 do not process $Id:
1011 do not process $Id:
1011 xxx $
1012 xxx $
1012 $Xinfo$
1013 $Xinfo$
1013 ignore $Id$
1014 ignore $Id$
1014 a
1015 a
General Comments 0
You need to be logged in to leave comments. Login now