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