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