##// END OF EJS Templates
keyword: thorough hgweb testing...
Christian Ebert -
r6927:959113c5 default
parent child Browse files
Show More
@@ -1,312 +1,318 b''
1 #!/bin/sh
1 #!/bin/sh
2
2
3 cat <<EOF >> $HGRCPATH
3 cat <<EOF >> $HGRCPATH
4 [extensions]
4 [extensions]
5 hgext.keyword =
5 hgext.keyword =
6 hgext.mq =
6 hgext.mq =
7 hgext.notify =
7 hgext.notify =
8 [keyword]
8 [keyword]
9 * =
9 * =
10 b = ignore
10 b = ignore
11 [hooks]
11 [hooks]
12 commit=
12 commit=
13 commit.test=cp a hooktest
13 commit.test=cp a hooktest
14 EOF
14 EOF
15
15
16 echo % help
16 echo % help
17 hg help keyword
17 hg help keyword
18
18
19 echo % hg kwdemo
19 echo % hg kwdemo
20 hg --quiet kwdemo --default \
20 hg --quiet kwdemo --default \
21 | sed -e 's![^ ][^ ]*demo.txt,v!/TMP/demo.txt,v!' \
21 | sed -e 's![^ ][^ ]*demo.txt,v!/TMP/demo.txt,v!' \
22 -e 's/,v [a-z0-9][a-z0-9]* /,v xxxxxxxxxxxx /' \
22 -e 's/,v [a-z0-9][a-z0-9]* /,v xxxxxxxxxxxx /' \
23 -e '/[$]Revision/ s/: [a-z0-9][a-z0-9]* /: xxxxxxxxxxxx /' \
23 -e '/[$]Revision/ s/: [a-z0-9][a-z0-9]* /: xxxxxxxxxxxx /' \
24 -e 's! 20[0-9][0-9]/[01][0-9]/[0-3][0-9] [0-2][0-9]:[0-6][0-9]:[0-6][0-9]! 2000/00/00 00:00:00!'
24 -e 's! 20[0-9][0-9]/[01][0-9]/[0-3][0-9] [0-2][0-9]:[0-6][0-9]:[0-6][0-9]! 2000/00/00 00:00:00!'
25
25
26 hg --quiet kwdemo "Branch = {branches}"
26 hg --quiet kwdemo "Branch = {branches}"
27
27
28 hg init Test-bndl
28 hg init Test-bndl
29 cd Test-bndl
29 cd Test-bndl
30
30
31 echo % kwshrink should exit silently in empty/invalid repo
31 echo % kwshrink should exit silently in empty/invalid repo
32 hg kwshrink
32 hg kwshrink
33
33
34 # Symlinks cannot be created on Windows. The bundle was made with:
34 # Symlinks cannot be created on Windows. The bundle was made with:
35 #
35 #
36 # hg init t
36 # hg init t
37 # cd t
37 # cd t
38 # echo a > a
38 # echo a > a
39 # ln -s a sym
39 # ln -s a sym
40 # hg add sym
40 # hg add sym
41 # hg ci -m addsym -u mercurial
41 # hg ci -m addsym -u mercurial
42 # hg bundle --base null ../test-keyword.hg
42 # hg bundle --base null ../test-keyword.hg
43 #
43 #
44 hg pull -u "$TESTDIR/test-keyword.hg" \
44 hg pull -u "$TESTDIR/test-keyword.hg" \
45 | sed 's/pulling from.*test-keyword.hg/pulling from test-keyword.hg/'
45 | sed 's/pulling from.*test-keyword.hg/pulling from test-keyword.hg/'
46
46
47 echo 'expand $Id$' > a
47 echo 'expand $Id$' > a
48 echo 'do not process $Id:' >> a
48 echo 'do not process $Id:' >> a
49 echo 'xxx $' >> a
49 echo 'xxx $' >> a
50 echo 'ignore $Id$' > b
50 echo 'ignore $Id$' > b
51 echo % cat
51 echo % cat
52 cat a b
52 cat a b
53
53
54 echo % addremove
54 echo % addremove
55 hg addremove
55 hg addremove
56 echo % status
56 echo % status
57 hg status
57 hg status
58
58
59 echo % default keyword expansion including commit hook
59 echo % default keyword expansion including commit hook
60 echo % interrupted commit should not change state or run commit hook
60 echo % interrupted commit should not change state or run commit hook
61 hg --debug commit
61 hg --debug commit
62 echo % status
62 echo % status
63 hg status
63 hg status
64
64
65 echo % commit
65 echo % commit
66 hg --debug commit -mabsym -d '0 0' -u 'User Name <user@example.com>'
66 hg --debug commit -mabsym -d '0 0' -u 'User Name <user@example.com>'
67 echo % status
67 echo % status
68 hg status
68 hg status
69 echo % identify
69 echo % identify
70 hg debugrebuildstate
70 hg debugrebuildstate
71 hg --quiet identify
71 hg --quiet identify
72 echo % cat
72 echo % cat
73 cat a b
73 cat a b
74 echo % hg cat
74 echo % hg cat
75 hg cat sym a b
75 hg cat sym a b
76
76
77 echo
77 echo
78 echo % diff a hooktest
78 echo % diff a hooktest
79 diff a hooktest
79 diff a hooktest
80
80
81 echo % removing commit hook from config
81 echo % removing commit hook from config
82 sed -e '/\[hooks\]/,$ d' $HGRCPATH > $HGRCPATH.nohook
82 sed -e '/\[hooks\]/,$ d' $HGRCPATH > $HGRCPATH.nohook
83 mv $HGRCPATH.nohook $HGRCPATH
83 mv $HGRCPATH.nohook $HGRCPATH
84 rm hooktest
84 rm hooktest
85
85
86 echo % bundle
86 echo % bundle
87 hg bundle --base null ../kw.hg
87 hg bundle --base null ../kw.hg
88
88
89 cd ..
89 cd ..
90 hg init Test
90 hg init Test
91 cd Test
91 cd Test
92
92
93 echo % notify on pull to check whether keywords stay as is in email
93 echo % notify on pull to check whether keywords stay as is in email
94 echo % ie. if patch.diff wrapper acts as it should
94 echo % ie. if patch.diff wrapper acts as it should
95
95
96 cat <<EOF >> $HGRCPATH
96 cat <<EOF >> $HGRCPATH
97 [hooks]
97 [hooks]
98 incoming.notify = python:hgext.notify.hook
98 incoming.notify = python:hgext.notify.hook
99 [notify]
99 [notify]
100 sources = pull
100 sources = pull
101 diffstat = False
101 diffstat = False
102 [reposubs]
102 [reposubs]
103 * = Test
103 * = Test
104 EOF
104 EOF
105
105
106 echo % pull from bundle
106 echo % pull from bundle
107 hg pull -u ../kw.hg 2>&1 | sed -e '/^Date:/,/^diffs (/ d'
107 hg pull -u ../kw.hg 2>&1 | sed -e '/^Date:/,/^diffs (/ d'
108
108
109 echo % remove notify config
109 echo % remove notify config
110 sed -e '/\[hooks\]/,$ d' $HGRCPATH > $HGRCPATH.nonotify
110 sed -e '/\[hooks\]/,$ d' $HGRCPATH > $HGRCPATH.nonotify
111 mv $HGRCPATH.nonotify $HGRCPATH
111 mv $HGRCPATH.nonotify $HGRCPATH
112
112
113 echo % touch
113 echo % touch
114 touch a b
114 touch a b
115 echo % status
115 echo % status
116 hg status
116 hg status
117
117
118 rm sym a b
118 rm sym a b
119 echo % update
119 echo % update
120 hg update
120 hg update
121 echo % cat
121 echo % cat
122 cat a b
122 cat a b
123
123
124 echo % check whether expansion is filewise
124 echo % check whether expansion is filewise
125 echo '$Id$' > c
125 echo '$Id$' > c
126 echo 'tests for different changenodes' >> c
126 echo 'tests for different changenodes' >> c
127 echo % commit c
127 echo % commit c
128 hg commit -A -mcndiff -d '1 0' -u 'User Name <user@example.com>'
128 hg commit -A -mcndiff -d '1 0' -u 'User Name <user@example.com>'
129 echo % force expansion
129 echo % force expansion
130 hg -v kwexpand
130 hg -v kwexpand
131 echo % compare changenodes in a c
131 echo % compare changenodes in a c
132 cat a c
132 cat a c
133
133
134 echo % qinit -c
134 echo % qinit -c
135 hg qinit -c
135 hg qinit -c
136 echo % qimport
136 echo % qimport
137 hg qimport -r tip -n mqtest.diff
137 hg qimport -r tip -n mqtest.diff
138 echo % qcommit
138 echo % qcommit
139 hg qcommit -mqtest
139 hg qcommit -mqtest
140 echo % keywords should not be expanded in patch
140 echo % keywords should not be expanded in patch
141 cat .hg/patches/mqtest.diff
141 cat .hg/patches/mqtest.diff
142 echo % qpop
142 echo % qpop
143 hg qpop
143 hg qpop
144 echo % qgoto - should imply qpush
144 echo % qgoto - should imply qpush
145 hg qgoto mqtest.diff
145 hg qgoto mqtest.diff
146 echo % cat
146 echo % cat
147 cat c
147 cat c
148 echo % qpop and move on
148 echo % qpop and move on
149 hg qpop
149 hg qpop
150
150
151 echo % copy
151 echo % copy
152 hg cp a c
152 hg cp a c
153
153
154 echo % kwfiles added
154 echo % kwfiles added
155 hg kwfiles
155 hg kwfiles
156
156
157 echo % commit
157 echo % commit
158 hg --debug commit -ma2c -d '1 0' -u 'User Name <user@example.com>'
158 hg --debug commit -ma2c -d '1 0' -u 'User Name <user@example.com>'
159 echo % cat a c
159 echo % cat a c
160 cat a c
160 cat a c
161 echo % touch copied c
161 echo % touch copied c
162 touch c
162 touch c
163 echo % status
163 echo % status
164 hg status
164 hg status
165
165
166 echo % kwfiles
166 echo % kwfiles
167 hg kwfiles
167 hg kwfiles
168
168
169 echo % diff --rev
169 echo % diff --rev
170 hg diff --rev 1 | grep -v 'b/c'
170 hg diff --rev 1 | grep -v 'b/c'
171
171
172 echo % rollback
172 echo % rollback
173 hg rollback
173 hg rollback
174 echo % status
174 echo % status
175 hg status
175 hg status
176 echo % update -C
176 echo % update -C
177 hg update --clean
177 hg update --clean
178
178
179 echo % custom keyword expansion
179 echo % custom keyword expansion
180 echo % try with kwdemo
180 echo % try with kwdemo
181 hg --quiet kwdemo "Xinfo = {author}: {desc}"
181 hg --quiet kwdemo "Xinfo = {author}: {desc}"
182
182
183 cat <<EOF >>$HGRCPATH
183 cat <<EOF >>$HGRCPATH
184 [keywordmaps]
184 [keywordmaps]
185 Id = {file} {node|short} {date|rfc822date} {author|user}
185 Id = {file} {node|short} {date|rfc822date} {author|user}
186 Xinfo = {author}: {desc}
186 Xinfo = {author}: {desc}
187 EOF
187 EOF
188
188
189 echo % cat
189 echo % cat
190 cat a b
190 cat a b
191 echo % hg cat
191 echo % hg cat
192 hg cat sym a b
192 hg cat sym a b
193
193
194 echo
194 echo
195 echo '$Xinfo$' >> a
195 echo '$Xinfo$' >> a
196 cat <<EOF >> log
196 cat <<EOF >> log
197 firstline
197 firstline
198 secondline
198 secondline
199 EOF
199 EOF
200
200
201 echo % interrupted commit should not change state
201 echo % interrupted commit should not change state
202 hg commit
202 hg commit
203 echo % status
203 echo % status
204 hg status
204 hg status
205
205
206 echo % commit
206 echo % commit
207 hg --debug commit -l log -d '2 0' -u 'User Name <user@example.com>'
207 hg --debug commit -l log -d '2 0' -u 'User Name <user@example.com>'
208 rm log
208 rm log
209 echo % status
209 echo % status
210 hg status
210 hg status
211 echo % verify
211 echo % verify
212 hg verify
212 hg verify
213
213
214 echo % cat
214 echo % cat
215 cat a b
215 cat a b
216 echo % hg cat
216 echo % hg cat
217 hg cat sym a b
217 hg cat sym a b
218 echo
218 echo
219 echo % annotate
219 echo % annotate
220 hg annotate a
220 hg annotate a
221
221
222 echo % remove
222 echo % remove
223 hg debugrebuildstate
223 hg debugrebuildstate
224 hg remove a
224 hg remove a
225 hg --debug commit -m rma
225 hg --debug commit -m rma
226 echo % status
226 echo % status
227 hg status
227 hg status
228 echo % rollback
228 echo % rollback
229 hg rollback
229 hg rollback
230 echo % status
230 echo % status
231 hg status
231 hg status
232 echo % revert a
232 echo % revert a
233 hg revert --no-backup --rev tip a
233 hg revert --no-backup --rev tip a
234 echo % cat a
234 echo % cat a
235 cat a
235 cat a
236
236
237 echo % clone to test incoming
237 echo % clone to test incoming
238 cd ..
238 cd ..
239 hg clone -r1 Test Test-a
239 hg clone -r1 Test Test-a
240 cd Test-a
240 cd Test-a
241 cat <<EOF >> .hg/hgrc
241 cat <<EOF >> .hg/hgrc
242 [paths]
242 [paths]
243 default = ../Test
243 default = ../Test
244 EOF
244 EOF
245 echo % incoming
245 echo % incoming
246 # remove path to temp dir
246 # remove path to temp dir
247 hg incoming | sed -e 's/^\(comparing with \).*\(test-keyword.*\)/\1\2/'
247 hg incoming | sed -e 's/^\(comparing with \).*\(test-keyword.*\)/\1\2/'
248
248
249 sed -e 's/Id.*/& rejecttest/' a > a.new
249 sed -e 's/Id.*/& rejecttest/' a > a.new
250 mv a.new a
250 mv a.new a
251 echo % commit rejecttest
251 echo % commit rejecttest
252 hg --debug commit -m'rejects?' -d '3 0' -u 'User Name <user@example.com>'
252 hg --debug commit -m'rejects?' -d '3 0' -u 'User Name <user@example.com>'
253 echo % export
253 echo % export
254 hg export -o ../rejecttest.diff tip
254 hg export -o ../rejecttest.diff tip
255
255
256 cd ../Test
256 cd ../Test
257 echo % import
257 echo % import
258 hg import ../rejecttest.diff
258 hg import ../rejecttest.diff
259 echo % cat
259 echo % cat
260 cat a b
260 cat a b
261 echo
261 echo
262 echo % rollback
262 echo % rollback
263 hg rollback
263 hg rollback
264 echo % clean update
264 echo % clean update
265 hg update --clean
265 hg update --clean
266
266
267 echo % kwexpand/kwshrink on selected files
267 echo % kwexpand/kwshrink on selected files
268 mkdir x
268 mkdir x
269 echo % copy a x/a
269 echo % copy a x/a
270 hg copy a x/a
270 hg copy a x/a
271 echo % kwexpand a
271 echo % kwexpand a
272 hg --verbose kwexpand a
272 hg --verbose kwexpand a
273 echo % kwexpand x/a should abort
273 echo % kwexpand x/a should abort
274 hg --verbose kwexpand x/a
274 hg --verbose kwexpand x/a
275 cd x
275 cd x
276 hg --debug commit -m xa -d '3 0' -u 'User Name <user@example.com>'
276 hg --debug commit -m xa -d '3 0' -u 'User Name <user@example.com>'
277 echo % cat a
277 echo % cat a
278 cat a
278 cat a
279 echo % kwshrink a inside directory x
279 echo % kwshrink a inside directory x
280 hg --verbose kwshrink a
280 hg --verbose kwshrink a
281 echo % cat a
281 echo % cat a
282 cat a
282 cat a
283 cd ..
283 cd ..
284
284
285 echo % kwexpand nonexistent
285 echo % kwexpand nonexistent
286 hg kwexpand nonexistent 2>&1 | sed 's/nonexistent:.*/nonexistent:/'
286 hg kwexpand nonexistent 2>&1 | sed 's/nonexistent:.*/nonexistent:/'
287
287
288 echo % hg serve
289 hg serve -p $HGPORT -d --pid-file=hg.pid -A access.log -E errors.log
290 cat hg.pid >> $DAEMON_PIDS
291 echo % expansion
292 echo % hgweb file
293 ("$TESTDIR/get-with-headers.py" localhost:$HGPORT '/file/tip/a/?style=raw')
294 echo % no expansion
295 echo % hgweb annotate
296 ("$TESTDIR/get-with-headers.py" localhost:$HGPORT '/annotate/tip/a/?style=raw')
297 echo % hgweb changeset
298 ("$TESTDIR/get-with-headers.py" localhost:$HGPORT '/rev/tip/?style=raw')
299 echo % hgweb filediff
300 ("$TESTDIR/get-with-headers.py" localhost:$HGPORT '/diff/bb948857c743/a?style=raw')
301 echo % errors encountered
302 cat errors.log
303
288 echo % switch off expansion
304 echo % switch off expansion
289 echo % kwshrink with unknown file u
305 echo % kwshrink with unknown file u
290 cp a u
306 cp a u
291 hg --verbose kwshrink
307 hg --verbose kwshrink
292 echo % cat
308 echo % cat
293 cat a b
309 cat a b
294 echo % hg cat
310 echo % hg cat
295 hg cat sym a b
311 hg cat sym a b
296 echo
312 echo
297 rm $HGRCPATH
313 rm $HGRCPATH
298 echo % cat
314 echo % cat
299 cat a b
315 cat a b
300 echo % hg cat
316 echo % hg cat
301 hg cat sym a b
317 hg cat sym a b
302 echo
318 echo
303
304 echo % hg serve
305 hg serve -p $HGPORT -d --pid-file=hg.pid -A access.log -E errors.log
306 cat hg.pid >> $DAEMON_PIDS
307 echo % hgweb changeset
308 ("$TESTDIR/get-with-headers.py" localhost:$HGPORT '/rev/tip/?style=raw')
309 echo % hgweb filediff
310 ("$TESTDIR/get-with-headers.py" localhost:$HGPORT '/diff/bb948857c743/a?style=raw')
311 echo % errors encountered
312 cat errors.log
@@ -1,442 +1,463 b''
1 % help
1 % help
2 keyword extension - keyword expansion in local repositories
2 keyword extension - keyword expansion in local repositories
3
3
4 This extension expands RCS/CVS-like or self-customized $Keywords$
4 This extension expands RCS/CVS-like or self-customized $Keywords$
5 in tracked text files selected by your configuration.
5 in tracked text files selected by your configuration.
6
6
7 Keywords are only expanded in local repositories and not stored in
7 Keywords are only expanded in local repositories and not stored in
8 the change history. The mechanism can be regarded as a convenience
8 the change history. The mechanism can be regarded as a convenience
9 for the current user or for archive distribution.
9 for the current user or for archive distribution.
10
10
11 Configuration is done in the [keyword] and [keywordmaps] sections
11 Configuration is done in the [keyword] and [keywordmaps] sections
12 of hgrc files.
12 of hgrc files.
13
13
14 Example:
14 Example:
15
15
16 [keyword]
16 [keyword]
17 # expand keywords in every python file except those matching "x*"
17 # expand keywords in every python file except those matching "x*"
18 **.py =
18 **.py =
19 x* = ignore
19 x* = ignore
20
20
21 Note: the more specific you are in your filename patterns
21 Note: the more specific you are in your filename patterns
22 the less you lose speed in huge repos.
22 the less you lose speed in huge repos.
23
23
24 For [keywordmaps] template mapping and expansion demonstration and
24 For [keywordmaps] template mapping and expansion demonstration and
25 control run "hg kwdemo".
25 control run "hg kwdemo".
26
26
27 An additional date template filter {date|utcdate} is provided.
27 An additional date template filter {date|utcdate} is provided.
28
28
29 The default template mappings (view with "hg kwdemo -d") can be replaced
29 The default template mappings (view with "hg kwdemo -d") can be replaced
30 with customized keywords and templates.
30 with customized keywords and templates.
31 Again, run "hg kwdemo" to control the results of your config changes.
31 Again, run "hg kwdemo" to control the results of your config changes.
32
32
33 Before changing/disabling active keywords, run "hg kwshrink" to avoid
33 Before changing/disabling active keywords, run "hg kwshrink" to avoid
34 the risk of inadvertedly storing expanded keywords in the change history.
34 the risk of inadvertedly storing expanded keywords in the change history.
35
35
36 To force expansion after enabling it, or a configuration change, run
36 To force expansion after enabling it, or a configuration change, run
37 "hg kwexpand".
37 "hg kwexpand".
38
38
39 Also, when committing with the record extension or using mq's qrecord, be aware
39 Also, when committing with the record extension or using mq's qrecord, be aware
40 that keywords cannot be updated. Again, run "hg kwexpand" on the files in
40 that keywords cannot be updated. Again, run "hg kwexpand" on the files in
41 question to update keyword expansions after all changes have been checked in.
41 question to update keyword expansions after all changes have been checked in.
42
42
43 Expansions spanning more than one line and incremental expansions,
43 Expansions spanning more than one line and incremental expansions,
44 like CVS' $Log$, are not supported. A keyword template map
44 like CVS' $Log$, are not supported. A keyword template map
45 "Log = {desc}" expands to the first line of the changeset description.
45 "Log = {desc}" expands to the first line of the changeset description.
46
46
47 list of commands:
47 list of commands:
48
48
49 kwdemo print [keywordmaps] configuration and an expansion example
49 kwdemo print [keywordmaps] configuration and an expansion example
50 kwexpand expand keywords in working directory
50 kwexpand expand keywords in working directory
51 kwfiles print files currently configured for keyword expansion
51 kwfiles print files currently configured for keyword expansion
52 kwshrink revert expanded keywords in working directory
52 kwshrink revert expanded keywords in working directory
53
53
54 use "hg -v help keyword" to show aliases and global options
54 use "hg -v help keyword" to show aliases and global options
55 % hg kwdemo
55 % hg kwdemo
56 [extensions]
56 [extensions]
57 hgext.keyword =
57 hgext.keyword =
58 [keyword]
58 [keyword]
59 * =
59 * =
60 b = ignore
60 b = ignore
61 demo.txt =
61 demo.txt =
62 [keywordmaps]
62 [keywordmaps]
63 RCSFile = {file|basename},v
63 RCSFile = {file|basename},v
64 Author = {author|user}
64 Author = {author|user}
65 Header = {root}/{file},v {node|short} {date|utcdate} {author|user}
65 Header = {root}/{file},v {node|short} {date|utcdate} {author|user}
66 Source = {root}/{file},v
66 Source = {root}/{file},v
67 Date = {date|utcdate}
67 Date = {date|utcdate}
68 Id = {file|basename},v {node|short} {date|utcdate} {author|user}
68 Id = {file|basename},v {node|short} {date|utcdate} {author|user}
69 Revision = {node|short}
69 Revision = {node|short}
70 $RCSFile: demo.txt,v $
70 $RCSFile: demo.txt,v $
71 $Author: test $
71 $Author: test $
72 $Header: /TMP/demo.txt,v xxxxxxxxxxxx 2000/00/00 00:00:00 test $
72 $Header: /TMP/demo.txt,v xxxxxxxxxxxx 2000/00/00 00:00:00 test $
73 $Source: /TMP/demo.txt,v $
73 $Source: /TMP/demo.txt,v $
74 $Date: 2000/00/00 00:00:00 $
74 $Date: 2000/00/00 00:00:00 $
75 $Id: demo.txt,v xxxxxxxxxxxx 2000/00/00 00:00:00 test $
75 $Id: demo.txt,v xxxxxxxxxxxx 2000/00/00 00:00:00 test $
76 $Revision: xxxxxxxxxxxx $
76 $Revision: xxxxxxxxxxxx $
77 [extensions]
77 [extensions]
78 hgext.keyword =
78 hgext.keyword =
79 [keyword]
79 [keyword]
80 * =
80 * =
81 b = ignore
81 b = ignore
82 demo.txt =
82 demo.txt =
83 [keywordmaps]
83 [keywordmaps]
84 Branch = {branches}
84 Branch = {branches}
85 $Branch: demobranch $
85 $Branch: demobranch $
86 % kwshrink should exit silently in empty/invalid repo
86 % kwshrink should exit silently in empty/invalid repo
87 pulling from test-keyword.hg
87 pulling from test-keyword.hg
88 requesting all changes
88 requesting all changes
89 adding changesets
89 adding changesets
90 adding manifests
90 adding manifests
91 adding file changes
91 adding file changes
92 added 1 changesets with 1 changes to 1 files
92 added 1 changesets with 1 changes to 1 files
93 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
93 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
94 % cat
94 % cat
95 expand $Id$
95 expand $Id$
96 do not process $Id:
96 do not process $Id:
97 xxx $
97 xxx $
98 ignore $Id$
98 ignore $Id$
99 % addremove
99 % addremove
100 adding a
100 adding a
101 adding b
101 adding b
102 % status
102 % status
103 A a
103 A a
104 A b
104 A b
105 % default keyword expansion including commit hook
105 % default keyword expansion including commit hook
106 % interrupted commit should not change state or run commit hook
106 % interrupted commit should not change state or run commit hook
107 a
107 a
108 b
108 b
109 transaction abort!
109 transaction abort!
110 rollback completed
110 rollback completed
111 abort: empty commit message
111 abort: empty commit message
112 % status
112 % status
113 A a
113 A a
114 A b
114 A b
115 % commit
115 % commit
116 a
116 a
117 b
117 b
118 overwriting a expanding keywords
118 overwriting a expanding keywords
119 running hook commit.test: cp a hooktest
119 running hook commit.test: cp a hooktest
120 % status
120 % status
121 ? hooktest
121 ? hooktest
122 % identify
122 % identify
123 ef63ca68695b
123 ef63ca68695b
124 % cat
124 % cat
125 expand $Id: a,v ef63ca68695b 1970/01/01 00:00:00 user $
125 expand $Id: a,v ef63ca68695b 1970/01/01 00:00:00 user $
126 do not process $Id:
126 do not process $Id:
127 xxx $
127 xxx $
128 ignore $Id$
128 ignore $Id$
129 % hg cat
129 % hg cat
130 expand $Id: a,v ef63ca68695b 1970/01/01 00:00:00 user $
130 expand $Id: a,v ef63ca68695b 1970/01/01 00:00:00 user $
131 do not process $Id:
131 do not process $Id:
132 xxx $
132 xxx $
133 ignore $Id$
133 ignore $Id$
134 a
134 a
135 % diff a hooktest
135 % diff a hooktest
136 % removing commit hook from config
136 % removing commit hook from config
137 % bundle
137 % bundle
138 2 changesets found
138 2 changesets found
139 % notify on pull to check whether keywords stay as is in email
139 % notify on pull to check whether keywords stay as is in email
140 % ie. if patch.diff wrapper acts as it should
140 % ie. if patch.diff wrapper acts as it should
141 % pull from bundle
141 % pull from bundle
142 pulling from ../kw.hg
142 pulling from ../kw.hg
143 requesting all changes
143 requesting all changes
144 adding changesets
144 adding changesets
145 adding manifests
145 adding manifests
146 adding file changes
146 adding file changes
147 added 2 changesets with 3 changes to 3 files
147 added 2 changesets with 3 changes to 3 files
148
148
149 diff -r 000000000000 -r a2392c293916 sym
149 diff -r 000000000000 -r a2392c293916 sym
150 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
150 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
151 +++ b/sym Sat Feb 09 20:25:47 2008 +0100
151 +++ b/sym Sat Feb 09 20:25:47 2008 +0100
152 @@ -0,0 +1,1 @@
152 @@ -0,0 +1,1 @@
153 +a
153 +a
154 \ No newline at end of file
154 \ No newline at end of file
155
155
156 diff -r a2392c293916 -r ef63ca68695b a
156 diff -r a2392c293916 -r ef63ca68695b a
157 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
157 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
158 +++ b/a Thu Jan 01 00:00:00 1970 +0000
158 +++ b/a Thu Jan 01 00:00:00 1970 +0000
159 @@ -0,0 +1,3 @@
159 @@ -0,0 +1,3 @@
160 +expand $Id$
160 +expand $Id$
161 +do not process $Id:
161 +do not process $Id:
162 +xxx $
162 +xxx $
163 diff -r a2392c293916 -r ef63ca68695b b
163 diff -r a2392c293916 -r ef63ca68695b b
164 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
164 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
165 +++ b/b Thu Jan 01 00:00:00 1970 +0000
165 +++ b/b Thu Jan 01 00:00:00 1970 +0000
166 @@ -0,0 +1,1 @@
166 @@ -0,0 +1,1 @@
167 +ignore $Id$
167 +ignore $Id$
168 3 files updated, 0 files merged, 0 files removed, 0 files unresolved
168 3 files updated, 0 files merged, 0 files removed, 0 files unresolved
169 % remove notify config
169 % remove notify config
170 % touch
170 % touch
171 % status
171 % status
172 % update
172 % update
173 3 files updated, 0 files merged, 0 files removed, 0 files unresolved
173 3 files updated, 0 files merged, 0 files removed, 0 files unresolved
174 % cat
174 % cat
175 expand $Id: a,v ef63ca68695b 1970/01/01 00:00:00 user $
175 expand $Id: a,v ef63ca68695b 1970/01/01 00:00:00 user $
176 do not process $Id:
176 do not process $Id:
177 xxx $
177 xxx $
178 ignore $Id$
178 ignore $Id$
179 % check whether expansion is filewise
179 % check whether expansion is filewise
180 % commit c
180 % commit c
181 adding c
181 adding c
182 % force expansion
182 % force expansion
183 overwriting a expanding keywords
183 overwriting a expanding keywords
184 overwriting c expanding keywords
184 overwriting c expanding keywords
185 % compare changenodes in a c
185 % compare changenodes in a c
186 expand $Id: a,v ef63ca68695b 1970/01/01 00:00:00 user $
186 expand $Id: a,v ef63ca68695b 1970/01/01 00:00:00 user $
187 do not process $Id:
187 do not process $Id:
188 xxx $
188 xxx $
189 $Id: c,v 40a904bbbe4c 1970/01/01 00:00:01 user $
189 $Id: c,v 40a904bbbe4c 1970/01/01 00:00:01 user $
190 tests for different changenodes
190 tests for different changenodes
191 % qinit -c
191 % qinit -c
192 % qimport
192 % qimport
193 % qcommit
193 % qcommit
194 % keywords should not be expanded in patch
194 % keywords should not be expanded in patch
195 # HG changeset patch
195 # HG changeset patch
196 # User User Name <user@example.com>
196 # User User Name <user@example.com>
197 # Date 1 0
197 # Date 1 0
198 # Node ID 40a904bbbe4cd4ab0a1f28411e35db26341a40ad
198 # Node ID 40a904bbbe4cd4ab0a1f28411e35db26341a40ad
199 # Parent ef63ca68695bc9495032c6fda1350c71e6d256e9
199 # Parent ef63ca68695bc9495032c6fda1350c71e6d256e9
200 cndiff
200 cndiff
201
201
202 diff -r ef63ca68695b -r 40a904bbbe4c c
202 diff -r ef63ca68695b -r 40a904bbbe4c c
203 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
203 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
204 +++ b/c Thu Jan 01 00:00:01 1970 +0000
204 +++ b/c Thu Jan 01 00:00:01 1970 +0000
205 @@ -0,0 +1,2 @@
205 @@ -0,0 +1,2 @@
206 +$Id$
206 +$Id$
207 +tests for different changenodes
207 +tests for different changenodes
208 % qpop
208 % qpop
209 Patch queue now empty
209 Patch queue now empty
210 % qgoto - should imply qpush
210 % qgoto - should imply qpush
211 applying mqtest.diff
211 applying mqtest.diff
212 Now at: mqtest.diff
212 Now at: mqtest.diff
213 % cat
213 % cat
214 $Id: c,v 40a904bbbe4c 1970/01/01 00:00:01 user $
214 $Id: c,v 40a904bbbe4c 1970/01/01 00:00:01 user $
215 tests for different changenodes
215 tests for different changenodes
216 % qpop and move on
216 % qpop and move on
217 Patch queue now empty
217 Patch queue now empty
218 % copy
218 % copy
219 % kwfiles added
219 % kwfiles added
220 a
220 a
221 c
221 c
222 % commit
222 % commit
223 c
223 c
224 c: copy a:0045e12f6c5791aac80ca6cbfd97709a88307292
224 c: copy a:0045e12f6c5791aac80ca6cbfd97709a88307292
225 overwriting c expanding keywords
225 overwriting c expanding keywords
226 % cat a c
226 % cat a c
227 expand $Id: a,v ef63ca68695b 1970/01/01 00:00:00 user $
227 expand $Id: a,v ef63ca68695b 1970/01/01 00:00:00 user $
228 do not process $Id:
228 do not process $Id:
229 xxx $
229 xxx $
230 expand $Id: c,v e22d299ac0c2 1970/01/01 00:00:01 user $
230 expand $Id: c,v e22d299ac0c2 1970/01/01 00:00:01 user $
231 do not process $Id:
231 do not process $Id:
232 xxx $
232 xxx $
233 % touch copied c
233 % touch copied c
234 % status
234 % status
235 % kwfiles
235 % kwfiles
236 a
236 a
237 c
237 c
238 % diff --rev
238 % diff --rev
239 diff -r ef63ca68695b c
239 diff -r ef63ca68695b c
240 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
240 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
241 @@ -0,0 +1,3 @@
241 @@ -0,0 +1,3 @@
242 +expand $Id$
242 +expand $Id$
243 +do not process $Id:
243 +do not process $Id:
244 +xxx $
244 +xxx $
245 % rollback
245 % rollback
246 rolling back last transaction
246 rolling back last transaction
247 % status
247 % status
248 A c
248 A c
249 % update -C
249 % update -C
250 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
250 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
251 % custom keyword expansion
251 % custom keyword expansion
252 % try with kwdemo
252 % try with kwdemo
253 [extensions]
253 [extensions]
254 hgext.keyword =
254 hgext.keyword =
255 [keyword]
255 [keyword]
256 * =
256 * =
257 b = ignore
257 b = ignore
258 demo.txt =
258 demo.txt =
259 [keywordmaps]
259 [keywordmaps]
260 Xinfo = {author}: {desc}
260 Xinfo = {author}: {desc}
261 $Xinfo: test: hg keyword config and expansion example $
261 $Xinfo: test: hg keyword config and expansion example $
262 % cat
262 % cat
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 % hg cat
267 % hg cat
268 expand $Id: a ef63ca68695b Thu, 01 Jan 1970 00:00:00 +0000 user $
268 expand $Id: a ef63ca68695b Thu, 01 Jan 1970 00:00:00 +0000 user $
269 do not process $Id:
269 do not process $Id:
270 xxx $
270 xxx $
271 ignore $Id$
271 ignore $Id$
272 a
272 a
273 % interrupted commit should not change state
273 % interrupted commit should not change state
274 transaction abort!
274 transaction abort!
275 rollback completed
275 rollback completed
276 abort: empty commit message
276 abort: empty commit message
277 % status
277 % status
278 M a
278 M a
279 ? log
279 ? log
280 % commit
280 % commit
281 a
281 a
282 overwriting a expanding keywords
282 overwriting a expanding keywords
283 % status
283 % status
284 % verify
284 % verify
285 checking changesets
285 checking changesets
286 checking manifests
286 checking manifests
287 crosschecking files in changesets and manifests
287 crosschecking files in changesets and manifests
288 checking files
288 checking files
289 3 files, 3 changesets, 4 total revisions
289 3 files, 3 changesets, 4 total revisions
290 % cat
290 % cat
291 expand $Id: a bb948857c743 Thu, 01 Jan 1970 00:00:02 +0000 user $
291 expand $Id: a bb948857c743 Thu, 01 Jan 1970 00:00:02 +0000 user $
292 do not process $Id:
292 do not process $Id:
293 xxx $
293 xxx $
294 $Xinfo: User Name <user@example.com>: firstline $
294 $Xinfo: User Name <user@example.com>: firstline $
295 ignore $Id$
295 ignore $Id$
296 % hg cat
296 % hg cat
297 expand $Id: a bb948857c743 Thu, 01 Jan 1970 00:00:02 +0000 user $
297 expand $Id: a bb948857c743 Thu, 01 Jan 1970 00:00:02 +0000 user $
298 do not process $Id:
298 do not process $Id:
299 xxx $
299 xxx $
300 $Xinfo: User Name <user@example.com>: firstline $
300 $Xinfo: User Name <user@example.com>: firstline $
301 ignore $Id$
301 ignore $Id$
302 a
302 a
303 % annotate
303 % annotate
304 1: expand $Id$
304 1: expand $Id$
305 1: do not process $Id:
305 1: do not process $Id:
306 1: xxx $
306 1: xxx $
307 2: $Xinfo$
307 2: $Xinfo$
308 % remove
308 % remove
309 % status
309 % status
310 % rollback
310 % rollback
311 rolling back last transaction
311 rolling back last transaction
312 % status
312 % status
313 R a
313 R a
314 % revert a
314 % revert a
315 % cat a
315 % cat a
316 expand $Id: a bb948857c743 Thu, 01 Jan 1970 00:00:02 +0000 user $
316 expand $Id: a bb948857c743 Thu, 01 Jan 1970 00:00:02 +0000 user $
317 do not process $Id:
317 do not process $Id:
318 xxx $
318 xxx $
319 $Xinfo: User Name <user@example.com>: firstline $
319 $Xinfo: User Name <user@example.com>: firstline $
320 % clone to test incoming
320 % clone to test incoming
321 requesting all changes
321 requesting all changes
322 adding changesets
322 adding changesets
323 adding manifests
323 adding manifests
324 adding file changes
324 adding file changes
325 added 2 changesets with 3 changes to 3 files
325 added 2 changesets with 3 changes to 3 files
326 updating working directory
326 updating working directory
327 3 files updated, 0 files merged, 0 files removed, 0 files unresolved
327 3 files updated, 0 files merged, 0 files removed, 0 files unresolved
328 % incoming
328 % incoming
329 comparing with test-keyword/Test
329 comparing with test-keyword/Test
330 searching for changes
330 searching for changes
331 changeset: 2:bb948857c743
331 changeset: 2:bb948857c743
332 tag: tip
332 tag: tip
333 user: User Name <user@example.com>
333 user: User Name <user@example.com>
334 date: Thu Jan 01 00:00:02 1970 +0000
334 date: Thu Jan 01 00:00:02 1970 +0000
335 summary: firstline
335 summary: firstline
336
336
337 % commit rejecttest
337 % commit rejecttest
338 a
338 a
339 overwriting a expanding keywords
339 overwriting a expanding keywords
340 % export
340 % export
341 % import
341 % import
342 applying ../rejecttest.diff
342 applying ../rejecttest.diff
343 % cat
343 % cat
344 expand $Id: a 4e0994474d25 Thu, 01 Jan 1970 00:00:03 +0000 user $ rejecttest
344 expand $Id: a 4e0994474d25 Thu, 01 Jan 1970 00:00:03 +0000 user $ rejecttest
345 do not process $Id: rejecttest
345 do not process $Id: rejecttest
346 xxx $
346 xxx $
347 $Xinfo: User Name <user@example.com>: rejects? $
347 $Xinfo: User Name <user@example.com>: rejects? $
348 ignore $Id$
348 ignore $Id$
349
349
350 % rollback
350 % rollback
351 rolling back last transaction
351 rolling back last transaction
352 % clean update
352 % clean update
353 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
353 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
354 % kwexpand/kwshrink on selected files
354 % kwexpand/kwshrink on selected files
355 % copy a x/a
355 % copy a x/a
356 % kwexpand a
356 % kwexpand a
357 overwriting a expanding keywords
357 overwriting a expanding keywords
358 % kwexpand x/a should abort
358 % kwexpand x/a should abort
359 abort: outstanding uncommitted changes
359 abort: outstanding uncommitted changes
360 x/a
360 x/a
361 x/a: copy a:779c764182ce5d43e2b1eb66ce06d7b47bfe342e
361 x/a: copy a:779c764182ce5d43e2b1eb66ce06d7b47bfe342e
362 overwriting x/a expanding keywords
362 overwriting x/a expanding keywords
363 % cat a
363 % cat a
364 expand $Id: x/a cfa68229c116 Thu, 01 Jan 1970 00:00:03 +0000 user $
364 expand $Id: x/a cfa68229c116 Thu, 01 Jan 1970 00:00:03 +0000 user $
365 do not process $Id:
365 do not process $Id:
366 xxx $
366 xxx $
367 $Xinfo: User Name <user@example.com>: xa $
367 $Xinfo: User Name <user@example.com>: xa $
368 % kwshrink a inside directory x
368 % kwshrink a inside directory x
369 overwriting x/a shrinking keywords
369 overwriting x/a shrinking keywords
370 % cat a
370 % cat a
371 expand $Id$
371 expand $Id$
372 do not process $Id:
372 do not process $Id:
373 xxx $
373 xxx $
374 $Xinfo$
374 $Xinfo$
375 % kwexpand nonexistent
375 % kwexpand nonexistent
376 nonexistent:
376 nonexistent:
377 % switch off expansion
377 % hg serve
378 % kwshrink with unknown file u
378 % expansion
379 overwriting a shrinking keywords
379 % hgweb file
380 overwriting x/a shrinking keywords
380 200 Script output follows
381 % cat
381
382 expand $Id$
383 do not process $Id:
384 xxx $
385 $Xinfo$
386 ignore $Id$
387 % hg cat
388 expand $Id: a bb948857c743 Thu, 01 Jan 1970 00:00:02 +0000 user $
382 expand $Id: a bb948857c743 Thu, 01 Jan 1970 00:00:02 +0000 user $
389 do not process $Id:
383 do not process $Id:
390 xxx $
384 xxx $
391 $Xinfo: User Name <user@example.com>: firstline $
385 $Xinfo: User Name <user@example.com>: firstline $
392 ignore $Id$
386 % no expansion
393 a
387 % hgweb annotate
394 % cat
388 200 Script output follows
395 expand $Id$
389
396 do not process $Id:
390
397 xxx $
391 User Name <user@example.com>@1: expand $Id$
398 $Xinfo$
392 User Name <user@example.com>@1: do not process $Id:
399 ignore $Id$
393 User Name <user@example.com>@1: xxx $
400 % hg cat
394 User Name <user@example.com>@2: $Xinfo$
401 expand $Id$
395
402 do not process $Id:
396
403 xxx $
397
404 $Xinfo$
398
405 ignore $Id$
406 a
407 % hg serve
408 % hgweb changeset
399 % hgweb changeset
409 200 Script output follows
400 200 Script output follows
410
401
411
402
412 # HG changeset patch
403 # HG changeset patch
413 # User User Name <user@example.com>
404 # User User Name <user@example.com>
414 # Date 3 0
405 # Date 3 0
415 # Node ID cfa68229c1167443337266ebac453c73b1d5d16e
406 # Node ID cfa68229c1167443337266ebac453c73b1d5d16e
416 # Parent bb948857c743469b22bbf51f7ec8112279ca5d83
407 # Parent bb948857c743469b22bbf51f7ec8112279ca5d83
417 xa
408 xa
418
409
419 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
410 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
420 +++ b/x/a Thu Jan 01 00:00:03 1970 +0000
411 +++ b/x/a Thu Jan 01 00:00:03 1970 +0000
421 @@ -0,0 +1,4 @@
412 @@ -0,0 +1,4 @@
422 +expand $Id$
413 +expand $Id$
423 +do not process $Id:
414 +do not process $Id:
424 +xxx $
415 +xxx $
425 +$Xinfo$
416 +$Xinfo$
426
417
427 % hgweb filediff
418 % hgweb filediff
428 200 Script output follows
419 200 Script output follows
429
420
430
421
431 --- a/a Thu Jan 01 00:00:00 1970 +0000
422 --- a/a Thu Jan 01 00:00:00 1970 +0000
432 +++ b/a Thu Jan 01 00:00:02 1970 +0000
423 +++ b/a Thu Jan 01 00:00:02 1970 +0000
433 @@ -1,3 +1,4 @@
424 @@ -1,3 +1,4 @@
434 expand $Id$
425 expand $Id$
435 do not process $Id:
426 do not process $Id:
436 xxx $
427 xxx $
437 +$Xinfo$
428 +$Xinfo$
438
429
439
430
440
431
441
432
442 % errors encountered
433 % errors encountered
434 % switch off expansion
435 % kwshrink with unknown file u
436 overwriting a shrinking keywords
437 overwriting x/a shrinking keywords
438 % cat
439 expand $Id$
440 do not process $Id:
441 xxx $
442 $Xinfo$
443 ignore $Id$
444 % hg cat
445 expand $Id: a bb948857c743 Thu, 01 Jan 1970 00:00:02 +0000 user $
446 do not process $Id:
447 xxx $
448 $Xinfo: User Name <user@example.com>: firstline $
449 ignore $Id$
450 a
451 % cat
452 expand $Id$
453 do not process $Id:
454 xxx $
455 $Xinfo$
456 ignore $Id$
457 % hg cat
458 expand $Id$
459 do not process $Id:
460 xxx $
461 $Xinfo$
462 ignore $Id$
463 a
General Comments 0
You need to be logged in to leave comments. Login now