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