Show More
@@ -1,1475 +1,1475 | |||||
1 | Run kwdemo outside a repo |
|
1 | Run kwdemo outside a repo | |
2 | $ hg -q --config extensions.keyword= --config keywordmaps.Foo="{author|user}" kwdemo |
|
2 | $ hg -q --config extensions.keyword= --config keywordmaps.Foo="{author|user}" kwdemo | |
3 | [extensions] |
|
3 | [extensions] | |
4 | keyword = |
|
4 | keyword = | |
5 | [keyword] |
|
5 | [keyword] | |
6 | demo.txt = |
|
6 | demo.txt = | |
7 | [keywordset] |
|
7 | [keywordset] | |
8 | svn = False |
|
8 | svn = False | |
9 | [keywordmaps] |
|
9 | [keywordmaps] | |
10 | Foo = {author|user} |
|
10 | Foo = {author|user} | |
11 | $Foo: test $ |
|
11 | $Foo: test $ | |
12 |
|
12 | |||
13 | $ cat <<EOF >> $HGRCPATH |
|
13 | $ cat <<EOF >> $HGRCPATH | |
14 | > [extensions] |
|
14 | > [extensions] | |
15 | > keyword = |
|
15 | > keyword = | |
16 | > mq = |
|
16 | > mq = | |
17 | > notify = |
|
17 | > notify = | |
18 | > record = |
|
18 | > record = | |
19 | > transplant = |
|
19 | > transplant = | |
20 | > [ui] |
|
20 | > [ui] | |
21 | > interactive = true |
|
21 | > interactive = true | |
22 | > EOF |
|
22 | > EOF | |
23 |
|
23 | |||
24 | hide outer repo |
|
24 | hide outer repo | |
25 | $ hg init |
|
25 | $ hg init | |
26 |
|
26 | |||
27 | Run kwdemo before [keyword] files are set up |
|
27 | Run kwdemo before [keyword] files are set up | |
28 | as it would succeed without uisetup otherwise |
|
28 | as it would succeed without uisetup otherwise | |
29 |
|
29 | |||
30 | $ hg --quiet kwdemo |
|
30 | $ hg --quiet kwdemo | |
31 | [extensions] |
|
31 | [extensions] | |
32 | keyword = |
|
32 | keyword = | |
33 | [keyword] |
|
33 | [keyword] | |
34 | demo.txt = |
|
34 | demo.txt = | |
35 | [keywordset] |
|
35 | [keywordset] | |
36 | svn = False |
|
36 | svn = False | |
37 | [keywordmaps] |
|
37 | [keywordmaps] | |
38 | Author = {author|user} |
|
38 | Author = {author|user} | |
39 | Date = {date|utcdate} |
|
39 | Date = {date|utcdate} | |
40 | Header = {root}/{file},v {node|short} {date|utcdate} {author|user} |
|
40 | Header = {root}/{file},v {node|short} {date|utcdate} {author|user} | |
41 | Id = {file|basename},v {node|short} {date|utcdate} {author|user} |
|
41 | Id = {file|basename},v {node|short} {date|utcdate} {author|user} | |
42 | RCSFile = {file|basename},v |
|
42 | RCSFile = {file|basename},v | |
43 | RCSfile = {file|basename},v |
|
43 | RCSfile = {file|basename},v | |
44 | Revision = {node|short} |
|
44 | Revision = {node|short} | |
45 | Source = {root}/{file},v |
|
45 | Source = {root}/{file},v | |
46 | $Author: test $ |
|
46 | $Author: test $ | |
47 | $Date: ????/??/?? ??:??:?? $ (glob) |
|
47 | $Date: ????/??/?? ??:??:?? $ (glob) | |
48 | $Header: */demo.txt,v ???????????? ????/??/?? ??:??:?? test $ (glob) |
|
48 | $Header: */demo.txt,v ???????????? ????/??/?? ??:??:?? test $ (glob) | |
49 | $Id: demo.txt,v ???????????? ????/??/?? ??:??:?? test $ (glob) |
|
49 | $Id: demo.txt,v ???????????? ????/??/?? ??:??:?? test $ (glob) | |
50 | $RCSFile: demo.txt,v $ |
|
50 | $RCSFile: demo.txt,v $ | |
51 | $RCSfile: demo.txt,v $ |
|
51 | $RCSfile: demo.txt,v $ | |
52 | $Revision: ???????????? $ (glob) |
|
52 | $Revision: ???????????? $ (glob) | |
53 | $Source: */demo.txt,v $ (glob) |
|
53 | $Source: */demo.txt,v $ (glob) | |
54 |
|
54 | |||
55 | $ hg --quiet kwdemo "Branch = {branches}" |
|
55 | $ hg --quiet kwdemo "Branch = {branches}" | |
56 | [extensions] |
|
56 | [extensions] | |
57 | keyword = |
|
57 | keyword = | |
58 | [keyword] |
|
58 | [keyword] | |
59 | demo.txt = |
|
59 | demo.txt = | |
60 | [keywordset] |
|
60 | [keywordset] | |
61 | svn = False |
|
61 | svn = False | |
62 | [keywordmaps] |
|
62 | [keywordmaps] | |
63 | Branch = {branches} |
|
63 | Branch = {branches} | |
64 | $Branch: demobranch $ |
|
64 | $Branch: demobranch $ | |
65 |
|
65 | |||
66 | (test template filter svnisodate and svnutcdate) |
|
66 | (test template filter svnisodate and svnutcdate) | |
67 |
|
67 | |||
68 | $ hg --quiet kwdemo --config keywordset.svn=True |
|
68 | $ hg --quiet kwdemo --config keywordset.svn=True | |
69 | [extensions] |
|
69 | [extensions] | |
70 | keyword = |
|
70 | keyword = | |
71 | [keyword] |
|
71 | [keyword] | |
72 | demo.txt = |
|
72 | demo.txt = | |
73 | [keywordset] |
|
73 | [keywordset] | |
74 | svn = True |
|
74 | svn = True | |
75 | [keywordmaps] |
|
75 | [keywordmaps] | |
76 | Author = {author|user} |
|
76 | Author = {author|user} | |
77 | Date = {date|svnisodate} |
|
77 | Date = {date|svnisodate} | |
78 | Id = {file|basename},v {node|short} {date|svnutcdate} {author|user} |
|
78 | Id = {file|basename},v {node|short} {date|svnutcdate} {author|user} | |
79 | LastChangedBy = {author|user} |
|
79 | LastChangedBy = {author|user} | |
80 | LastChangedDate = {date|svnisodate} |
|
80 | LastChangedDate = {date|svnisodate} | |
81 | LastChangedRevision = {node|short} |
|
81 | LastChangedRevision = {node|short} | |
82 | Revision = {node|short} |
|
82 | Revision = {node|short} | |
83 | $Author: test $ |
|
83 | $Author: test $ | |
84 | $Date: ????-??-?? ??:??:?? ????? (???, ?? ??? ????) $ (glob) |
|
84 | $Date: ????-??-?? ??:??:?? ????? (???, ?? ??? ????) $ (glob) | |
85 | $Id: demo.txt,v ???????????? ????-??-?? ??:??:??Z test $ (glob) |
|
85 | $Id: demo.txt,v ???????????? ????-??-?? ??:??:??Z test $ (glob) | |
86 | $LastChangedBy: test $ |
|
86 | $LastChangedBy: test $ | |
87 | $LastChangedDate: ????-??-?? ??:??:?? ????? (???, ?? ??? ????) $ (glob) |
|
87 | $LastChangedDate: ????-??-?? ??:??:?? ????? (???, ?? ??? ????) $ (glob) | |
88 | $LastChangedRevision: ???????????? $ (glob) |
|
88 | $LastChangedRevision: ???????????? $ (glob) | |
89 | $Revision: ???????????? $ (glob) |
|
89 | $Revision: ???????????? $ (glob) | |
90 |
|
90 | |||
91 | $ cat <<EOF >> $HGRCPATH |
|
91 | $ cat <<EOF >> $HGRCPATH | |
92 | > [keyword] |
|
92 | > [keyword] | |
93 | > ** = |
|
93 | > ** = | |
94 | > b = ignore |
|
94 | > b = ignore | |
95 | > i = ignore |
|
95 | > i = ignore | |
96 | > [hooks] |
|
96 | > [hooks] | |
97 | > EOF |
|
97 | > EOF | |
98 | $ cp $HGRCPATH $HGRCPATH.nohooks |
|
98 | $ cp $HGRCPATH $HGRCPATH.nohooks | |
99 | > cat <<EOF >> $HGRCPATH |
|
99 | > cat <<EOF >> $HGRCPATH | |
100 | > commit= |
|
100 | > commit= | |
101 | > commit.test=cp a hooktest |
|
101 | > commit.test=cp a hooktest | |
102 | > EOF |
|
102 | > EOF | |
103 |
|
103 | |||
104 | $ hg init Test-bndl |
|
104 | $ hg init Test-bndl | |
105 | $ cd Test-bndl |
|
105 | $ cd Test-bndl | |
106 |
|
106 | |||
107 | kwshrink should exit silently in empty/invalid repo |
|
107 | kwshrink should exit silently in empty/invalid repo | |
108 |
|
108 | |||
109 | $ hg kwshrink |
|
109 | $ hg kwshrink | |
110 |
|
110 | |||
111 | Symlinks cannot be created on Windows. |
|
111 | Symlinks cannot be created on Windows. | |
112 | A bundle to test this was made with: |
|
112 | A bundle to test this was made with: | |
113 | hg init t |
|
113 | hg init t | |
114 | cd t |
|
114 | cd t | |
115 | echo a > a |
|
115 | echo a > a | |
116 | ln -s a sym |
|
116 | ln -s a sym | |
117 | hg add sym |
|
117 | hg add sym | |
118 | hg ci -m addsym -u mercurial |
|
118 | hg ci -m addsym -u mercurial | |
119 | hg bundle --base null ../test-keyword.hg |
|
119 | hg bundle --base null ../test-keyword.hg | |
120 |
|
120 | |||
121 | $ hg pull -u "$TESTDIR"/bundles/test-keyword.hg |
|
121 | $ hg pull -u "$TESTDIR"/bundles/test-keyword.hg | |
122 | pulling from *test-keyword.hg (glob) |
|
122 | pulling from *test-keyword.hg (glob) | |
123 | requesting all changes |
|
123 | requesting all changes | |
124 | adding changesets |
|
124 | adding changesets | |
125 | adding manifests |
|
125 | adding manifests | |
126 | adding file changes |
|
126 | adding file changes | |
127 | added 1 changesets with 1 changes to 1 files |
|
127 | added 1 changesets with 1 changes to 1 files | |
128 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
128 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
129 |
|
129 | |||
130 | $ echo 'expand $Id$' > a |
|
130 | $ echo 'expand $Id$' > a | |
131 | $ echo 'do not process $Id:' >> a |
|
131 | $ echo 'do not process $Id:' >> a | |
132 | $ echo 'xxx $' >> a |
|
132 | $ echo 'xxx $' >> a | |
133 | $ echo 'ignore $Id$' > b |
|
133 | $ echo 'ignore $Id$' > b | |
134 |
|
134 | |||
135 | Output files as they were created |
|
135 | Output files as they were created | |
136 |
|
136 | |||
137 | $ cat a b |
|
137 | $ cat a b | |
138 | expand $Id$ |
|
138 | expand $Id$ | |
139 | do not process $Id: |
|
139 | do not process $Id: | |
140 | xxx $ |
|
140 | xxx $ | |
141 | ignore $Id$ |
|
141 | ignore $Id$ | |
142 |
|
142 | |||
143 | no kwfiles |
|
143 | no kwfiles | |
144 |
|
144 | |||
145 | $ hg kwfiles |
|
145 | $ hg kwfiles | |
146 |
|
146 | |||
147 | untracked candidates |
|
147 | untracked candidates | |
148 |
|
148 | |||
149 | $ hg -v kwfiles --unknown |
|
149 | $ hg -v kwfiles --unknown | |
150 | k a |
|
150 | k a | |
151 |
|
151 | |||
152 | Add files and check status |
|
152 | Add files and check status | |
153 |
|
153 | |||
154 | $ hg addremove |
|
154 | $ hg addremove | |
155 | adding a |
|
155 | adding a | |
156 | adding b |
|
156 | adding b | |
157 | $ hg status |
|
157 | $ hg status | |
158 | A a |
|
158 | A a | |
159 | A b |
|
159 | A b | |
160 |
|
160 | |||
161 |
|
161 | |||
162 | Default keyword expansion including commit hook |
|
162 | Default keyword expansion including commit hook | |
163 | Interrupted commit should not change state or run commit hook |
|
163 | Interrupted commit should not change state or run commit hook | |
164 |
|
164 | |||
165 | $ hg --debug commit |
|
165 | $ hg --debug commit | |
166 | abort: empty commit message |
|
166 | abort: empty commit message | |
167 | [255] |
|
167 | [255] | |
168 | $ hg status |
|
168 | $ hg status | |
169 | A a |
|
169 | A a | |
170 | A b |
|
170 | A b | |
171 |
|
171 | |||
172 | Commit with several checks |
|
172 | Commit with several checks | |
173 |
|
173 | |||
174 | $ hg --debug commit -mabsym -u 'User Name <user@example.com>' |
|
174 | $ hg --debug commit -mabsym -u 'User Name <user@example.com>' | |
175 | committing files: |
|
175 | committing files: | |
176 | a |
|
176 | a | |
177 | b |
|
177 | b | |
178 | committing manifest |
|
178 | committing manifest | |
179 | committing changelog |
|
179 | committing changelog | |
180 | overwriting a expanding keywords |
|
180 | overwriting a expanding keywords | |
181 | updating the branch cache |
|
181 | updating the branch cache | |
182 | committed changeset 1:ef63ca68695bc9495032c6fda1350c71e6d256e9 |
|
182 | committed changeset 1:ef63ca68695bc9495032c6fda1350c71e6d256e9 | |
183 | running hook commit.test: cp a hooktest |
|
183 | running hook commit.test: cp a hooktest | |
184 | $ hg status |
|
184 | $ hg status | |
185 | ? hooktest |
|
185 | ? hooktest | |
186 | $ hg debugrebuildstate |
|
186 | $ hg debugrebuildstate | |
187 | $ hg --quiet identify |
|
187 | $ hg --quiet identify | |
188 | ef63ca68695b |
|
188 | ef63ca68695b | |
189 |
|
189 | |||
190 | cat files in working directory with keywords expanded |
|
190 | cat files in working directory with keywords expanded | |
191 |
|
191 | |||
192 | $ cat a b |
|
192 | $ cat a b | |
193 | expand $Id: a,v ef63ca68695b 1970/01/01 00:00:00 user $ |
|
193 | expand $Id: a,v ef63ca68695b 1970/01/01 00:00:00 user $ | |
194 | do not process $Id: |
|
194 | do not process $Id: | |
195 | xxx $ |
|
195 | xxx $ | |
196 | ignore $Id$ |
|
196 | ignore $Id$ | |
197 |
|
197 | |||
198 | hg cat files and symlink, no expansion |
|
198 | hg cat files and symlink, no expansion | |
199 |
|
199 | |||
200 | $ hg cat sym a b && echo |
|
200 | $ hg cat sym a b && echo | |
201 | expand $Id: a,v ef63ca68695b 1970/01/01 00:00:00 user $ |
|
201 | expand $Id: a,v ef63ca68695b 1970/01/01 00:00:00 user $ | |
202 | do not process $Id: |
|
202 | do not process $Id: | |
203 | xxx $ |
|
203 | xxx $ | |
204 | ignore $Id$ |
|
204 | ignore $Id$ | |
205 | a |
|
205 | a | |
206 |
|
206 | |||
207 | $ diff a hooktest |
|
207 | $ diff a hooktest | |
208 |
|
208 | |||
209 | $ cp $HGRCPATH.nohooks $HGRCPATH |
|
209 | $ cp $HGRCPATH.nohooks $HGRCPATH | |
210 | $ rm hooktest |
|
210 | $ rm hooktest | |
211 |
|
211 | |||
212 | hg status of kw-ignored binary file starting with '\1\n' |
|
212 | hg status of kw-ignored binary file starting with '\1\n' | |
213 |
|
213 | |||
214 | >>> open("i", "wb").write("\1\nfoo") |
|
214 | >>> open("i", "wb").write("\1\nfoo") | |
215 | $ hg -q commit -Am metasep i |
|
215 | $ hg -q commit -Am metasep i | |
216 | $ hg status |
|
216 | $ hg status | |
217 | >>> open("i", "wb").write("\1\nbar") |
|
217 | >>> open("i", "wb").write("\1\nbar") | |
218 | $ hg status |
|
218 | $ hg status | |
219 | M i |
|
219 | M i | |
220 | $ hg -q commit -m "modify metasep" i |
|
220 | $ hg -q commit -m "modify metasep" i | |
221 | $ hg status --rev 2:3 |
|
221 | $ hg status --rev 2:3 | |
222 | M i |
|
222 | M i | |
223 | $ touch empty |
|
223 | $ touch empty | |
224 | $ hg -q commit -A -m "another file" |
|
224 | $ hg -q commit -A -m "another file" | |
225 | $ hg status -A --rev 3:4 i |
|
225 | $ hg status -A --rev 3:4 i | |
226 | C i |
|
226 | C i | |
227 |
|
227 | |||
228 | $ hg -q strip --no-backup 2 |
|
228 | $ hg -q strip --no-backup 2 | |
229 |
|
229 | |||
230 | Test hook execution |
|
230 | Test hook execution | |
231 |
|
231 | |||
232 | bundle |
|
232 | bundle | |
233 |
|
233 | |||
234 | $ hg bundle --base null ../kw.hg |
|
234 | $ hg bundle --base null ../kw.hg | |
235 | 2 changesets found |
|
235 | 2 changesets found | |
236 | $ cd .. |
|
236 | $ cd .. | |
237 | $ hg init Test |
|
237 | $ hg init Test | |
238 | $ cd Test |
|
238 | $ cd Test | |
239 |
|
239 | |||
240 | Notify on pull to check whether keywords stay as is in email |
|
240 | Notify on pull to check whether keywords stay as is in email | |
241 | ie. if patch.diff wrapper acts as it should |
|
241 | ie. if patch.diff wrapper acts as it should | |
242 |
|
242 | |||
243 | $ cat <<EOF >> $HGRCPATH |
|
243 | $ cat <<EOF >> $HGRCPATH | |
244 | > [hooks] |
|
244 | > [hooks] | |
245 | > incoming.notify = python:hgext.notify.hook |
|
245 | > incoming.notify = python:hgext.notify.hook | |
246 | > [notify] |
|
246 | > [notify] | |
247 | > sources = pull |
|
247 | > sources = pull | |
248 | > diffstat = False |
|
248 | > diffstat = False | |
249 | > maxsubject = 15 |
|
249 | > maxsubject = 15 | |
250 | > [reposubs] |
|
250 | > [reposubs] | |
251 | > * = Test |
|
251 | > * = Test | |
252 | > EOF |
|
252 | > EOF | |
253 |
|
253 | |||
254 | Pull from bundle and trigger notify |
|
254 | Pull from bundle and trigger notify | |
255 |
|
255 | |||
256 | $ hg pull -u ../kw.hg |
|
256 | $ hg pull -u ../kw.hg | |
257 | pulling from ../kw.hg |
|
257 | pulling from ../kw.hg | |
258 | requesting all changes |
|
258 | requesting all changes | |
259 | adding changesets |
|
259 | adding changesets | |
260 | adding manifests |
|
260 | adding manifests | |
261 | adding file changes |
|
261 | adding file changes | |
262 | added 2 changesets with 3 changes to 3 files |
|
262 | added 2 changesets with 3 changes to 3 files | |
263 | Content-Type: text/plain; charset="us-ascii" |
|
263 | Content-Type: text/plain; charset="us-ascii" | |
264 | MIME-Version: 1.0 |
|
264 | MIME-Version: 1.0 | |
265 | Content-Transfer-Encoding: 7bit |
|
265 | Content-Transfer-Encoding: 7bit | |
266 | Date: * (glob) |
|
266 | Date: * (glob) | |
267 | Subject: changeset in... |
|
267 | Subject: changeset in... | |
268 | From: mercurial |
|
268 | From: mercurial | |
269 | X-Hg-Notification: changeset a2392c293916 |
|
269 | X-Hg-Notification: changeset a2392c293916 | |
270 | Message-Id: <hg.a2392c293916*> (glob) |
|
270 | Message-Id: <hg.a2392c293916*> (glob) | |
271 | To: Test |
|
271 | To: Test | |
272 |
|
272 | |||
273 | changeset a2392c293916 in $TESTTMP/Test (glob) |
|
273 | changeset a2392c293916 in $TESTTMP/Test (glob) | |
274 | details: $TESTTMP/Test?cmd=changeset;node=a2392c293916 |
|
274 | details: $TESTTMP/Test?cmd=changeset;node=a2392c293916 | |
275 | description: |
|
275 | description: | |
276 | addsym |
|
276 | addsym | |
277 |
|
277 | |||
278 | diffs (6 lines): |
|
278 | diffs (6 lines): | |
279 |
|
279 | |||
280 | diff -r 000000000000 -r a2392c293916 sym |
|
280 | diff -r 000000000000 -r a2392c293916 sym | |
281 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 |
|
281 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 | |
282 | +++ b/sym Sat Feb 09 20:25:47 2008 +0100 |
|
282 | +++ b/sym Sat Feb 09 20:25:47 2008 +0100 | |
283 | @@ -0,0 +1,1 @@ |
|
283 | @@ -0,0 +1,1 @@ | |
284 | +a |
|
284 | +a | |
285 | \ No newline at end of file |
|
285 | \ No newline at end of file | |
286 | Content-Type: text/plain; charset="us-ascii" |
|
286 | Content-Type: text/plain; charset="us-ascii" | |
287 | MIME-Version: 1.0 |
|
287 | MIME-Version: 1.0 | |
288 | Content-Transfer-Encoding: 7bit |
|
288 | Content-Transfer-Encoding: 7bit | |
289 | Date:* (glob) |
|
289 | Date:* (glob) | |
290 | Subject: changeset in... |
|
290 | Subject: changeset in... | |
291 | From: User Name <user@example.com> |
|
291 | From: User Name <user@example.com> | |
292 | X-Hg-Notification: changeset ef63ca68695b |
|
292 | X-Hg-Notification: changeset ef63ca68695b | |
293 | Message-Id: <hg.ef63ca68695b*> (glob) |
|
293 | Message-Id: <hg.ef63ca68695b*> (glob) | |
294 | To: Test |
|
294 | To: Test | |
295 |
|
295 | |||
296 | changeset ef63ca68695b in $TESTTMP/Test (glob) |
|
296 | changeset ef63ca68695b in $TESTTMP/Test (glob) | |
297 | details: $TESTTMP/Test?cmd=changeset;node=ef63ca68695b |
|
297 | details: $TESTTMP/Test?cmd=changeset;node=ef63ca68695b | |
298 | description: |
|
298 | description: | |
299 | absym |
|
299 | absym | |
300 |
|
300 | |||
301 | diffs (12 lines): |
|
301 | diffs (12 lines): | |
302 |
|
302 | |||
303 | diff -r a2392c293916 -r ef63ca68695b a |
|
303 | diff -r a2392c293916 -r ef63ca68695b a | |
304 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 |
|
304 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 | |
305 | +++ b/a Thu Jan 01 00:00:00 1970 +0000 |
|
305 | +++ b/a Thu Jan 01 00:00:00 1970 +0000 | |
306 | @@ -0,0 +1,3 @@ |
|
306 | @@ -0,0 +1,3 @@ | |
307 | +expand $Id$ |
|
307 | +expand $Id$ | |
308 | +do not process $Id: |
|
308 | +do not process $Id: | |
309 | +xxx $ |
|
309 | +xxx $ | |
310 | diff -r a2392c293916 -r ef63ca68695b b |
|
310 | diff -r a2392c293916 -r ef63ca68695b b | |
311 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 |
|
311 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 | |
312 | +++ b/b Thu Jan 01 00:00:00 1970 +0000 |
|
312 | +++ b/b Thu Jan 01 00:00:00 1970 +0000 | |
313 | @@ -0,0 +1,1 @@ |
|
313 | @@ -0,0 +1,1 @@ | |
314 | +ignore $Id$ |
|
314 | +ignore $Id$ | |
315 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
315 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
316 |
|
316 | |||
317 | $ cp $HGRCPATH.nohooks $HGRCPATH |
|
317 | $ cp $HGRCPATH.nohooks $HGRCPATH | |
318 |
|
318 | |||
319 | Touch files and check with status |
|
319 | Touch files and check with status | |
320 |
|
320 | |||
321 | $ touch a b |
|
321 | $ touch a b | |
322 | $ hg status |
|
322 | $ hg status | |
323 |
|
323 | |||
324 | Update and expand |
|
324 | Update and expand | |
325 |
|
325 | |||
326 | $ rm sym a b |
|
326 | $ rm sym a b | |
327 | $ hg update -C |
|
327 | $ hg update -C | |
328 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
328 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
329 | $ cat a b |
|
329 | $ cat a b | |
330 | expand $Id: a,v ef63ca68695b 1970/01/01 00:00:00 user $ |
|
330 | expand $Id: a,v ef63ca68695b 1970/01/01 00:00:00 user $ | |
331 | do not process $Id: |
|
331 | do not process $Id: | |
332 | xxx $ |
|
332 | xxx $ | |
333 | ignore $Id$ |
|
333 | ignore $Id$ | |
334 |
|
334 | |||
335 | Check whether expansion is filewise and file mode is preserved |
|
335 | Check whether expansion is filewise and file mode is preserved | |
336 |
|
336 | |||
337 | $ echo '$Id$' > c |
|
337 | $ echo '$Id$' > c | |
338 | $ echo 'tests for different changenodes' >> c |
|
338 | $ echo 'tests for different changenodes' >> c | |
339 | #if unix-permissions |
|
339 | #if unix-permissions | |
340 | $ chmod 600 c |
|
340 | $ chmod 600 c | |
341 | $ ls -l c | cut -b 1-10 |
|
341 | $ ls -l c | cut -b 1-10 | |
342 | -rw------- |
|
342 | -rw------- | |
343 | #endif |
|
343 | #endif | |
344 |
|
344 | |||
345 | commit file c |
|
345 | commit file c | |
346 |
|
346 | |||
347 | $ hg commit -A -mcndiff -d '1 0' -u 'User Name <user@example.com>' |
|
347 | $ hg commit -A -mcndiff -d '1 0' -u 'User Name <user@example.com>' | |
348 | adding c |
|
348 | adding c | |
349 | #if unix-permissions |
|
349 | #if unix-permissions | |
350 | $ ls -l c | cut -b 1-10 |
|
350 | $ ls -l c | cut -b 1-10 | |
351 | -rw------- |
|
351 | -rw------- | |
352 | #endif |
|
352 | #endif | |
353 |
|
353 | |||
354 | force expansion |
|
354 | force expansion | |
355 |
|
355 | |||
356 | $ hg -v kwexpand |
|
356 | $ hg -v kwexpand | |
357 | overwriting a expanding keywords |
|
357 | overwriting a expanding keywords | |
358 | overwriting c expanding keywords |
|
358 | overwriting c expanding keywords | |
359 |
|
359 | |||
360 | compare changenodes in a and c |
|
360 | compare changenodes in a and c | |
361 |
|
361 | |||
362 | $ cat a c |
|
362 | $ cat a c | |
363 | expand $Id: a,v ef63ca68695b 1970/01/01 00:00:00 user $ |
|
363 | expand $Id: a,v ef63ca68695b 1970/01/01 00:00:00 user $ | |
364 | do not process $Id: |
|
364 | do not process $Id: | |
365 | xxx $ |
|
365 | xxx $ | |
366 | $Id: c,v 40a904bbbe4c 1970/01/01 00:00:01 user $ |
|
366 | $Id: c,v 40a904bbbe4c 1970/01/01 00:00:01 user $ | |
367 | tests for different changenodes |
|
367 | tests for different changenodes | |
368 |
|
368 | |||
369 | record |
|
369 | record | |
370 |
|
370 | |||
371 | $ echo '$Id$' > r |
|
371 | $ echo '$Id$' > r | |
372 | $ hg add r |
|
372 | $ hg add r | |
373 |
|
373 | |||
374 | record chunk |
|
374 | record chunk | |
375 |
|
375 | |||
376 | >>> lines = open('a', 'rb').readlines() |
|
376 | >>> lines = open('a', 'rb').readlines() | |
377 | >>> lines.insert(1, 'foo\n') |
|
377 | >>> lines.insert(1, 'foo\n') | |
378 | >>> lines.append('bar\n') |
|
378 | >>> lines.append('bar\n') | |
379 | >>> open('a', 'wb').writelines(lines) |
|
379 | >>> open('a', 'wb').writelines(lines) | |
380 | $ hg record -d '10 1' -m rectest a<<EOF |
|
380 | $ hg record -d '10 1' -m rectest a<<EOF | |
381 | > y |
|
381 | > y | |
382 | > y |
|
382 | > y | |
383 | > n |
|
383 | > n | |
384 | > EOF |
|
384 | > EOF | |
385 | diff --git a/a b/a |
|
385 | diff --git a/a b/a | |
386 | 2 hunks, 2 lines changed |
|
386 | 2 hunks, 2 lines changed | |
387 | examine changes to 'a'? [Ynesfdaq?] y |
|
387 | examine changes to 'a'? [Ynesfdaq?] y | |
388 |
|
388 | |||
389 | @@ -1,3 +1,4 @@ |
|
389 | @@ -1,3 +1,4 @@ | |
390 | expand $Id$ |
|
390 | expand $Id$ | |
391 | +foo |
|
391 | +foo | |
392 | do not process $Id: |
|
392 | do not process $Id: | |
393 | xxx $ |
|
393 | xxx $ | |
394 | record change 1/2 to 'a'? [Ynesfdaq?] y |
|
394 | record change 1/2 to 'a'? [Ynesfdaq?] y | |
395 |
|
395 | |||
396 | @@ -2,2 +3,3 @@ |
|
396 | @@ -2,2 +3,3 @@ | |
397 | do not process $Id: |
|
397 | do not process $Id: | |
398 | xxx $ |
|
398 | xxx $ | |
399 | +bar |
|
399 | +bar | |
400 | record change 2/2 to 'a'? [Ynesfdaq?] n |
|
400 | record change 2/2 to 'a'? [Ynesfdaq?] n | |
401 |
|
401 | |||
402 |
|
402 | |||
403 | $ hg identify |
|
403 | $ hg identify | |
404 | 5f5eb23505c3+ tip |
|
404 | 5f5eb23505c3+ tip | |
405 | $ hg status |
|
405 | $ hg status | |
406 | M a |
|
406 | M a | |
407 | A r |
|
407 | A r | |
408 |
|
408 | |||
409 | Cat modified file a |
|
409 | Cat modified file a | |
410 |
|
410 | |||
411 | $ cat a |
|
411 | $ cat a | |
412 | expand $Id: a,v 5f5eb23505c3 1970/01/01 00:00:10 test $ |
|
412 | expand $Id: a,v 5f5eb23505c3 1970/01/01 00:00:10 test $ | |
413 | foo |
|
413 | foo | |
414 | do not process $Id: |
|
414 | do not process $Id: | |
415 | xxx $ |
|
415 | xxx $ | |
416 | bar |
|
416 | bar | |
417 |
|
417 | |||
418 | Diff remaining chunk |
|
418 | Diff remaining chunk | |
419 |
|
419 | |||
420 | $ hg diff a |
|
420 | $ hg diff a | |
421 | diff -r 5f5eb23505c3 a |
|
421 | diff -r 5f5eb23505c3 a | |
422 | --- a/a Thu Jan 01 00:00:09 1970 -0000 |
|
422 | --- a/a Thu Jan 01 00:00:09 1970 -0000 | |
423 | +++ b/a * (glob) |
|
423 | +++ b/a * (glob) | |
424 | @@ -2,3 +2,4 @@ |
|
424 | @@ -2,3 +2,4 @@ | |
425 | foo |
|
425 | foo | |
426 | do not process $Id: |
|
426 | do not process $Id: | |
427 | xxx $ |
|
427 | xxx $ | |
428 | +bar |
|
428 | +bar | |
429 |
|
429 | |||
430 | $ hg rollback |
|
430 | $ hg rollback | |
431 | repository tip rolled back to revision 2 (undo commit) |
|
431 | repository tip rolled back to revision 2 (undo commit) | |
432 | working directory now based on revision 2 |
|
432 | working directory now based on revision 2 | |
433 |
|
433 | |||
434 | Record all chunks in file a |
|
434 | Record all chunks in file a | |
435 |
|
435 | |||
436 | $ echo foo > msg |
|
436 | $ echo foo > msg | |
437 |
|
437 | |||
438 | - do not use "hg record -m" here! |
|
438 | - do not use "hg record -m" here! | |
439 |
|
439 | |||
440 | $ hg record -l msg -d '11 1' a<<EOF |
|
440 | $ hg record -l msg -d '11 1' a<<EOF | |
441 | > y |
|
441 | > y | |
442 | > y |
|
442 | > y | |
443 | > y |
|
443 | > y | |
444 | > EOF |
|
444 | > EOF | |
445 | diff --git a/a b/a |
|
445 | diff --git a/a b/a | |
446 | 2 hunks, 2 lines changed |
|
446 | 2 hunks, 2 lines changed | |
447 | examine changes to 'a'? [Ynesfdaq?] y |
|
447 | examine changes to 'a'? [Ynesfdaq?] y | |
448 |
|
448 | |||
449 | @@ -1,3 +1,4 @@ |
|
449 | @@ -1,3 +1,4 @@ | |
450 | expand $Id$ |
|
450 | expand $Id$ | |
451 | +foo |
|
451 | +foo | |
452 | do not process $Id: |
|
452 | do not process $Id: | |
453 | xxx $ |
|
453 | xxx $ | |
454 | record change 1/2 to 'a'? [Ynesfdaq?] y |
|
454 | record change 1/2 to 'a'? [Ynesfdaq?] y | |
455 |
|
455 | |||
456 | @@ -2,2 +3,3 @@ |
|
456 | @@ -2,2 +3,3 @@ | |
457 | do not process $Id: |
|
457 | do not process $Id: | |
458 | xxx $ |
|
458 | xxx $ | |
459 | +bar |
|
459 | +bar | |
460 | record change 2/2 to 'a'? [Ynesfdaq?] y |
|
460 | record change 2/2 to 'a'? [Ynesfdaq?] y | |
461 |
|
461 | |||
462 |
|
462 | |||
463 | File a should be clean |
|
463 | File a should be clean | |
464 |
|
464 | |||
465 | $ hg status -A a |
|
465 | $ hg status -A a | |
466 | C a |
|
466 | C a | |
467 |
|
467 | |||
468 | rollback and revert expansion |
|
468 | rollback and revert expansion | |
469 |
|
469 | |||
470 | $ cat a |
|
470 | $ cat a | |
471 | expand $Id: a,v 78e0a02d76aa 1970/01/01 00:00:11 test $ |
|
471 | expand $Id: a,v 78e0a02d76aa 1970/01/01 00:00:11 test $ | |
472 | foo |
|
472 | foo | |
473 | do not process $Id: |
|
473 | do not process $Id: | |
474 | xxx $ |
|
474 | xxx $ | |
475 | bar |
|
475 | bar | |
476 | $ hg --verbose rollback |
|
476 | $ hg --verbose rollback | |
477 | repository tip rolled back to revision 2 (undo commit) |
|
477 | repository tip rolled back to revision 2 (undo commit) | |
478 | working directory now based on revision 2 |
|
478 | working directory now based on revision 2 | |
479 | overwriting a expanding keywords |
|
479 | overwriting a expanding keywords | |
480 | $ hg status a |
|
480 | $ hg status a | |
481 | M a |
|
481 | M a | |
482 | $ cat a |
|
482 | $ cat a | |
483 | expand $Id: a,v ef63ca68695b 1970/01/01 00:00:00 user $ |
|
483 | expand $Id: a,v ef63ca68695b 1970/01/01 00:00:00 user $ | |
484 | foo |
|
484 | foo | |
485 | do not process $Id: |
|
485 | do not process $Id: | |
486 | xxx $ |
|
486 | xxx $ | |
487 | bar |
|
487 | bar | |
488 | $ echo '$Id$' > y |
|
488 | $ echo '$Id$' > y | |
489 | $ echo '$Id$' > z |
|
489 | $ echo '$Id$' > z | |
490 | $ hg add y |
|
490 | $ hg add y | |
491 | $ hg commit -Am "rollback only" z |
|
491 | $ hg commit -Am "rollback only" z | |
492 | $ cat z |
|
492 | $ cat z | |
493 | $Id: z,v 45a5d3adce53 1970/01/01 00:00:00 test $ |
|
493 | $Id: z,v 45a5d3adce53 1970/01/01 00:00:00 test $ | |
494 | $ hg --verbose rollback |
|
494 | $ hg --verbose rollback | |
495 | repository tip rolled back to revision 2 (undo commit) |
|
495 | repository tip rolled back to revision 2 (undo commit) | |
496 | working directory now based on revision 2 |
|
496 | working directory now based on revision 2 | |
497 | overwriting z shrinking keywords |
|
497 | overwriting z shrinking keywords | |
498 |
|
498 | |||
499 | Only z should be overwritten |
|
499 | Only z should be overwritten | |
500 |
|
500 | |||
501 | $ hg status a y z |
|
501 | $ hg status a y z | |
502 | M a |
|
502 | M a | |
503 | A y |
|
503 | A y | |
504 | A z |
|
504 | A z | |
505 | $ cat z |
|
505 | $ cat z | |
506 | $Id$ |
|
506 | $Id$ | |
507 | $ hg forget y z |
|
507 | $ hg forget y z | |
508 | $ rm y z |
|
508 | $ rm y z | |
509 |
|
509 | |||
510 | record added file alone |
|
510 | record added file alone | |
511 |
|
511 | |||
512 | $ hg -v record -l msg -d '12 2' r<<EOF |
|
512 | $ hg -v record -l msg -d '12 2' r<<EOF | |
513 | > y |
|
513 | > y | |
514 | > y |
|
514 | > y | |
515 | > EOF |
|
515 | > EOF | |
516 | diff --git a/r b/r |
|
516 | diff --git a/r b/r | |
517 | new file mode 100644 |
|
517 | new file mode 100644 | |
518 | examine changes to 'r'? [Ynesfdaq?] y |
|
518 | examine changes to 'r'? [Ynesfdaq?] y | |
519 |
|
519 | |||
520 | @@ -0,0 +1,1 @@ |
|
520 | @@ -0,0 +1,1 @@ | |
521 | +$Id$ |
|
521 | +$Id$ | |
522 | record this change to 'r'? [Ynesfdaq?] y |
|
522 | record this change to 'r'? [Ynesfdaq?] y | |
523 |
|
523 | |||
524 | resolving manifests |
|
524 | resolving manifests | |
525 | patching file r |
|
525 | patching file r | |
526 | committing files: |
|
526 | committing files: | |
527 | r |
|
527 | r | |
528 | committing manifest |
|
528 | committing manifest | |
529 | committing changelog |
|
529 | committing changelog | |
530 | committed changeset 3:82a2f715724d |
|
530 | committed changeset 3:82a2f715724d | |
531 | overwriting r expanding keywords |
|
531 | overwriting r expanding keywords | |
532 | $ hg status r |
|
532 | $ hg status r | |
533 | $ hg --verbose rollback |
|
533 | $ hg --verbose rollback | |
534 | repository tip rolled back to revision 2 (undo commit) |
|
534 | repository tip rolled back to revision 2 (undo commit) | |
535 | working directory now based on revision 2 |
|
535 | working directory now based on revision 2 | |
536 | overwriting r shrinking keywords |
|
536 | overwriting r shrinking keywords | |
537 | $ hg forget r |
|
537 | $ hg forget r | |
538 | $ rm msg r |
|
538 | $ rm msg r | |
539 | $ hg update -C |
|
539 | $ hg update -C | |
540 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
540 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
541 |
|
541 | |||
542 | record added keyword ignored file |
|
542 | record added keyword ignored file | |
543 |
|
543 | |||
544 | $ echo '$Id$' > i |
|
544 | $ echo '$Id$' > i | |
545 | $ hg add i |
|
545 | $ hg add i | |
546 | $ hg --verbose record -d '13 1' -m recignored<<EOF |
|
546 | $ hg --verbose record -d '13 1' -m recignored<<EOF | |
547 | > y |
|
547 | > y | |
548 | > y |
|
548 | > y | |
549 | > EOF |
|
549 | > EOF | |
550 | diff --git a/i b/i |
|
550 | diff --git a/i b/i | |
551 | new file mode 100644 |
|
551 | new file mode 100644 | |
552 | examine changes to 'i'? [Ynesfdaq?] y |
|
552 | examine changes to 'i'? [Ynesfdaq?] y | |
553 |
|
553 | |||
554 | @@ -0,0 +1,1 @@ |
|
554 | @@ -0,0 +1,1 @@ | |
555 | +$Id$ |
|
555 | +$Id$ | |
556 | record this change to 'i'? [Ynesfdaq?] y |
|
556 | record this change to 'i'? [Ynesfdaq?] y | |
557 |
|
557 | |||
558 | resolving manifests |
|
558 | resolving manifests | |
559 | patching file i |
|
559 | patching file i | |
560 | committing files: |
|
560 | committing files: | |
561 | i |
|
561 | i | |
562 | committing manifest |
|
562 | committing manifest | |
563 | committing changelog |
|
563 | committing changelog | |
564 | committed changeset 3:9f40ceb5a072 |
|
564 | committed changeset 3:9f40ceb5a072 | |
565 | $ cat i |
|
565 | $ cat i | |
566 | $Id$ |
|
566 | $Id$ | |
567 | $ hg -q rollback |
|
567 | $ hg -q rollback | |
568 | $ hg forget i |
|
568 | $ hg forget i | |
569 | $ rm i |
|
569 | $ rm i | |
570 |
|
570 | |||
571 | amend |
|
571 | amend | |
572 |
|
572 | |||
573 | $ echo amend >> a |
|
573 | $ echo amend >> a | |
574 | $ echo amend >> b |
|
574 | $ echo amend >> b | |
575 | $ hg -q commit -d '14 1' -m 'prepare amend' |
|
575 | $ hg -q commit -d '14 1' -m 'prepare amend' | |
576 |
|
576 | |||
577 | $ hg --debug commit --amend -d '15 1' -m 'amend without changes' | grep keywords |
|
577 | $ hg --debug commit --amend -d '15 1' -m 'amend without changes' | grep keywords | |
578 | overwriting a expanding keywords |
|
578 | overwriting a expanding keywords | |
579 | $ hg -q id |
|
579 | $ hg -q id | |
580 | 67d8c481a6be |
|
580 | 67d8c481a6be | |
581 | $ head -1 a |
|
581 | $ head -1 a | |
582 | expand $Id: a,v 67d8c481a6be 1970/01/01 00:00:15 test $ |
|
582 | expand $Id: a,v 67d8c481a6be 1970/01/01 00:00:15 test $ | |
583 |
|
583 | |||
584 | $ hg -q strip --no-backup tip |
|
584 | $ hg -q strip --no-backup tip | |
585 |
|
585 | |||
586 | Test patch queue repo |
|
586 | Test patch queue repo | |
587 |
|
587 | |||
588 | $ hg init --mq |
|
588 | $ hg init --mq | |
589 | $ hg qimport -r tip -n mqtest.diff |
|
589 | $ hg qimport -r tip -n mqtest.diff | |
590 | $ hg commit --mq -m mqtest |
|
590 | $ hg commit --mq -m mqtest | |
591 |
|
591 | |||
592 | Keywords should not be expanded in patch |
|
592 | Keywords should not be expanded in patch | |
593 |
|
593 | |||
594 | $ cat .hg/patches/mqtest.diff |
|
594 | $ cat .hg/patches/mqtest.diff | |
595 | # HG changeset patch |
|
595 | # HG changeset patch | |
596 | # User User Name <user@example.com> |
|
596 | # User User Name <user@example.com> | |
597 | # Date 1 0 |
|
597 | # Date 1 0 | |
598 | # Thu Jan 01 00:00:01 1970 +0000 |
|
598 | # Thu Jan 01 00:00:01 1970 +0000 | |
599 | # Node ID 40a904bbbe4cd4ab0a1f28411e35db26341a40ad |
|
599 | # Node ID 40a904bbbe4cd4ab0a1f28411e35db26341a40ad | |
600 | # Parent ef63ca68695bc9495032c6fda1350c71e6d256e9 |
|
600 | # Parent ef63ca68695bc9495032c6fda1350c71e6d256e9 | |
601 | cndiff |
|
601 | cndiff | |
602 |
|
602 | |||
603 | diff -r ef63ca68695b -r 40a904bbbe4c c |
|
603 | diff -r ef63ca68695b -r 40a904bbbe4c c | |
604 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 |
|
604 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 | |
605 | +++ b/c Thu Jan 01 00:00:01 1970 +0000 |
|
605 | +++ b/c Thu Jan 01 00:00:01 1970 +0000 | |
606 | @@ -0,0 +1,2 @@ |
|
606 | @@ -0,0 +1,2 @@ | |
607 | +$Id$ |
|
607 | +$Id$ | |
608 | +tests for different changenodes |
|
608 | +tests for different changenodes | |
609 |
|
609 | |||
610 | $ hg qpop |
|
610 | $ hg qpop | |
611 | popping mqtest.diff |
|
611 | popping mqtest.diff | |
612 | patch queue now empty |
|
612 | patch queue now empty | |
613 |
|
613 | |||
614 | qgoto, implying qpush, should expand |
|
614 | qgoto, implying qpush, should expand | |
615 |
|
615 | |||
616 | $ hg qgoto mqtest.diff |
|
616 | $ hg qgoto mqtest.diff | |
617 | applying mqtest.diff |
|
617 | applying mqtest.diff | |
618 | now at: mqtest.diff |
|
618 | now at: mqtest.diff | |
619 | $ cat c |
|
619 | $ cat c | |
620 | $Id: c,v 40a904bbbe4c 1970/01/01 00:00:01 user $ |
|
620 | $Id: c,v 40a904bbbe4c 1970/01/01 00:00:01 user $ | |
621 | tests for different changenodes |
|
621 | tests for different changenodes | |
622 | $ hg cat c |
|
622 | $ hg cat c | |
623 | $Id: c,v 40a904bbbe4c 1970/01/01 00:00:01 user $ |
|
623 | $Id: c,v 40a904bbbe4c 1970/01/01 00:00:01 user $ | |
624 | tests for different changenodes |
|
624 | tests for different changenodes | |
625 |
|
625 | |||
626 | Keywords should not be expanded in filelog |
|
626 | Keywords should not be expanded in filelog | |
627 |
|
627 | |||
628 | $ hg --config 'extensions.keyword=!' cat c |
|
628 | $ hg --config 'extensions.keyword=!' cat c | |
629 | $Id$ |
|
629 | $Id$ | |
630 | tests for different changenodes |
|
630 | tests for different changenodes | |
631 |
|
631 | |||
632 | qpop and move on |
|
632 | qpop and move on | |
633 |
|
633 | |||
634 | $ hg qpop |
|
634 | $ hg qpop | |
635 | popping mqtest.diff |
|
635 | popping mqtest.diff | |
636 | patch queue now empty |
|
636 | patch queue now empty | |
637 |
|
637 | |||
638 | Copy and show added kwfiles |
|
638 | Copy and show added kwfiles | |
639 |
|
639 | |||
640 | $ hg cp a c |
|
640 | $ hg cp a c | |
641 | $ hg kwfiles |
|
641 | $ hg kwfiles | |
642 | a |
|
642 | a | |
643 | c |
|
643 | c | |
644 |
|
644 | |||
645 | Commit and show expansion in original and copy |
|
645 | Commit and show expansion in original and copy | |
646 |
|
646 | |||
647 | $ hg --debug commit -ma2c -d '1 0' -u 'User Name <user@example.com>' |
|
647 | $ hg --debug commit -ma2c -d '1 0' -u 'User Name <user@example.com>' | |
648 | committing files: |
|
648 | committing files: | |
649 | c |
|
649 | c | |
650 | c: copy a:0045e12f6c5791aac80ca6cbfd97709a88307292 |
|
650 | c: copy a:0045e12f6c5791aac80ca6cbfd97709a88307292 | |
651 | committing manifest |
|
651 | committing manifest | |
652 | committing changelog |
|
652 | committing changelog | |
653 | overwriting c expanding keywords |
|
653 | overwriting c expanding keywords | |
654 | updating the branch cache |
|
654 | updating the branch cache | |
655 | committed changeset 2:25736cf2f5cbe41f6be4e6784ef6ecf9f3bbcc7d |
|
655 | committed changeset 2:25736cf2f5cbe41f6be4e6784ef6ecf9f3bbcc7d | |
656 | $ cat a c |
|
656 | $ cat a c | |
657 | expand $Id: a,v ef63ca68695b 1970/01/01 00:00:00 user $ |
|
657 | expand $Id: a,v ef63ca68695b 1970/01/01 00:00:00 user $ | |
658 | do not process $Id: |
|
658 | do not process $Id: | |
659 | xxx $ |
|
659 | xxx $ | |
660 | expand $Id: c,v 25736cf2f5cb 1970/01/01 00:00:01 user $ |
|
660 | expand $Id: c,v 25736cf2f5cb 1970/01/01 00:00:01 user $ | |
661 | do not process $Id: |
|
661 | do not process $Id: | |
662 | xxx $ |
|
662 | xxx $ | |
663 |
|
663 | |||
664 | Touch copied c and check its status |
|
664 | Touch copied c and check its status | |
665 |
|
665 | |||
666 | $ touch c |
|
666 | $ touch c | |
667 | $ hg status |
|
667 | $ hg status | |
668 |
|
668 | |||
669 | Copy kwfile to keyword ignored file unexpanding keywords |
|
669 | Copy kwfile to keyword ignored file unexpanding keywords | |
670 |
|
670 | |||
671 | $ hg --verbose copy a i |
|
671 | $ hg --verbose copy a i | |
672 | copying a to i |
|
672 | copying a to i | |
673 | overwriting i shrinking keywords |
|
673 | overwriting i shrinking keywords | |
674 | $ head -n 1 i |
|
674 | $ head -n 1 i | |
675 | expand $Id$ |
|
675 | expand $Id$ | |
676 | $ hg forget i |
|
676 | $ hg forget i | |
677 | $ rm i |
|
677 | $ rm i | |
678 |
|
678 | |||
679 | Copy ignored file to ignored file: no overwriting |
|
679 | Copy ignored file to ignored file: no overwriting | |
680 |
|
680 | |||
681 | $ hg --verbose copy b i |
|
681 | $ hg --verbose copy b i | |
682 | copying b to i |
|
682 | copying b to i | |
683 | $ hg forget i |
|
683 | $ hg forget i | |
684 | $ rm i |
|
684 | $ rm i | |
685 |
|
685 | |||
686 | cp symlink file; hg cp -A symlink file (part1) |
|
686 | cp symlink file; hg cp -A symlink file (part1) | |
687 | - copied symlink points to kwfile: overwrite |
|
687 | - copied symlink points to kwfile: overwrite | |
688 |
|
688 | |||
689 | #if symlink |
|
689 | #if symlink | |
690 | $ cp sym i |
|
690 | $ cp sym i | |
691 | $ ls -l i |
|
691 | $ ls -l i | |
692 | -rw-r--r--* (glob) |
|
692 | -rw-r--r--* (glob) | |
693 | $ head -1 i |
|
693 | $ head -1 i | |
694 | expand $Id: a,v ef63ca68695b 1970/01/01 00:00:00 user $ |
|
694 | expand $Id: a,v ef63ca68695b 1970/01/01 00:00:00 user $ | |
695 | $ hg copy --after --verbose sym i |
|
695 | $ hg copy --after --verbose sym i | |
696 | copying sym to i |
|
696 | copying sym to i | |
697 | overwriting i shrinking keywords |
|
697 | overwriting i shrinking keywords | |
698 | $ head -1 i |
|
698 | $ head -1 i | |
699 | expand $Id$ |
|
699 | expand $Id$ | |
700 | $ hg forget i |
|
700 | $ hg forget i | |
701 | $ rm i |
|
701 | $ rm i | |
702 | #endif |
|
702 | #endif | |
703 |
|
703 | |||
704 | Test different options of hg kwfiles |
|
704 | Test different options of hg kwfiles | |
705 |
|
705 | |||
706 | $ hg kwfiles |
|
706 | $ hg kwfiles | |
707 | a |
|
707 | a | |
708 | c |
|
708 | c | |
709 | $ hg -v kwfiles --ignore |
|
709 | $ hg -v kwfiles --ignore | |
710 | I b |
|
710 | I b | |
711 | I sym |
|
711 | I sym | |
712 | $ hg kwfiles --all |
|
712 | $ hg kwfiles --all | |
713 | K a |
|
713 | K a | |
714 | K c |
|
714 | K c | |
715 | I b |
|
715 | I b | |
716 | I sym |
|
716 | I sym | |
717 |
|
717 | |||
718 | Diff specific revision |
|
718 | Diff specific revision | |
719 |
|
719 | |||
720 | $ hg diff --rev 1 |
|
720 | $ hg diff --rev 1 | |
721 | diff -r ef63ca68695b c |
|
721 | diff -r ef63ca68695b c | |
722 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 |
|
722 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 | |
723 | +++ b/c * (glob) |
|
723 | +++ b/c * (glob) | |
724 | @@ -0,0 +1,3 @@ |
|
724 | @@ -0,0 +1,3 @@ | |
725 | +expand $Id$ |
|
725 | +expand $Id$ | |
726 | +do not process $Id: |
|
726 | +do not process $Id: | |
727 | +xxx $ |
|
727 | +xxx $ | |
728 |
|
728 | |||
729 | Status after rollback: |
|
729 | Status after rollback: | |
730 |
|
730 | |||
731 | $ hg rollback |
|
731 | $ hg rollback | |
732 | repository tip rolled back to revision 1 (undo commit) |
|
732 | repository tip rolled back to revision 1 (undo commit) | |
733 | working directory now based on revision 1 |
|
733 | working directory now based on revision 1 | |
734 | $ hg status |
|
734 | $ hg status | |
735 | A c |
|
735 | A c | |
736 | $ hg update --clean |
|
736 | $ hg update --clean | |
737 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
737 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
738 |
|
738 | |||
739 | #if symlink |
|
739 | #if symlink | |
740 |
|
740 | |||
741 | cp symlink file; hg cp -A symlink file (part2) |
|
741 | cp symlink file; hg cp -A symlink file (part2) | |
742 | - copied symlink points to kw ignored file: do not overwrite |
|
742 | - copied symlink points to kw ignored file: do not overwrite | |
743 |
|
743 | |||
744 | $ cat a > i |
|
744 | $ cat a > i | |
745 | $ ln -s i symignored |
|
745 | $ ln -s i symignored | |
746 | $ hg commit -Am 'fake expansion in ignored and symlink' i symignored |
|
746 | $ hg commit -Am 'fake expansion in ignored and symlink' i symignored | |
747 | $ cp symignored x |
|
747 | $ cp symignored x | |
748 | $ hg copy --after --verbose symignored x |
|
748 | $ hg copy --after --verbose symignored x | |
749 | copying symignored to x |
|
749 | copying symignored to x | |
750 | $ head -n 1 x |
|
750 | $ head -n 1 x | |
751 | expand $Id: a,v ef63ca68695b 1970/01/01 00:00:00 user $ |
|
751 | expand $Id: a,v ef63ca68695b 1970/01/01 00:00:00 user $ | |
752 | $ hg forget x |
|
752 | $ hg forget x | |
753 | $ rm x |
|
753 | $ rm x | |
754 |
|
754 | |||
755 | $ hg rollback |
|
755 | $ hg rollback | |
756 | repository tip rolled back to revision 1 (undo commit) |
|
756 | repository tip rolled back to revision 1 (undo commit) | |
757 | working directory now based on revision 1 |
|
757 | working directory now based on revision 1 | |
758 | $ hg update --clean |
|
758 | $ hg update --clean | |
759 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
759 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
760 | $ rm i symignored |
|
760 | $ rm i symignored | |
761 |
|
761 | |||
762 | #endif |
|
762 | #endif | |
763 |
|
763 | |||
764 | Custom keywordmaps as argument to kwdemo |
|
764 | Custom keywordmaps as argument to kwdemo | |
765 |
|
765 | |||
766 | $ hg --quiet kwdemo "Xinfo = {author}: {desc}" |
|
766 | $ hg --quiet kwdemo "Xinfo = {author}: {desc}" | |
767 | [extensions] |
|
767 | [extensions] | |
768 | keyword = |
|
768 | keyword = | |
769 | [keyword] |
|
769 | [keyword] | |
770 | ** = |
|
770 | ** = | |
771 | b = ignore |
|
771 | b = ignore | |
772 | demo.txt = |
|
772 | demo.txt = | |
773 | i = ignore |
|
773 | i = ignore | |
774 | [keywordset] |
|
774 | [keywordset] | |
775 | svn = False |
|
775 | svn = False | |
776 | [keywordmaps] |
|
776 | [keywordmaps] | |
777 | Xinfo = {author}: {desc} |
|
777 | Xinfo = {author}: {desc} | |
778 | $Xinfo: test: hg keyword configuration and expansion example $ |
|
778 | $Xinfo: test: hg keyword configuration and expansion example $ | |
779 |
|
779 | |||
780 | Configure custom keywordmaps |
|
780 | Configure custom keywordmaps | |
781 |
|
781 | |||
782 | $ cat <<EOF >>$HGRCPATH |
|
782 | $ cat <<EOF >>$HGRCPATH | |
783 | > [keywordmaps] |
|
783 | > [keywordmaps] | |
784 | > Id = {file} {node|short} {date|rfc822date} {author|user} |
|
784 | > Id = {file} {node|short} {date|rfc822date} {author|user} | |
785 | > Xinfo = {author}: {desc} |
|
785 | > Xinfo = {author}: {desc} | |
786 | > EOF |
|
786 | > EOF | |
787 |
|
787 | |||
788 | Cat and hg cat files before custom expansion |
|
788 | Cat and hg cat files before custom expansion | |
789 |
|
789 | |||
790 | $ cat a b |
|
790 | $ cat a b | |
791 | expand $Id: a,v ef63ca68695b 1970/01/01 00:00:00 user $ |
|
791 | expand $Id: a,v ef63ca68695b 1970/01/01 00:00:00 user $ | |
792 | do not process $Id: |
|
792 | do not process $Id: | |
793 | xxx $ |
|
793 | xxx $ | |
794 | ignore $Id$ |
|
794 | ignore $Id$ | |
795 | $ hg cat sym a b && echo |
|
795 | $ hg cat sym a b && echo | |
796 | expand $Id: a ef63ca68695b Thu, 01 Jan 1970 00:00:00 +0000 user $ |
|
796 | expand $Id: a ef63ca68695b Thu, 01 Jan 1970 00:00:00 +0000 user $ | |
797 | do not process $Id: |
|
797 | do not process $Id: | |
798 | xxx $ |
|
798 | xxx $ | |
799 | ignore $Id$ |
|
799 | ignore $Id$ | |
800 | a |
|
800 | a | |
801 |
|
801 | |||
802 | Write custom keyword and prepare multi-line commit message |
|
802 | Write custom keyword and prepare multi-line commit message | |
803 |
|
803 | |||
804 | $ echo '$Xinfo$' >> a |
|
804 | $ echo '$Xinfo$' >> a | |
805 | $ cat <<EOF >> log |
|
805 | $ cat <<EOF >> log | |
806 | > firstline |
|
806 | > firstline | |
807 | > secondline |
|
807 | > secondline | |
808 | > EOF |
|
808 | > EOF | |
809 |
|
809 | |||
810 | Interrupted commit should not change state |
|
810 | Interrupted commit should not change state | |
811 |
|
811 | |||
812 | $ hg commit |
|
812 | $ hg commit | |
813 | abort: empty commit message |
|
813 | abort: empty commit message | |
814 | [255] |
|
814 | [255] | |
815 | $ hg status |
|
815 | $ hg status | |
816 | M a |
|
816 | M a | |
817 | ? c |
|
817 | ? c | |
818 | ? log |
|
818 | ? log | |
819 |
|
819 | |||
820 | Commit with multi-line message and custom expansion |
|
820 | Commit with multi-line message and custom expansion | |
821 |
|
821 | |||
822 | $ hg --debug commit -l log -d '2 0' -u 'User Name <user@example.com>' |
|
822 | $ hg --debug commit -l log -d '2 0' -u 'User Name <user@example.com>' | |
823 | committing files: |
|
823 | committing files: | |
824 | a |
|
824 | a | |
825 | committing manifest |
|
825 | committing manifest | |
826 | committing changelog |
|
826 | committing changelog | |
827 | overwriting a expanding keywords |
|
827 | overwriting a expanding keywords | |
828 | updating the branch cache |
|
828 | updating the branch cache | |
829 | committed changeset 2:bb948857c743469b22bbf51f7ec8112279ca5d83 |
|
829 | committed changeset 2:bb948857c743469b22bbf51f7ec8112279ca5d83 | |
830 | $ rm log |
|
830 | $ rm log | |
831 |
|
831 | |||
832 | Stat, verify and show custom expansion (firstline) |
|
832 | Stat, verify and show custom expansion (firstline) | |
833 |
|
833 | |||
834 | $ hg status |
|
834 | $ hg status | |
835 | ? c |
|
835 | ? c | |
836 | $ hg verify |
|
836 | $ hg verify | |
837 | checking changesets |
|
837 | checking changesets | |
838 | checking manifests |
|
838 | checking manifests | |
839 | crosschecking files in changesets and manifests |
|
839 | crosschecking files in changesets and manifests | |
840 | checking files |
|
840 | checking files | |
841 | 3 files, 3 changesets, 4 total revisions |
|
841 | 3 files, 3 changesets, 4 total revisions | |
842 | $ cat a b |
|
842 | $ cat a b | |
843 | expand $Id: a bb948857c743 Thu, 01 Jan 1970 00:00:02 +0000 user $ |
|
843 | expand $Id: a bb948857c743 Thu, 01 Jan 1970 00:00:02 +0000 user $ | |
844 | do not process $Id: |
|
844 | do not process $Id: | |
845 | xxx $ |
|
845 | xxx $ | |
846 | $Xinfo: User Name <user@example.com>: firstline $ |
|
846 | $Xinfo: User Name <user@example.com>: firstline $ | |
847 | ignore $Id$ |
|
847 | ignore $Id$ | |
848 | $ hg cat sym a b && echo |
|
848 | $ hg cat sym a b && echo | |
849 | expand $Id: a bb948857c743 Thu, 01 Jan 1970 00:00:02 +0000 user $ |
|
849 | expand $Id: a bb948857c743 Thu, 01 Jan 1970 00:00:02 +0000 user $ | |
850 | do not process $Id: |
|
850 | do not process $Id: | |
851 | xxx $ |
|
851 | xxx $ | |
852 | $Xinfo: User Name <user@example.com>: firstline $ |
|
852 | $Xinfo: User Name <user@example.com>: firstline $ | |
853 | ignore $Id$ |
|
853 | ignore $Id$ | |
854 | a |
|
854 | a | |
855 |
|
855 | |||
856 | annotate |
|
856 | annotate | |
857 |
|
857 | |||
858 | $ hg annotate a |
|
858 | $ hg annotate a | |
859 | 1: expand $Id$ |
|
859 | 1: expand $Id$ | |
860 | 1: do not process $Id: |
|
860 | 1: do not process $Id: | |
861 | 1: xxx $ |
|
861 | 1: xxx $ | |
862 | 2: $Xinfo$ |
|
862 | 2: $Xinfo$ | |
863 |
|
863 | |||
864 | remove with status checks |
|
864 | remove with status checks | |
865 |
|
865 | |||
866 | $ hg debugrebuildstate |
|
866 | $ hg debugrebuildstate | |
867 | $ hg remove a |
|
867 | $ hg remove a | |
868 | $ hg --debug commit -m rma |
|
868 | $ hg --debug commit -m rma | |
869 | committing files: |
|
869 | committing files: | |
870 | committing manifest |
|
870 | committing manifest | |
871 | committing changelog |
|
871 | committing changelog | |
872 | updating the branch cache |
|
872 | updating the branch cache | |
873 | committed changeset 3:d14c712653769de926994cf7fbb06c8fbd68f012 |
|
873 | committed changeset 3:d14c712653769de926994cf7fbb06c8fbd68f012 | |
874 | $ hg status |
|
874 | $ hg status | |
875 | ? c |
|
875 | ? c | |
876 |
|
876 | |||
877 | Rollback, revert, and check expansion |
|
877 | Rollback, revert, and check expansion | |
878 |
|
878 | |||
879 | $ hg rollback |
|
879 | $ hg rollback | |
880 | repository tip rolled back to revision 2 (undo commit) |
|
880 | repository tip rolled back to revision 2 (undo commit) | |
881 | working directory now based on revision 2 |
|
881 | working directory now based on revision 2 | |
882 | $ hg status |
|
882 | $ hg status | |
883 | R a |
|
883 | R a | |
884 | ? c |
|
884 | ? c | |
885 | $ hg revert --no-backup --rev tip a |
|
885 | $ hg revert --no-backup --rev tip a | |
886 | $ cat a |
|
886 | $ cat a | |
887 | expand $Id: a bb948857c743 Thu, 01 Jan 1970 00:00:02 +0000 user $ |
|
887 | expand $Id: a bb948857c743 Thu, 01 Jan 1970 00:00:02 +0000 user $ | |
888 | do not process $Id: |
|
888 | do not process $Id: | |
889 | xxx $ |
|
889 | xxx $ | |
890 | $Xinfo: User Name <user@example.com>: firstline $ |
|
890 | $Xinfo: User Name <user@example.com>: firstline $ | |
891 |
|
891 | |||
892 | Clone to test global and local configurations |
|
892 | Clone to test global and local configurations | |
893 |
|
893 | |||
894 | $ cd .. |
|
894 | $ cd .. | |
895 |
|
895 | |||
896 | Expansion in destination with global configuration |
|
896 | Expansion in destination with global configuration | |
897 |
|
897 | |||
898 | $ hg --quiet clone Test globalconf |
|
898 | $ hg --quiet clone Test globalconf | |
899 | $ cat globalconf/a |
|
899 | $ cat globalconf/a | |
900 | expand $Id: a bb948857c743 Thu, 01 Jan 1970 00:00:02 +0000 user $ |
|
900 | expand $Id: a bb948857c743 Thu, 01 Jan 1970 00:00:02 +0000 user $ | |
901 | do not process $Id: |
|
901 | do not process $Id: | |
902 | xxx $ |
|
902 | xxx $ | |
903 | $Xinfo: User Name <user@example.com>: firstline $ |
|
903 | $Xinfo: User Name <user@example.com>: firstline $ | |
904 |
|
904 | |||
905 | No expansion in destination with local configuration in origin only |
|
905 | No expansion in destination with local configuration in origin only | |
906 |
|
906 | |||
907 | $ hg --quiet --config 'keyword.**=ignore' clone Test localconf |
|
907 | $ hg --quiet --config 'keyword.**=ignore' clone Test localconf | |
908 | $ cat localconf/a |
|
908 | $ cat localconf/a | |
909 | expand $Id$ |
|
909 | expand $Id$ | |
910 | do not process $Id: |
|
910 | do not process $Id: | |
911 | xxx $ |
|
911 | xxx $ | |
912 | $Xinfo$ |
|
912 | $Xinfo$ | |
913 |
|
913 | |||
914 | Clone to test incoming |
|
914 | Clone to test incoming | |
915 |
|
915 | |||
916 | $ hg clone -r1 Test Test-a |
|
916 | $ hg clone -r1 Test Test-a | |
917 | adding changesets |
|
917 | adding changesets | |
918 | adding manifests |
|
918 | adding manifests | |
919 | adding file changes |
|
919 | adding file changes | |
920 | added 2 changesets with 3 changes to 3 files |
|
920 | added 2 changesets with 3 changes to 3 files | |
921 | updating to branch default |
|
921 | updating to branch default | |
922 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
922 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
923 | $ cd Test-a |
|
923 | $ cd Test-a | |
924 | $ cat <<EOF >> .hg/hgrc |
|
924 | $ cat <<EOF >> .hg/hgrc | |
925 | > [paths] |
|
925 | > [paths] | |
926 | > default = ../Test |
|
926 | > default = ../Test | |
927 | > EOF |
|
927 | > EOF | |
928 | $ hg incoming |
|
928 | $ hg incoming | |
929 | comparing with $TESTTMP/Test (glob) |
|
929 | comparing with $TESTTMP/Test (glob) | |
930 | searching for changes |
|
930 | searching for changes | |
931 | changeset: 2:bb948857c743 |
|
931 | changeset: 2:bb948857c743 | |
932 | tag: tip |
|
932 | tag: tip | |
933 | user: User Name <user@example.com> |
|
933 | user: User Name <user@example.com> | |
934 | date: Thu Jan 01 00:00:02 1970 +0000 |
|
934 | date: Thu Jan 01 00:00:02 1970 +0000 | |
935 | summary: firstline |
|
935 | summary: firstline | |
936 |
|
936 | |||
937 | Imported patch should not be rejected |
|
937 | Imported patch should not be rejected | |
938 |
|
938 | |||
939 | >>> import re |
|
939 | >>> import re | |
940 | >>> text = re.sub(r'(Id.*)', r'\1 rejecttest', open('a').read()) |
|
940 | >>> text = re.sub(r'(Id.*)', r'\1 rejecttest', open('a').read()) | |
941 | >>> open('a', 'wb').write(text) |
|
941 | >>> open('a', 'wb').write(text) | |
942 | $ hg --debug commit -m'rejects?' -d '3 0' -u 'User Name <user@example.com>' |
|
942 | $ hg --debug commit -m'rejects?' -d '3 0' -u 'User Name <user@example.com>' | |
943 | committing files: |
|
943 | committing files: | |
944 | a |
|
944 | a | |
945 | committing manifest |
|
945 | committing manifest | |
946 | committing changelog |
|
946 | committing changelog | |
947 | overwriting a expanding keywords |
|
947 | overwriting a expanding keywords | |
948 | updating the branch cache |
|
948 | updating the branch cache | |
949 | committed changeset 2:85e279d709ffc28c9fdd1b868570985fc3d87082 |
|
949 | committed changeset 2:85e279d709ffc28c9fdd1b868570985fc3d87082 | |
950 | $ hg export -o ../rejecttest.diff tip |
|
950 | $ hg export -o ../rejecttest.diff tip | |
951 | $ cd ../Test |
|
951 | $ cd ../Test | |
952 | $ hg import ../rejecttest.diff |
|
952 | $ hg import ../rejecttest.diff | |
953 | applying ../rejecttest.diff |
|
953 | applying ../rejecttest.diff | |
954 | $ cat a b |
|
954 | $ cat a b | |
955 | expand $Id: a 4e0994474d25 Thu, 01 Jan 1970 00:00:03 +0000 user $ rejecttest |
|
955 | expand $Id: a 4e0994474d25 Thu, 01 Jan 1970 00:00:03 +0000 user $ rejecttest | |
956 | do not process $Id: rejecttest |
|
956 | do not process $Id: rejecttest | |
957 | xxx $ |
|
957 | xxx $ | |
958 | $Xinfo: User Name <user@example.com>: rejects? $ |
|
958 | $Xinfo: User Name <user@example.com>: rejects? $ | |
959 | ignore $Id$ |
|
959 | ignore $Id$ | |
960 |
|
960 | |||
961 | $ hg rollback |
|
961 | $ hg rollback | |
962 | repository tip rolled back to revision 2 (undo import) |
|
962 | repository tip rolled back to revision 2 (undo import) | |
963 | working directory now based on revision 2 |
|
963 | working directory now based on revision 2 | |
964 | $ hg update --clean |
|
964 | $ hg update --clean | |
965 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
965 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
966 |
|
966 | |||
967 | kwexpand/kwshrink on selected files |
|
967 | kwexpand/kwshrink on selected files | |
968 |
|
968 | |||
969 | $ mkdir x |
|
969 | $ mkdir x | |
970 | $ hg copy a x/a |
|
970 | $ hg copy a x/a | |
971 | $ hg --verbose kwshrink a |
|
971 | $ hg --verbose kwshrink a | |
972 | overwriting a shrinking keywords |
|
972 | overwriting a shrinking keywords | |
973 | - sleep required for dirstate.normal() check |
|
973 | - sleep required for dirstate.normal() check | |
974 | $ sleep 1 |
|
974 | $ sleep 1 | |
975 | $ hg status a |
|
975 | $ hg status a | |
976 | $ hg --verbose kwexpand a |
|
976 | $ hg --verbose kwexpand a | |
977 | overwriting a expanding keywords |
|
977 | overwriting a expanding keywords | |
978 | $ hg status a |
|
978 | $ hg status a | |
979 |
|
979 | |||
980 | kwexpand x/a should abort |
|
980 | kwexpand x/a should abort | |
981 |
|
981 | |||
982 | $ hg --verbose kwexpand x/a |
|
982 | $ hg --verbose kwexpand x/a | |
983 | abort: outstanding uncommitted changes |
|
983 | abort: outstanding uncommitted changes | |
984 | [255] |
|
984 | [255] | |
985 | $ cd x |
|
985 | $ cd x | |
986 | $ hg --debug commit -m xa -d '3 0' -u 'User Name <user@example.com>' |
|
986 | $ hg --debug commit -m xa -d '3 0' -u 'User Name <user@example.com>' | |
987 | committing files: |
|
987 | committing files: | |
988 | x/a |
|
988 | x/a | |
989 | x/a: copy a:779c764182ce5d43e2b1eb66ce06d7b47bfe342e |
|
989 | x/a: copy a:779c764182ce5d43e2b1eb66ce06d7b47bfe342e | |
990 | committing manifest |
|
990 | committing manifest | |
991 | committing changelog |
|
991 | committing changelog | |
992 | overwriting x/a expanding keywords |
|
992 | overwriting x/a expanding keywords | |
993 | updating the branch cache |
|
993 | updating the branch cache | |
994 | committed changeset 3:b4560182a3f9a358179fd2d835c15e9da379c1e4 |
|
994 | committed changeset 3:b4560182a3f9a358179fd2d835c15e9da379c1e4 | |
995 | $ cat a |
|
995 | $ cat a | |
996 | expand $Id: x/a b4560182a3f9 Thu, 01 Jan 1970 00:00:03 +0000 user $ |
|
996 | expand $Id: x/a b4560182a3f9 Thu, 01 Jan 1970 00:00:03 +0000 user $ | |
997 | do not process $Id: |
|
997 | do not process $Id: | |
998 | xxx $ |
|
998 | xxx $ | |
999 | $Xinfo: User Name <user@example.com>: xa $ |
|
999 | $Xinfo: User Name <user@example.com>: xa $ | |
1000 |
|
1000 | |||
1001 | kwshrink a inside directory x |
|
1001 | kwshrink a inside directory x | |
1002 |
|
1002 | |||
1003 | $ hg --verbose kwshrink a |
|
1003 | $ hg --verbose kwshrink a | |
1004 | overwriting x/a shrinking keywords |
|
1004 | overwriting x/a shrinking keywords | |
1005 | $ cat a |
|
1005 | $ cat a | |
1006 | expand $Id$ |
|
1006 | expand $Id$ | |
1007 | do not process $Id: |
|
1007 | do not process $Id: | |
1008 | xxx $ |
|
1008 | xxx $ | |
1009 | $Xinfo$ |
|
1009 | $Xinfo$ | |
1010 | $ cd .. |
|
1010 | $ cd .. | |
1011 |
|
1011 | |||
1012 | kwexpand nonexistent |
|
1012 | kwexpand nonexistent | |
1013 |
|
1013 | |||
1014 | $ hg kwexpand nonexistent |
|
1014 | $ hg kwexpand nonexistent | |
1015 | nonexistent:* (glob) |
|
1015 | nonexistent:* (glob) | |
1016 |
|
1016 | |||
1017 |
|
1017 | |||
1018 | #if serve |
|
1018 | #if serve | |
1019 | hg serve |
|
1019 | hg serve | |
1020 | - expand with hgweb file |
|
1020 | - expand with hgweb file | |
1021 | - no expansion with hgweb annotate/changeset/filediff/comparison |
|
1021 | - no expansion with hgweb annotate/changeset/filediff/comparison | |
1022 | - expand with hgweb file, again |
|
1022 | - expand with hgweb file, again | |
1023 | - check errors |
|
1023 | - check errors | |
1024 |
|
1024 | |||
1025 | $ hg serve -p $HGPORT -d --pid-file=hg.pid -A access.log -E errors.log |
|
1025 | $ hg serve -p $HGPORT -d --pid-file=hg.pid -A access.log -E errors.log | |
1026 | $ cat hg.pid >> $DAEMON_PIDS |
|
1026 | $ cat hg.pid >> $DAEMON_PIDS | |
1027 | $ get-with-headers.py localhost:$HGPORT 'file/tip/a/?style=raw' |
|
1027 | $ get-with-headers.py localhost:$HGPORT 'file/tip/a/?style=raw' | |
1028 | 200 Script output follows |
|
1028 | 200 Script output follows | |
1029 |
|
1029 | |||
1030 | expand $Id: a bb948857c743 Thu, 01 Jan 1970 00:00:02 +0000 user $ |
|
1030 | expand $Id: a bb948857c743 Thu, 01 Jan 1970 00:00:02 +0000 user $ | |
1031 | do not process $Id: |
|
1031 | do not process $Id: | |
1032 | xxx $ |
|
1032 | xxx $ | |
1033 | $Xinfo: User Name <user@example.com>: firstline $ |
|
1033 | $Xinfo: User Name <user@example.com>: firstline $ | |
1034 | $ get-with-headers.py localhost:$HGPORT 'annotate/tip/a/?style=raw' |
|
1034 | $ get-with-headers.py localhost:$HGPORT 'annotate/tip/a/?style=raw' | |
1035 | 200 Script output follows |
|
1035 | 200 Script output follows | |
1036 |
|
1036 | |||
1037 |
|
1037 | |||
1038 | user@1: expand $Id$ |
|
1038 | user@1: expand $Id$ | |
1039 | user@1: do not process $Id: |
|
1039 | user@1: do not process $Id: | |
1040 | user@1: xxx $ |
|
1040 | user@1: xxx $ | |
1041 | user@2: $Xinfo$ |
|
1041 | user@2: $Xinfo$ | |
1042 |
|
1042 | |||
1043 |
|
1043 | |||
1044 |
|
1044 | |||
1045 |
|
1045 | |||
1046 | $ get-with-headers.py localhost:$HGPORT 'rev/tip/?style=raw' |
|
1046 | $ get-with-headers.py localhost:$HGPORT 'rev/tip/?style=raw' | |
1047 | 200 Script output follows |
|
1047 | 200 Script output follows | |
1048 |
|
1048 | |||
1049 |
|
1049 | |||
1050 | # HG changeset patch |
|
1050 | # HG changeset patch | |
1051 | # User User Name <user@example.com> |
|
1051 | # User User Name <user@example.com> | |
1052 | # Date 3 0 |
|
1052 | # Date 3 0 | |
1053 | # Node ID b4560182a3f9a358179fd2d835c15e9da379c1e4 |
|
1053 | # Node ID b4560182a3f9a358179fd2d835c15e9da379c1e4 | |
1054 | # Parent bb948857c743469b22bbf51f7ec8112279ca5d83 |
|
1054 | # Parent bb948857c743469b22bbf51f7ec8112279ca5d83 | |
1055 | xa |
|
1055 | xa | |
1056 |
|
1056 | |||
1057 | diff -r bb948857c743 -r b4560182a3f9 x/a |
|
1057 | diff -r bb948857c743 -r b4560182a3f9 x/a | |
1058 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 |
|
1058 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 | |
1059 | +++ b/x/a Thu Jan 01 00:00:03 1970 +0000 |
|
1059 | +++ b/x/a Thu Jan 01 00:00:03 1970 +0000 | |
1060 | @@ -0,0 +1,4 @@ |
|
1060 | @@ -0,0 +1,4 @@ | |
1061 | +expand $Id$ |
|
1061 | +expand $Id$ | |
1062 | +do not process $Id: |
|
1062 | +do not process $Id: | |
1063 | +xxx $ |
|
1063 | +xxx $ | |
1064 | +$Xinfo$ |
|
1064 | +$Xinfo$ | |
1065 |
|
1065 | |||
1066 | $ get-with-headers.py localhost:$HGPORT 'diff/bb948857c743/a?style=raw' |
|
1066 | $ get-with-headers.py localhost:$HGPORT 'diff/bb948857c743/a?style=raw' | |
1067 | 200 Script output follows |
|
1067 | 200 Script output follows | |
1068 |
|
1068 | |||
1069 |
|
1069 | |||
1070 | diff -r ef63ca68695b -r bb948857c743 a |
|
1070 | diff -r ef63ca68695b -r bb948857c743 a | |
1071 | --- a/a Thu Jan 01 00:00:00 1970 +0000 |
|
1071 | --- a/a Thu Jan 01 00:00:00 1970 +0000 | |
1072 | +++ b/a Thu Jan 01 00:00:02 1970 +0000 |
|
1072 | +++ b/a Thu Jan 01 00:00:02 1970 +0000 | |
1073 | @@ -1,3 +1,4 @@ |
|
1073 | @@ -1,3 +1,4 @@ | |
1074 | expand $Id$ |
|
1074 | expand $Id$ | |
1075 | do not process $Id: |
|
1075 | do not process $Id: | |
1076 | xxx $ |
|
1076 | xxx $ | |
1077 | +$Xinfo$ |
|
1077 | +$Xinfo$ | |
1078 |
|
1078 | |||
1079 |
|
1079 | |||
1080 |
|
1080 | |||
1081 |
|
1081 | |||
1082 | $ get-with-headers.py localhost:$HGPORT 'comparison/bb948857c743/a' | grep '\$[a-zA-Z]' |
|
1082 | $ get-with-headers.py localhost:$HGPORT 'comparison/bb948857c743/a' | grep '\$[a-zA-Z]' | |
1083 | <td class="source equal"><a href="#l1r1"> 1</a> expand $Id$</td> |
|
1083 | <td class="source equal"><a href="#l1r1"> 1</a> expand $Id$</td> | |
1084 | <td class="source equal"><a href="#l1r1"> 1</a> expand $Id$</td> |
|
1084 | <td class="source equal"><a href="#l1r1"> 1</a> expand $Id$</td> | |
1085 | <td class="source equal"><a href="#l2r2"> 2</a> do not process $Id:</td> |
|
1085 | <td class="source equal"><a href="#l2r2"> 2</a> do not process $Id:</td> | |
1086 | <td class="source equal"><a href="#l2r2"> 2</a> do not process $Id:</td> |
|
1086 | <td class="source equal"><a href="#l2r2"> 2</a> do not process $Id:</td> | |
1087 | <td class="source insert"><a href="#r4"> 4</a> $Xinfo$</td> |
|
1087 | <td class="source insert"><a href="#r4"> 4</a> $Xinfo$</td> | |
1088 |
|
1088 | |||
1089 | (check "kwweb_skip"-ed webcommand doesn't suppress expanding keywords |
|
1089 | (check "kwweb_skip"-ed webcommand doesn't suppress expanding keywords | |
1090 | at subsequent webcommands) |
|
1090 | at subsequent webcommands) | |
1091 |
|
1091 | |||
1092 | $ get-with-headers.py localhost:$HGPORT 'file/tip/a/?style=raw' |
|
1092 | $ get-with-headers.py localhost:$HGPORT 'file/tip/a/?style=raw' | |
1093 | 200 Script output follows |
|
1093 | 200 Script output follows | |
1094 |
|
1094 | |||
1095 | expand $Id: a bb948857c743 Thu, 01 Jan 1970 00:00:02 +0000 user $ |
|
1095 | expand $Id: a bb948857c743 Thu, 01 Jan 1970 00:00:02 +0000 user $ | |
1096 | do not process $Id: |
|
1096 | do not process $Id: | |
1097 | xxx $ |
|
1097 | xxx $ | |
1098 | $Xinfo: User Name <user@example.com>: firstline $ |
|
1098 | $Xinfo: User Name <user@example.com>: firstline $ | |
1099 |
|
1099 | |||
1100 | $ killdaemons.py |
|
1100 | $ killdaemons.py | |
1101 | $ cat errors.log |
|
1101 | $ cat errors.log | |
1102 | #endif |
|
1102 | #endif | |
1103 |
|
1103 | |||
1104 | Prepare merge and resolve tests |
|
1104 | Prepare merge and resolve tests | |
1105 |
|
1105 | |||
1106 | $ echo '$Id$' > m |
|
1106 | $ echo '$Id$' > m | |
1107 | $ hg add m |
|
1107 | $ hg add m | |
1108 | $ hg commit -m 4kw |
|
1108 | $ hg commit -m 4kw | |
1109 | $ echo foo >> m |
|
1109 | $ echo foo >> m | |
1110 | $ hg commit -m 5foo |
|
1110 | $ hg commit -m 5foo | |
1111 |
|
1111 | |||
1112 | simplemerge |
|
1112 | simplemerge | |
1113 |
|
1113 | |||
1114 | $ hg update 4 |
|
1114 | $ hg update 4 | |
1115 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
1115 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
1116 | $ echo foo >> m |
|
1116 | $ echo foo >> m | |
1117 | $ hg commit -m 6foo |
|
1117 | $ hg commit -m 6foo | |
1118 | created new head |
|
1118 | created new head | |
1119 | $ hg merge |
|
1119 | $ hg merge | |
1120 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
1120 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
1121 | (branch merge, don't forget to commit) |
|
1121 | (branch merge, don't forget to commit) | |
1122 | $ hg commit -m simplemerge |
|
1122 | $ hg commit -m simplemerge | |
1123 | $ cat m |
|
1123 | $ cat m | |
1124 | $Id: m 27d48ee14f67 Thu, 01 Jan 1970 00:00:00 +0000 test $ |
|
1124 | $Id: m 27d48ee14f67 Thu, 01 Jan 1970 00:00:00 +0000 test $ | |
1125 | foo |
|
1125 | foo | |
1126 |
|
1126 | |||
1127 | conflict: keyword should stay outside conflict zone |
|
1127 | conflict: keyword should stay outside conflict zone | |
1128 |
|
1128 | |||
1129 | $ hg update 4 |
|
1129 | $ hg update 4 | |
1130 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
1130 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
1131 | $ echo bar >> m |
|
1131 | $ echo bar >> m | |
1132 | $ hg commit -m 8bar |
|
1132 | $ hg commit -m 8bar | |
1133 | created new head |
|
1133 | created new head | |
1134 | $ hg merge |
|
1134 | $ hg merge | |
1135 | merging m |
|
1135 | merging m | |
1136 | warning: conflicts while merging m! (edit, then use 'hg resolve --mark') |
|
1136 | warning: conflicts while merging m! (edit, then use 'hg resolve --mark') | |
1137 | 0 files updated, 0 files merged, 0 files removed, 1 files unresolved |
|
1137 | 0 files updated, 0 files merged, 0 files removed, 1 files unresolved | |
1138 | use 'hg resolve' to retry unresolved file merges or 'hg update -C .' to abandon |
|
1138 | use 'hg resolve' to retry unresolved file merges or 'hg update -C .' to abandon | |
1139 | [1] |
|
1139 | [1] | |
1140 | $ cat m |
|
1140 | $ cat m | |
1141 | $Id$ |
|
1141 | $Id$ | |
1142 | <<<<<<< working copy: 88a80c8d172e - test: 8bar |
|
1142 | <<<<<<< working copy: 88a80c8d172e - test: 8bar | |
1143 | bar |
|
1143 | bar | |
1144 | ======= |
|
1144 | ======= | |
1145 | foo |
|
1145 | foo | |
1146 | >>>>>>> merge rev: 85d2d2d732a5 - test: simplemerge |
|
1146 | >>>>>>> merge rev: 85d2d2d732a5 - test: simplemerge | |
1147 |
|
1147 | |||
1148 | resolve to local, m must contain hash of last change (local parent) |
|
1148 | resolve to local, m must contain hash of last change (local parent) | |
1149 |
|
1149 | |||
1150 | $ hg resolve -t internal:local -a |
|
1150 | $ hg resolve -t internal:local -a | |
1151 | (no more unresolved files) |
|
1151 | (no more unresolved files) | |
1152 | $ hg commit -m localresolve |
|
1152 | $ hg commit -m localresolve | |
1153 | $ cat m |
|
1153 | $ cat m | |
1154 | $Id: m 88a80c8d172e Thu, 01 Jan 1970 00:00:00 +0000 test $ |
|
1154 | $Id: m 88a80c8d172e Thu, 01 Jan 1970 00:00:00 +0000 test $ | |
1155 | bar |
|
1155 | bar | |
1156 |
|
1156 | |||
1157 | Test restricted mode with transplant -b |
|
1157 | Test restricted mode with transplant -b | |
1158 |
|
1158 | |||
1159 | $ hg update 6 |
|
1159 | $ hg update 6 | |
1160 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
1160 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
1161 | $ hg branch foo |
|
1161 | $ hg branch foo | |
1162 | marked working directory as branch foo |
|
1162 | marked working directory as branch foo | |
1163 | (branches are permanent and global, did you want a bookmark?) |
|
1163 | (branches are permanent and global, did you want a bookmark?) | |
1164 | $ mv a a.bak |
|
1164 | $ mv a a.bak | |
1165 | $ echo foobranch > a |
|
1165 | $ echo foobranch > a | |
1166 | $ cat a.bak >> a |
|
1166 | $ cat a.bak >> a | |
1167 | $ rm a.bak |
|
1167 | $ rm a.bak | |
1168 | $ hg commit -m 9foobranch |
|
1168 | $ hg commit -m 9foobranch | |
1169 | $ hg update default |
|
1169 | $ hg update default | |
1170 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
1170 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
1171 | $ hg -y transplant -b foo tip |
|
1171 | $ hg -y transplant -b foo tip | |
1172 | applying 4aa30d025d50 |
|
1172 | applying 4aa30d025d50 | |
1173 | 4aa30d025d50 transplanted to e00abbf63521 |
|
1173 | 4aa30d025d50 transplanted to e00abbf63521 | |
1174 |
|
1174 | |||
1175 | Expansion in changeset but not in file |
|
1175 | Expansion in changeset but not in file | |
1176 |
|
1176 | |||
1177 | $ hg tip -p |
|
1177 | $ hg tip -p | |
1178 | changeset: 11:e00abbf63521 |
|
1178 | changeset: 11:e00abbf63521 | |
1179 | tag: tip |
|
1179 | tag: tip | |
1180 | parent: 9:800511b3a22d |
|
1180 | parent: 9:800511b3a22d | |
1181 | user: test |
|
1181 | user: test | |
1182 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
1182 | date: Thu Jan 01 00:00:00 1970 +0000 | |
1183 | summary: 9foobranch |
|
1183 | summary: 9foobranch | |
1184 |
|
1184 | |||
1185 | diff -r 800511b3a22d -r e00abbf63521 a |
|
1185 | diff -r 800511b3a22d -r e00abbf63521 a | |
1186 | --- a/a Thu Jan 01 00:00:00 1970 +0000 |
|
1186 | --- a/a Thu Jan 01 00:00:00 1970 +0000 | |
1187 | +++ b/a Thu Jan 01 00:00:00 1970 +0000 |
|
1187 | +++ b/a Thu Jan 01 00:00:00 1970 +0000 | |
1188 | @@ -1,3 +1,4 @@ |
|
1188 | @@ -1,3 +1,4 @@ | |
1189 | +foobranch |
|
1189 | +foobranch | |
1190 | expand $Id$ |
|
1190 | expand $Id$ | |
1191 | do not process $Id: |
|
1191 | do not process $Id: | |
1192 | xxx $ |
|
1192 | xxx $ | |
1193 |
|
1193 | |||
1194 | $ head -n 2 a |
|
1194 | $ head -n 2 a | |
1195 | foobranch |
|
1195 | foobranch | |
1196 | expand $Id: a e00abbf63521 Thu, 01 Jan 1970 00:00:00 +0000 test $ |
|
1196 | expand $Id: a e00abbf63521 Thu, 01 Jan 1970 00:00:00 +0000 test $ | |
1197 |
|
1197 | |||
1198 | Turn off expansion |
|
1198 | Turn off expansion | |
1199 |
|
1199 | |||
1200 | $ hg -q rollback |
|
1200 | $ hg -q rollback | |
1201 | $ hg -q update -C |
|
1201 | $ hg -q update -C | |
1202 |
|
1202 | |||
1203 | kwshrink with unknown file u |
|
1203 | kwshrink with unknown file u | |
1204 |
|
1204 | |||
1205 | $ cp a u |
|
1205 | $ cp a u | |
1206 | $ hg --verbose kwshrink |
|
1206 | $ hg --verbose kwshrink | |
1207 | overwriting a shrinking keywords |
|
1207 | overwriting a shrinking keywords | |
1208 | overwriting m shrinking keywords |
|
1208 | overwriting m shrinking keywords | |
1209 | overwriting x/a shrinking keywords |
|
1209 | overwriting x/a shrinking keywords | |
1210 |
|
1210 | |||
1211 | Keywords shrunk in working directory, but not yet disabled |
|
1211 | Keywords shrunk in working directory, but not yet disabled | |
1212 | - cat shows unexpanded keywords |
|
1212 | - cat shows unexpanded keywords | |
1213 | - hg cat shows expanded keywords |
|
1213 | - hg cat shows expanded keywords | |
1214 |
|
1214 | |||
1215 | $ cat a b |
|
1215 | $ cat a b | |
1216 | expand $Id$ |
|
1216 | expand $Id$ | |
1217 | do not process $Id: |
|
1217 | do not process $Id: | |
1218 | xxx $ |
|
1218 | xxx $ | |
1219 | $Xinfo$ |
|
1219 | $Xinfo$ | |
1220 | ignore $Id$ |
|
1220 | ignore $Id$ | |
1221 | $ hg cat sym a b && echo |
|
1221 | $ hg cat sym a b && echo | |
1222 | expand $Id: a bb948857c743 Thu, 01 Jan 1970 00:00:02 +0000 user $ |
|
1222 | expand $Id: a bb948857c743 Thu, 01 Jan 1970 00:00:02 +0000 user $ | |
1223 | do not process $Id: |
|
1223 | do not process $Id: | |
1224 | xxx $ |
|
1224 | xxx $ | |
1225 | $Xinfo: User Name <user@example.com>: firstline $ |
|
1225 | $Xinfo: User Name <user@example.com>: firstline $ | |
1226 | ignore $Id$ |
|
1226 | ignore $Id$ | |
1227 | a |
|
1227 | a | |
1228 |
|
1228 | |||
1229 | Now disable keyword expansion |
|
1229 | Now disable keyword expansion | |
1230 |
|
1230 | |||
1231 | $ cp $HGRCPATH $HGRCPATH.backup |
|
1231 | $ cp $HGRCPATH $HGRCPATH.backup | |
1232 | $ rm "$HGRCPATH" |
|
1232 | $ rm "$HGRCPATH" | |
1233 | $ cat a b |
|
1233 | $ cat a b | |
1234 | expand $Id$ |
|
1234 | expand $Id$ | |
1235 | do not process $Id: |
|
1235 | do not process $Id: | |
1236 | xxx $ |
|
1236 | xxx $ | |
1237 | $Xinfo$ |
|
1237 | $Xinfo$ | |
1238 | ignore $Id$ |
|
1238 | ignore $Id$ | |
1239 | $ hg cat sym a b && echo |
|
1239 | $ hg cat sym a b && echo | |
1240 | expand $Id$ |
|
1240 | expand $Id$ | |
1241 | do not process $Id: |
|
1241 | do not process $Id: | |
1242 | xxx $ |
|
1242 | xxx $ | |
1243 | $Xinfo$ |
|
1243 | $Xinfo$ | |
1244 | ignore $Id$ |
|
1244 | ignore $Id$ | |
1245 | a |
|
1245 | a | |
1246 |
|
1246 | |||
1247 | enable keyword expansion again |
|
1247 | enable keyword expansion again | |
1248 |
|
1248 | |||
1249 | $ cat $HGRCPATH.backup >> $HGRCPATH |
|
1249 | $ cat $HGRCPATH.backup >> $HGRCPATH | |
1250 |
|
1250 | |||
1251 | Test restricted mode with unshelve |
|
1251 | Test restricted mode with unshelve | |
1252 |
|
1252 | |||
1253 | $ cat <<EOF >> $HGRCPATH |
|
1253 | $ cat <<EOF >> $HGRCPATH | |
1254 | > [extensions] |
|
1254 | > [extensions] | |
1255 | > shelve = |
|
1255 | > shelve = | |
1256 | > EOF |
|
1256 | > EOF | |
1257 |
|
1257 | |||
1258 | $ echo xxxx >> a |
|
1258 | $ echo xxxx >> a | |
1259 | $ hg diff |
|
1259 | $ hg diff | |
1260 | diff -r 800511b3a22d a |
|
1260 | diff -r 800511b3a22d a | |
1261 | --- a/a Thu Jan 01 00:00:00 1970 +0000 |
|
1261 | --- a/a Thu Jan 01 00:00:00 1970 +0000 | |
1262 | +++ b/a * (glob) |
|
1262 | +++ b/a * (glob) | |
1263 | @@ -2,3 +2,4 @@ |
|
1263 | @@ -2,3 +2,4 @@ | |
1264 | do not process $Id: |
|
1264 | do not process $Id: | |
1265 | xxx $ |
|
1265 | xxx $ | |
1266 | $Xinfo$ |
|
1266 | $Xinfo$ | |
1267 | +xxxx |
|
1267 | +xxxx | |
1268 | $ hg shelve -q --name tmp |
|
1268 | $ hg shelve -q --name tmp | |
1269 | $ hg shelve --list --patch |
|
1269 | $ hg shelve --list --patch | |
1270 | tmp (*)* changes to: localresolve (glob) |
|
1270 | tmp (*)* changes to: localresolve (glob) | |
1271 |
|
1271 | |||
1272 | diff --git a/a b/a |
|
1272 | diff --git a/a b/a | |
1273 | --- a/a |
|
1273 | --- a/a | |
1274 | +++ b/a |
|
1274 | +++ b/a | |
1275 | @@ -2,3 +2,4 @@ |
|
1275 | @@ -2,3 +2,4 @@ | |
1276 | do not process $Id: |
|
1276 | do not process $Id: | |
1277 | xxx $ |
|
1277 | xxx $ | |
1278 | $Xinfo$ |
|
1278 | $Xinfo$ | |
1279 | +xxxx |
|
1279 | +xxxx | |
1280 |
|
1280 | |||
1281 | $ hg update -q -C 10 |
|
1281 | $ hg update -q -C 10 | |
1282 | $ hg unshelve -q tmp |
|
1282 | $ hg unshelve -q tmp | |
1283 | $ hg diff |
|
1283 | $ hg diff | |
1284 | diff -r 4aa30d025d50 a |
|
1284 | diff -r 4aa30d025d50 a | |
1285 | --- a/a Thu Jan 01 00:00:00 1970 +0000 |
|
1285 | --- a/a Thu Jan 01 00:00:00 1970 +0000 | |
1286 | +++ b/a * (glob) |
|
1286 | +++ b/a * (glob) | |
1287 | @@ -3,3 +3,4 @@ |
|
1287 | @@ -3,3 +3,4 @@ | |
1288 | do not process $Id: |
|
1288 | do not process $Id: | |
1289 | xxx $ |
|
1289 | xxx $ | |
1290 | $Xinfo$ |
|
1290 | $Xinfo$ | |
1291 | +xxxx |
|
1291 | +xxxx | |
1292 |
|
1292 | |||
1293 | Test restricted mode with rebase |
|
1293 | Test restricted mode with rebase | |
1294 |
|
1294 | |||
1295 | $ cat <<EOF >> $HGRCPATH |
|
1295 | $ cat <<EOF >> $HGRCPATH | |
1296 | > [extensions] |
|
1296 | > [extensions] | |
1297 | > rebase = |
|
1297 | > rebase = | |
1298 | > EOF |
|
1298 | > EOF | |
1299 |
|
1299 | |||
1300 | $ hg update -q -C 9 |
|
1300 | $ hg update -q -C 9 | |
1301 |
|
1301 | |||
1302 | $ echo xxxx >> a |
|
1302 | $ echo xxxx >> a | |
1303 | $ hg commit -m '#11' |
|
1303 | $ hg commit -m '#11' | |
1304 | $ hg diff -c 11 |
|
1304 | $ hg diff -c 11 | |
1305 | diff -r 800511b3a22d -r b07670694489 a |
|
1305 | diff -r 800511b3a22d -r b07670694489 a | |
1306 | --- a/a Thu Jan 01 00:00:00 1970 +0000 |
|
1306 | --- a/a Thu Jan 01 00:00:00 1970 +0000 | |
1307 | +++ b/a Thu Jan 01 00:00:00 1970 +0000 |
|
1307 | +++ b/a Thu Jan 01 00:00:00 1970 +0000 | |
1308 | @@ -2,3 +2,4 @@ |
|
1308 | @@ -2,3 +2,4 @@ | |
1309 | do not process $Id: |
|
1309 | do not process $Id: | |
1310 | xxx $ |
|
1310 | xxx $ | |
1311 | $Xinfo$ |
|
1311 | $Xinfo$ | |
1312 | +xxxx |
|
1312 | +xxxx | |
1313 |
|
1313 | |||
1314 | $ hg diff -c 10 |
|
1314 | $ hg diff -c 10 | |
1315 | diff -r 27d48ee14f67 -r 4aa30d025d50 a |
|
1315 | diff -r 27d48ee14f67 -r 4aa30d025d50 a | |
1316 | --- a/a Thu Jan 01 00:00:00 1970 +0000 |
|
1316 | --- a/a Thu Jan 01 00:00:00 1970 +0000 | |
1317 | +++ b/a Thu Jan 01 00:00:00 1970 +0000 |
|
1317 | +++ b/a Thu Jan 01 00:00:00 1970 +0000 | |
1318 | @@ -1,3 +1,4 @@ |
|
1318 | @@ -1,3 +1,4 @@ | |
1319 | +foobranch |
|
1319 | +foobranch | |
1320 | expand $Id$ |
|
1320 | expand $Id$ | |
1321 | do not process $Id: |
|
1321 | do not process $Id: | |
1322 | xxx $ |
|
1322 | xxx $ | |
1323 |
|
1323 | |||
1324 | $ hg rebase -q -s 10 -d 11 --keep |
|
1324 | $ hg rebase -q -s 10 -d 11 --keep | |
1325 | $ hg diff -r 9 -r 12 a |
|
1325 | $ hg diff -r 9 -r 12 a | |
1326 | diff -r 800511b3a22d -r 1939b927726c a |
|
1326 | diff -r 800511b3a22d -r 1939b927726c a | |
1327 | --- a/a Thu Jan 01 00:00:00 1970 +0000 |
|
1327 | --- a/a Thu Jan 01 00:00:00 1970 +0000 | |
1328 | +++ b/a Thu Jan 01 00:00:00 1970 +0000 |
|
1328 | +++ b/a Thu Jan 01 00:00:00 1970 +0000 | |
1329 | @@ -1,4 +1,6 @@ |
|
1329 | @@ -1,4 +1,6 @@ | |
1330 | +foobranch |
|
1330 | +foobranch | |
1331 | expand $Id$ |
|
1331 | expand $Id$ | |
1332 | do not process $Id: |
|
1332 | do not process $Id: | |
1333 | xxx $ |
|
1333 | xxx $ | |
1334 | $Xinfo$ |
|
1334 | $Xinfo$ | |
1335 | +xxxx |
|
1335 | +xxxx | |
1336 |
|
1336 | |||
1337 | Test restricted mode with graft |
|
1337 | Test restricted mode with graft | |
1338 |
|
1338 | |||
1339 | $ hg graft -q 10 |
|
1339 | $ hg graft -q 10 | |
1340 | $ hg diff -r 9 -r 13 a |
|
1340 | $ hg diff -r 9 -r 13 a | |
1341 | diff -r 800511b3a22d -r 01a68de1003a a |
|
1341 | diff -r 800511b3a22d -r 01a68de1003a a | |
1342 | --- a/a Thu Jan 01 00:00:00 1970 +0000 |
|
1342 | --- a/a Thu Jan 01 00:00:00 1970 +0000 | |
1343 | +++ b/a Thu Jan 01 00:00:00 1970 +0000 |
|
1343 | +++ b/a Thu Jan 01 00:00:00 1970 +0000 | |
1344 | @@ -1,4 +1,6 @@ |
|
1344 | @@ -1,4 +1,6 @@ | |
1345 | +foobranch |
|
1345 | +foobranch | |
1346 | expand $Id$ |
|
1346 | expand $Id$ | |
1347 | do not process $Id: |
|
1347 | do not process $Id: | |
1348 | xxx $ |
|
1348 | xxx $ | |
1349 | $Xinfo$ |
|
1349 | $Xinfo$ | |
1350 | +xxxx |
|
1350 | +xxxx | |
1351 |
|
1351 | |||
1352 | Test restricted mode with backout |
|
1352 | Test restricted mode with backout | |
1353 |
|
1353 | |||
1354 | $ hg backout -q 11 --no-commit |
|
1354 | $ hg backout -q 11 --no-commit | |
1355 | $ hg diff a |
|
1355 | $ hg diff a | |
1356 | diff -r 01a68de1003a a |
|
1356 | diff -r 01a68de1003a a | |
1357 | --- a/a Thu Jan 01 00:00:00 1970 +0000 |
|
1357 | --- a/a Thu Jan 01 00:00:00 1970 +0000 | |
1358 | +++ b/a * (glob) |
|
1358 | +++ b/a * (glob) | |
1359 | @@ -3,4 +3,3 @@ |
|
1359 | @@ -3,4 +3,3 @@ | |
1360 | do not process $Id: |
|
1360 | do not process $Id: | |
1361 | xxx $ |
|
1361 | xxx $ | |
1362 | $Xinfo$ |
|
1362 | $Xinfo$ | |
1363 | -xxxx |
|
1363 | -xxxx | |
1364 |
|
1364 | |||
1365 | Test restricted mode with histedit |
|
1365 | Test restricted mode with histedit | |
1366 |
|
1366 | |||
1367 | $ cat <<EOF >> $HGRCPATH |
|
1367 | $ cat <<EOF >> $HGRCPATH | |
1368 | > [extensions] |
|
1368 | > [extensions] | |
1369 | > histedit = |
|
1369 | > histedit = | |
1370 | > EOF |
|
1370 | > EOF | |
1371 |
|
1371 | |||
1372 | $ hg commit -m 'backout #11' |
|
1372 | $ hg commit -m 'backout #11' | |
1373 | $ hg histedit -q --command - 13 <<EOF |
|
1373 | $ hg histedit -q --command - 13 <<EOF | |
1374 | > pick 49f5f2d940c3 14 backout #11 |
|
1374 | > pick 49f5f2d940c3 14 backout #11 | |
1375 | > pick 01a68de1003a 13 9foobranch |
|
1375 | > pick 01a68de1003a 13 9foobranch | |
1376 | > EOF |
|
1376 | > EOF | |
1377 |
|
1377 | |||
1378 | Test restricted mode with fetch (with merge) |
|
1378 | Test restricted mode with fetch (with merge) | |
1379 |
|
1379 | |||
1380 | $ cat <<EOF >> $HGRCPATH |
|
1380 | $ cat <<EOF >> $HGRCPATH | |
1381 | > [extensions] |
|
1381 | > [extensions] | |
1382 | > fetch = |
|
1382 | > fetch = | |
1383 | > EOF |
|
1383 | > EOF | |
1384 |
|
1384 | |||
1385 | $ hg clone -q -r 9 . ../fetch-merge |
|
1385 | $ hg clone -q -r 9 . ../fetch-merge | |
1386 | $ cd ../fetch-merge |
|
1386 | $ cd ../fetch-merge | |
1387 | $ hg -R ../Test export 10 | hg import -q - |
|
1387 | $ hg -R ../Test export 10 | hg import -q - | |
1388 | $ hg fetch -q -r 11 |
|
1388 | $ hg fetch -q -r 11 | |
1389 | $ hg diff -r 9 a |
|
1389 | $ hg diff -r 9 a | |
1390 | diff -r 800511b3a22d a |
|
1390 | diff -r 800511b3a22d a | |
1391 | --- a/a Thu Jan 01 00:00:00 1970 +0000 |
|
1391 | --- a/a Thu Jan 01 00:00:00 1970 +0000 | |
1392 | +++ b/a * (glob) |
|
1392 | +++ b/a * (glob) | |
1393 | @@ -1,4 +1,6 @@ |
|
1393 | @@ -1,4 +1,6 @@ | |
1394 | +foobranch |
|
1394 | +foobranch | |
1395 | expand $Id$ |
|
1395 | expand $Id$ | |
1396 | do not process $Id: |
|
1396 | do not process $Id: | |
1397 | xxx $ |
|
1397 | xxx $ | |
1398 | $Xinfo$ |
|
1398 | $Xinfo$ | |
1399 | +xxxx |
|
1399 | +xxxx | |
1400 |
|
1400 | |||
1401 | Test that patch.diff(), which is implied by "hg diff" or so, doesn't |
|
1401 | Test that patch.diff(), which is implied by "hg diff" or so, doesn't | |
1402 | suppress expanding keywords at subsequent commands |
|
1402 | suppress expanding keywords at subsequent commands | |
1403 |
|
1403 | |||
1404 | #if windows |
|
1404 | #if windows | |
1405 | $ PYTHONPATH="$TESTDIR/../contrib;$PYTHONPATH" |
|
1405 | $ PYTHONPATH="$TESTDIR/../contrib;$PYTHONPATH" | |
1406 | #else |
|
1406 | #else | |
1407 | $ PYTHONPATH="$TESTDIR/../contrib:$PYTHONPATH" |
|
1407 | $ PYTHONPATH="$TESTDIR/../contrib:$PYTHONPATH" | |
1408 | #endif |
|
1408 | #endif | |
1409 | $ export PYTHONPATH |
|
1409 | $ export PYTHONPATH | |
1410 |
|
1410 | |||
1411 | $ grep -v '^promptecho ' < $HGRCPATH >> $HGRCPATH.new |
|
1411 | $ grep -v '^promptecho ' < $HGRCPATH >> $HGRCPATH.new | |
1412 | $ mv $HGRCPATH.new $HGRCPATH |
|
1412 | $ mv $HGRCPATH.new $HGRCPATH | |
1413 |
|
1413 | |||
1414 | >>> from __future__ import print_function |
|
1414 | >>> from __future__ import print_function | |
1415 |
>>> from hgclient import readchannel, runcommand |
|
1415 | >>> from hgclient import check, readchannel, runcommand | |
1416 | >>> @check |
|
1416 | >>> @check | |
1417 | ... def check(server): |
|
1417 | ... def check(server): | |
1418 | ... # hello block |
|
1418 | ... # hello block | |
1419 | ... readchannel(server) |
|
1419 | ... readchannel(server) | |
1420 | ... |
|
1420 | ... | |
1421 | ... runcommand(server, ['cat', 'm']) |
|
1421 | ... runcommand(server, ['cat', 'm']) | |
1422 | ... runcommand(server, ['diff', '-c', '.', 'm']) |
|
1422 | ... runcommand(server, ['diff', '-c', '.', 'm']) | |
1423 | ... runcommand(server, ['cat', 'm']) |
|
1423 | ... runcommand(server, ['cat', 'm']) | |
1424 | *** runcommand cat m |
|
1424 | *** runcommand cat m | |
1425 | $Id: m 800511b3a22d Thu, 01 Jan 1970 00:00:00 +0000 test $ |
|
1425 | $Id: m 800511b3a22d Thu, 01 Jan 1970 00:00:00 +0000 test $ | |
1426 | bar |
|
1426 | bar | |
1427 | *** runcommand diff -c . m |
|
1427 | *** runcommand diff -c . m | |
1428 | *** runcommand cat m |
|
1428 | *** runcommand cat m | |
1429 | $Id: m 800511b3a22d Thu, 01 Jan 1970 00:00:00 +0000 test $ |
|
1429 | $Id: m 800511b3a22d Thu, 01 Jan 1970 00:00:00 +0000 test $ | |
1430 | bar |
|
1430 | bar | |
1431 |
|
1431 | |||
1432 | $ cd .. |
|
1432 | $ cd .. | |
1433 |
|
1433 | |||
1434 | #if serve |
|
1434 | #if serve | |
1435 |
|
1435 | |||
1436 | Test that keywords are expanded only in repositories, which enable |
|
1436 | Test that keywords are expanded only in repositories, which enable | |
1437 | keyword extension, even if multiple repositories are served in a |
|
1437 | keyword extension, even if multiple repositories are served in a | |
1438 | process |
|
1438 | process | |
1439 |
|
1439 | |||
1440 | $ cat >> fetch-merge/.hg/hgrc <<EOF |
|
1440 | $ cat >> fetch-merge/.hg/hgrc <<EOF | |
1441 | > [extensions] |
|
1441 | > [extensions] | |
1442 | > keyword = ! |
|
1442 | > keyword = ! | |
1443 | > EOF |
|
1443 | > EOF | |
1444 |
|
1444 | |||
1445 | $ cat > paths.conf <<EOF |
|
1445 | $ cat > paths.conf <<EOF | |
1446 | > [paths] |
|
1446 | > [paths] | |
1447 | > enabled=Test |
|
1447 | > enabled=Test | |
1448 | > disabled=fetch-merge |
|
1448 | > disabled=fetch-merge | |
1449 | > EOF |
|
1449 | > EOF | |
1450 |
|
1450 | |||
1451 | $ hg serve -p $HGPORT -d --pid-file=hg.pid -A access.log -E error.log --webdir-conf paths.conf |
|
1451 | $ hg serve -p $HGPORT -d --pid-file=hg.pid -A access.log -E error.log --webdir-conf paths.conf | |
1452 | $ cat hg.pid >> $DAEMON_PIDS |
|
1452 | $ cat hg.pid >> $DAEMON_PIDS | |
1453 |
|
1453 | |||
1454 | $ get-with-headers.py localhost:$HGPORT 'enabled/file/tip/m/?style=raw' |
|
1454 | $ get-with-headers.py localhost:$HGPORT 'enabled/file/tip/m/?style=raw' | |
1455 | 200 Script output follows |
|
1455 | 200 Script output follows | |
1456 |
|
1456 | |||
1457 | $Id: m 800511b3a22d Thu, 01 Jan 1970 00:00:00 +0000 test $ |
|
1457 | $Id: m 800511b3a22d Thu, 01 Jan 1970 00:00:00 +0000 test $ | |
1458 | bar |
|
1458 | bar | |
1459 |
|
1459 | |||
1460 | $ get-with-headers.py localhost:$HGPORT 'disabled/file/tip/m/?style=raw' |
|
1460 | $ get-with-headers.py localhost:$HGPORT 'disabled/file/tip/m/?style=raw' | |
1461 | 200 Script output follows |
|
1461 | 200 Script output follows | |
1462 |
|
1462 | |||
1463 | $Id$ |
|
1463 | $Id$ | |
1464 | bar |
|
1464 | bar | |
1465 |
|
1465 | |||
1466 | (check expansion again, for safety) |
|
1466 | (check expansion again, for safety) | |
1467 |
|
1467 | |||
1468 | $ get-with-headers.py localhost:$HGPORT 'enabled/file/tip/m/?style=raw' |
|
1468 | $ get-with-headers.py localhost:$HGPORT 'enabled/file/tip/m/?style=raw' | |
1469 | 200 Script output follows |
|
1469 | 200 Script output follows | |
1470 |
|
1470 | |||
1471 | $Id: m 800511b3a22d Thu, 01 Jan 1970 00:00:00 +0000 test $ |
|
1471 | $Id: m 800511b3a22d Thu, 01 Jan 1970 00:00:00 +0000 test $ | |
1472 | bar |
|
1472 | bar | |
1473 |
|
1473 | |||
1474 | $ killdaemons.py |
|
1474 | $ killdaemons.py | |
1475 | #endif |
|
1475 | #endif |
General Comments 0
You need to be logged in to leave comments.
Login now