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