##// END OF EJS Templates
tests: convert some 'hghave symlink' to #if...
Mads Kiilerich -
r16908:6a997aac default
parent child Browse files
Show More
@@ -1,84 +1,90 b''
1 $ "$TESTDIR/hghave" symlink || exit 80
2
3 $ hg init
1 $ hg init
4
2
5 should fail
3 audit of .hg
6
4
7 $ hg add .hg/00changelog.i
5 $ hg add .hg/00changelog.i
8 abort: path contains illegal component: .hg/00changelog.i (glob)
6 abort: path contains illegal component: .hg/00changelog.i (glob)
9 [255]
7 [255]
10
8
9 #if symlink
10
11 Symlinks
12
11 $ mkdir a
13 $ mkdir a
12 $ echo a > a/a
14 $ echo a > a/a
13 $ hg ci -Ama
15 $ hg ci -Ama
14 adding a/a
16 adding a/a
15 $ ln -s a b
17 $ ln -s a b
16 $ echo b > a/b
18 $ echo b > a/b
17
18 should fail
19
20 $ hg add b/b
19 $ hg add b/b
21 abort: path 'b/b' traverses symbolic link 'b' (glob)
20 abort: path 'b/b' traverses symbolic link 'b' (glob)
22 [255]
21 [255]
23
24 should succeed
25
26 $ hg add b
22 $ hg add b
27
23
28 should still fail - maybe
24 should still fail - maybe
29
25
30 $ hg add b/b
26 $ hg add b/b
31 abort: path 'b/b' traverses symbolic link 'b' (glob)
27 abort: path 'b/b' traverses symbolic link 'b' (glob)
32 [255]
28 [255]
33
29
30 #endif
31
32
34 unbundle tampered bundle
33 unbundle tampered bundle
35
34
36 $ hg init target
35 $ hg init target
37 $ cd target
36 $ cd target
38 $ hg unbundle "$TESTDIR/bundles/tampered.hg"
37 $ hg unbundle "$TESTDIR/bundles/tampered.hg"
39 adding changesets
38 adding changesets
40 adding manifests
39 adding manifests
41 adding file changes
40 adding file changes
42 added 5 changesets with 6 changes to 6 files (+4 heads)
41 added 5 changesets with 6 changes to 6 files (+4 heads)
43 (run 'hg heads' to see heads, 'hg merge' to merge)
42 (run 'hg heads' to see heads, 'hg merge' to merge)
44
43
45 attack .hg/test
44 attack .hg/test
46
45
47 $ hg manifest -r0
46 $ hg manifest -r0
48 .hg/test
47 .hg/test
49 $ hg update -Cr0
48 $ hg update -Cr0
50 abort: path contains illegal component: .hg/test
49 abort: path contains illegal component: .hg/test (glob)
51 [255]
50 [255]
52
51
53 attack foo/.hg/test
52 attack foo/.hg/test
54
53
55 $ hg manifest -r1
54 $ hg manifest -r1
56 foo/.hg/test
55 foo/.hg/test
57 $ hg update -Cr1
56 $ hg update -Cr1
58 abort: path 'foo/.hg/test' is inside nested repo 'foo'
57 abort: path 'foo/.hg/test' is inside nested repo 'foo' (glob)
59 [255]
58 [255]
60
59
61 attack back/test where back symlinks to ..
60 attack back/test where back symlinks to ..
62
61
63 $ hg manifest -r2
62 $ hg manifest -r2
64 back
63 back
65 back/test
64 back/test
65 #if symlink
66 $ hg update -Cr2
66 $ hg update -Cr2
67 abort: path 'back/test' traverses symbolic link 'back'
67 abort: path 'back/test' traverses symbolic link 'back'
68 [255]
68 [255]
69 #else
70 ('back' will be a file and cause some other system specific error)
71 $ hg update -Cr2
72 abort: * (glob)
73 [255]
74 #endif
69
75
70 attack ../test
76 attack ../test
71
77
72 $ hg manifest -r3
78 $ hg manifest -r3
73 ../test
79 ../test
74 $ hg update -Cr3
80 $ hg update -Cr3
75 abort: path contains illegal component: ../test
81 abort: path contains illegal component: ../test (glob)
76 [255]
82 [255]
77
83
78 attack /tmp/test
84 attack /tmp/test
79
85
80 $ hg manifest -r4
86 $ hg manifest -r4
81 /tmp/test
87 /tmp/test
82 $ hg update -Cr4
88 $ hg update -Cr4
83 abort: *: $TESTTMP/target//tmp/test (glob)
89 abort: *: $TESTTMP/target//tmp/test (glob)
84 [255]
90 [255]
@@ -1,1125 +1,1129 b''
1 $ "$TESTDIR/hghave" symlink unix-permissions serve || exit 80
1 $ "$TESTDIR/hghave" unix-permissions serve || exit 80
2
2
3 $ cat <<EOF >> $HGRCPATH
3 $ cat <<EOF >> $HGRCPATH
4 > [extensions]
4 > [extensions]
5 > keyword =
5 > keyword =
6 > mq =
6 > mq =
7 > notify =
7 > notify =
8 > record =
8 > record =
9 > transplant =
9 > transplant =
10 > [ui]
10 > [ui]
11 > interactive = true
11 > interactive = true
12 > EOF
12 > EOF
13
13
14 Run kwdemo before [keyword] files are set up
14 Run kwdemo before [keyword] files are set up
15 as it would succeed without uisetup otherwise
15 as it would succeed without uisetup otherwise
16
16
17 $ hg --quiet kwdemo
17 $ hg --quiet kwdemo
18 [extensions]
18 [extensions]
19 keyword =
19 keyword =
20 [keyword]
20 [keyword]
21 demo.txt =
21 demo.txt =
22 [keywordset]
22 [keywordset]
23 svn = False
23 svn = False
24 [keywordmaps]
24 [keywordmaps]
25 Author = {author|user}
25 Author = {author|user}
26 Date = {date|utcdate}
26 Date = {date|utcdate}
27 Header = {root}/{file},v {node|short} {date|utcdate} {author|user}
27 Header = {root}/{file},v {node|short} {date|utcdate} {author|user}
28 Id = {file|basename},v {node|short} {date|utcdate} {author|user}
28 Id = {file|basename},v {node|short} {date|utcdate} {author|user}
29 RCSFile = {file|basename},v
29 RCSFile = {file|basename},v
30 RCSfile = {file|basename},v
30 RCSfile = {file|basename},v
31 Revision = {node|short}
31 Revision = {node|short}
32 Source = {root}/{file},v
32 Source = {root}/{file},v
33 $Author: test $
33 $Author: test $
34 $Date: ????/??/?? ??:??:?? $ (glob)
34 $Date: ????/??/?? ??:??:?? $ (glob)
35 $Header: */demo.txt,v ???????????? ????/??/?? ??:??:?? test $ (glob)
35 $Header: */demo.txt,v ???????????? ????/??/?? ??:??:?? test $ (glob)
36 $Id: demo.txt,v ???????????? ????/??/?? ??:??:?? test $ (glob)
36 $Id: demo.txt,v ???????????? ????/??/?? ??:??:?? test $ (glob)
37 $RCSFile: demo.txt,v $
37 $RCSFile: demo.txt,v $
38 $RCSfile: demo.txt,v $
38 $RCSfile: demo.txt,v $
39 $Revision: ???????????? $ (glob)
39 $Revision: ???????????? $ (glob)
40 $Source: */demo.txt,v $ (glob)
40 $Source: */demo.txt,v $ (glob)
41
41
42 $ hg --quiet kwdemo "Branch = {branches}"
42 $ hg --quiet kwdemo "Branch = {branches}"
43 [extensions]
43 [extensions]
44 keyword =
44 keyword =
45 [keyword]
45 [keyword]
46 demo.txt =
46 demo.txt =
47 [keywordset]
47 [keywordset]
48 svn = False
48 svn = False
49 [keywordmaps]
49 [keywordmaps]
50 Branch = {branches}
50 Branch = {branches}
51 $Branch: demobranch $
51 $Branch: demobranch $
52
52
53 $ cat <<EOF >> $HGRCPATH
53 $ cat <<EOF >> $HGRCPATH
54 > [keyword]
54 > [keyword]
55 > ** =
55 > ** =
56 > b = ignore
56 > b = ignore
57 > i = ignore
57 > i = ignore
58 > [hooks]
58 > [hooks]
59 > EOF
59 > EOF
60 $ cp $HGRCPATH $HGRCPATH.nohooks
60 $ cp $HGRCPATH $HGRCPATH.nohooks
61 > cat <<EOF >> $HGRCPATH
61 > cat <<EOF >> $HGRCPATH
62 > commit=
62 > commit=
63 > commit.test=cp a hooktest
63 > commit.test=cp a hooktest
64 > EOF
64 > EOF
65
65
66 $ hg init Test-bndl
66 $ hg init Test-bndl
67 $ cd Test-bndl
67 $ cd Test-bndl
68
68
69 kwshrink should exit silently in empty/invalid repo
69 kwshrink should exit silently in empty/invalid repo
70
70
71 $ hg kwshrink
71 $ hg kwshrink
72
72
73 Symlinks cannot be created on Windows.
73 Symlinks cannot be created on Windows.
74 A bundle to test this was made with:
74 A bundle to test this was made with:
75 hg init t
75 hg init t
76 cd t
76 cd t
77 echo a > a
77 echo a > a
78 ln -s a sym
78 ln -s a sym
79 hg add sym
79 hg add sym
80 hg ci -m addsym -u mercurial
80 hg ci -m addsym -u mercurial
81 hg bundle --base null ../test-keyword.hg
81 hg bundle --base null ../test-keyword.hg
82
82
83 $ hg pull -u "$TESTDIR"/bundles/test-keyword.hg
83 $ hg pull -u "$TESTDIR"/bundles/test-keyword.hg
84 pulling from *test-keyword.hg (glob)
84 pulling from *test-keyword.hg (glob)
85 requesting all changes
85 requesting all changes
86 adding changesets
86 adding changesets
87 adding manifests
87 adding manifests
88 adding file changes
88 adding file changes
89 added 1 changesets with 1 changes to 1 files
89 added 1 changesets with 1 changes to 1 files
90 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
90 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
91
91
92 $ echo 'expand $Id$' > a
92 $ echo 'expand $Id$' > a
93 $ echo 'do not process $Id:' >> a
93 $ echo 'do not process $Id:' >> a
94 $ echo 'xxx $' >> a
94 $ echo 'xxx $' >> a
95 $ echo 'ignore $Id$' > b
95 $ echo 'ignore $Id$' > b
96
96
97 Output files as they were created
97 Output files as they were created
98
98
99 $ cat a b
99 $ cat a b
100 expand $Id$
100 expand $Id$
101 do not process $Id:
101 do not process $Id:
102 xxx $
102 xxx $
103 ignore $Id$
103 ignore $Id$
104
104
105 no kwfiles
105 no kwfiles
106
106
107 $ hg kwfiles
107 $ hg kwfiles
108
108
109 untracked candidates
109 untracked candidates
110
110
111 $ hg -v kwfiles --unknown
111 $ hg -v kwfiles --unknown
112 k a
112 k a
113
113
114 Add files and check status
114 Add files and check status
115
115
116 $ hg addremove
116 $ hg addremove
117 adding a
117 adding a
118 adding b
118 adding b
119 $ hg status
119 $ hg status
120 A a
120 A a
121 A b
121 A b
122
122
123
123
124 Default keyword expansion including commit hook
124 Default keyword expansion including commit hook
125 Interrupted commit should not change state or run commit hook
125 Interrupted commit should not change state or run commit hook
126
126
127 $ hg --debug commit
127 $ hg --debug commit
128 abort: empty commit message
128 abort: empty commit message
129 [255]
129 [255]
130 $ hg status
130 $ hg status
131 A a
131 A a
132 A b
132 A b
133
133
134 Commit with several checks
134 Commit with several checks
135
135
136 $ hg --debug commit -mabsym -u 'User Name <user@example.com>'
136 $ hg --debug commit -mabsym -u 'User Name <user@example.com>'
137 a
137 a
138 b
138 b
139 overwriting a expanding keywords
139 overwriting a expanding keywords
140 running hook commit.test: cp a hooktest
140 running hook commit.test: cp a hooktest
141 committed changeset 1:ef63ca68695bc9495032c6fda1350c71e6d256e9
141 committed changeset 1:ef63ca68695bc9495032c6fda1350c71e6d256e9
142 $ hg status
142 $ hg status
143 ? hooktest
143 ? hooktest
144 $ hg debugrebuildstate
144 $ hg debugrebuildstate
145 $ hg --quiet identify
145 $ hg --quiet identify
146 ef63ca68695b
146 ef63ca68695b
147
147
148 cat files in working directory with keywords expanded
148 cat files in working directory with keywords expanded
149
149
150 $ cat a b
150 $ cat a b
151 expand $Id: a,v ef63ca68695b 1970/01/01 00:00:00 user $
151 expand $Id: a,v ef63ca68695b 1970/01/01 00:00:00 user $
152 do not process $Id:
152 do not process $Id:
153 xxx $
153 xxx $
154 ignore $Id$
154 ignore $Id$
155
155
156 hg cat files and symlink, no expansion
156 hg cat files and symlink, no expansion
157
157
158 $ hg cat sym a b && echo
158 $ hg cat sym a b && echo
159 expand $Id: a,v ef63ca68695b 1970/01/01 00:00:00 user $
159 expand $Id: a,v ef63ca68695b 1970/01/01 00:00:00 user $
160 do not process $Id:
160 do not process $Id:
161 xxx $
161 xxx $
162 ignore $Id$
162 ignore $Id$
163 a
163 a
164
164
165 $ diff a hooktest
165 $ diff a hooktest
166
166
167 $ cp $HGRCPATH.nohooks $HGRCPATH
167 $ cp $HGRCPATH.nohooks $HGRCPATH
168 $ rm hooktest
168 $ rm hooktest
169
169
170 hg status of kw-ignored binary file starting with '\1\n'
170 hg status of kw-ignored binary file starting with '\1\n'
171
171
172 >>> open("i", "wb").write("\1\nfoo")
172 >>> open("i", "wb").write("\1\nfoo")
173 $ hg -q commit -Am metasep i
173 $ hg -q commit -Am metasep i
174 $ hg status
174 $ hg status
175 >>> open("i", "wb").write("\1\nbar")
175 >>> open("i", "wb").write("\1\nbar")
176 $ hg status
176 $ hg status
177 M i
177 M i
178 $ hg -q commit -m "modify metasep" i
178 $ hg -q commit -m "modify metasep" i
179 $ hg status --rev 2:3
179 $ hg status --rev 2:3
180 M i
180 M i
181 $ touch empty
181 $ touch empty
182 $ hg -q commit -A -m "another file"
182 $ hg -q commit -A -m "another file"
183 $ hg status -A --rev 3:4 i
183 $ hg status -A --rev 3:4 i
184 C i
184 C i
185
185
186 $ hg -q strip -n 2
186 $ hg -q strip -n 2
187
187
188 Test hook execution
188 Test hook execution
189
189
190 bundle
190 bundle
191
191
192 $ hg bundle --base null ../kw.hg
192 $ hg bundle --base null ../kw.hg
193 2 changesets found
193 2 changesets found
194 $ cd ..
194 $ cd ..
195 $ hg init Test
195 $ hg init Test
196 $ cd Test
196 $ cd Test
197
197
198 Notify on pull to check whether keywords stay as is in email
198 Notify on pull to check whether keywords stay as is in email
199 ie. if patch.diff wrapper acts as it should
199 ie. if patch.diff wrapper acts as it should
200
200
201 $ cat <<EOF >> $HGRCPATH
201 $ cat <<EOF >> $HGRCPATH
202 > [hooks]
202 > [hooks]
203 > incoming.notify = python:hgext.notify.hook
203 > incoming.notify = python:hgext.notify.hook
204 > [notify]
204 > [notify]
205 > sources = pull
205 > sources = pull
206 > diffstat = False
206 > diffstat = False
207 > maxsubject = 15
207 > maxsubject = 15
208 > [reposubs]
208 > [reposubs]
209 > * = Test
209 > * = Test
210 > EOF
210 > EOF
211
211
212 Pull from bundle and trigger notify
212 Pull from bundle and trigger notify
213
213
214 $ hg pull -u ../kw.hg
214 $ hg pull -u ../kw.hg
215 pulling from ../kw.hg
215 pulling from ../kw.hg
216 requesting all changes
216 requesting all changes
217 adding changesets
217 adding changesets
218 adding manifests
218 adding manifests
219 adding file changes
219 adding file changes
220 added 2 changesets with 3 changes to 3 files
220 added 2 changesets with 3 changes to 3 files
221 Content-Type: text/plain; charset="us-ascii"
221 Content-Type: text/plain; charset="us-ascii"
222 MIME-Version: 1.0
222 MIME-Version: 1.0
223 Content-Transfer-Encoding: 7bit
223 Content-Transfer-Encoding: 7bit
224 Date: * (glob)
224 Date: * (glob)
225 Subject: changeset in...
225 Subject: changeset in...
226 From: mercurial
226 From: mercurial
227 X-Hg-Notification: changeset a2392c293916
227 X-Hg-Notification: changeset a2392c293916
228 Message-Id: <hg.a2392c293916*> (glob)
228 Message-Id: <hg.a2392c293916*> (glob)
229 To: Test
229 To: Test
230
230
231 changeset a2392c293916 in $TESTTMP/Test (glob)
231 changeset a2392c293916 in $TESTTMP/Test (glob)
232 details: $TESTTMP/Test?cmd=changeset;node=a2392c293916
232 details: $TESTTMP/Test?cmd=changeset;node=a2392c293916
233 description:
233 description:
234 addsym
234 addsym
235
235
236 diffs (6 lines):
236 diffs (6 lines):
237
237
238 diff -r 000000000000 -r a2392c293916 sym
238 diff -r 000000000000 -r a2392c293916 sym
239 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
239 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
240 +++ b/sym Sat Feb 09 20:25:47 2008 +0100
240 +++ b/sym Sat Feb 09 20:25:47 2008 +0100
241 @@ -0,0 +1,1 @@
241 @@ -0,0 +1,1 @@
242 +a
242 +a
243 \ No newline at end of file
243 \ No newline at end of file
244 Content-Type: text/plain; charset="us-ascii"
244 Content-Type: text/plain; charset="us-ascii"
245 MIME-Version: 1.0
245 MIME-Version: 1.0
246 Content-Transfer-Encoding: 7bit
246 Content-Transfer-Encoding: 7bit
247 Date:* (glob)
247 Date:* (glob)
248 Subject: changeset in...
248 Subject: changeset in...
249 From: User Name <user@example.com>
249 From: User Name <user@example.com>
250 X-Hg-Notification: changeset ef63ca68695b
250 X-Hg-Notification: changeset ef63ca68695b
251 Message-Id: <hg.ef63ca68695b*> (glob)
251 Message-Id: <hg.ef63ca68695b*> (glob)
252 To: Test
252 To: Test
253
253
254 changeset ef63ca68695b in $TESTTMP/Test (glob)
254 changeset ef63ca68695b in $TESTTMP/Test (glob)
255 details: $TESTTMP/Test?cmd=changeset;node=ef63ca68695b
255 details: $TESTTMP/Test?cmd=changeset;node=ef63ca68695b
256 description:
256 description:
257 absym
257 absym
258
258
259 diffs (12 lines):
259 diffs (12 lines):
260
260
261 diff -r a2392c293916 -r ef63ca68695b a
261 diff -r a2392c293916 -r ef63ca68695b a
262 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
262 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
263 +++ b/a Thu Jan 01 00:00:00 1970 +0000
263 +++ b/a Thu Jan 01 00:00:00 1970 +0000
264 @@ -0,0 +1,3 @@
264 @@ -0,0 +1,3 @@
265 +expand $Id$
265 +expand $Id$
266 +do not process $Id:
266 +do not process $Id:
267 +xxx $
267 +xxx $
268 diff -r a2392c293916 -r ef63ca68695b b
268 diff -r a2392c293916 -r ef63ca68695b b
269 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
269 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
270 +++ b/b Thu Jan 01 00:00:00 1970 +0000
270 +++ b/b Thu Jan 01 00:00:00 1970 +0000
271 @@ -0,0 +1,1 @@
271 @@ -0,0 +1,1 @@
272 +ignore $Id$
272 +ignore $Id$
273 3 files updated, 0 files merged, 0 files removed, 0 files unresolved
273 3 files updated, 0 files merged, 0 files removed, 0 files unresolved
274
274
275 $ cp $HGRCPATH.nohooks $HGRCPATH
275 $ cp $HGRCPATH.nohooks $HGRCPATH
276
276
277 Touch files and check with status
277 Touch files and check with status
278
278
279 $ touch a b
279 $ touch a b
280 $ hg status
280 $ hg status
281
281
282 Update and expand
282 Update and expand
283
283
284 $ rm sym a b
284 $ rm sym a b
285 $ hg update -C
285 $ hg update -C
286 3 files updated, 0 files merged, 0 files removed, 0 files unresolved
286 3 files updated, 0 files merged, 0 files removed, 0 files unresolved
287 $ cat a b
287 $ cat a b
288 expand $Id: a,v ef63ca68695b 1970/01/01 00:00:00 user $
288 expand $Id: a,v ef63ca68695b 1970/01/01 00:00:00 user $
289 do not process $Id:
289 do not process $Id:
290 xxx $
290 xxx $
291 ignore $Id$
291 ignore $Id$
292
292
293 Check whether expansion is filewise and file mode is preserved
293 Check whether expansion is filewise and file mode is preserved
294
294
295 $ echo '$Id$' > c
295 $ echo '$Id$' > c
296 $ echo 'tests for different changenodes' >> c
296 $ echo 'tests for different changenodes' >> c
297 $ chmod 600 c
297 $ chmod 600 c
298 $ ls -l c | cut -b 1-10
298 $ ls -l c | cut -b 1-10
299 -rw-------
299 -rw-------
300
300
301 commit file c
301 commit file c
302
302
303 $ hg commit -A -mcndiff -d '1 0' -u 'User Name <user@example.com>'
303 $ hg commit -A -mcndiff -d '1 0' -u 'User Name <user@example.com>'
304 adding c
304 adding c
305 $ ls -l c | cut -b 1-10
305 $ ls -l c | cut -b 1-10
306 -rw-------
306 -rw-------
307
307
308 force expansion
308 force expansion
309
309
310 $ hg -v kwexpand
310 $ hg -v kwexpand
311 overwriting a expanding keywords
311 overwriting a expanding keywords
312 overwriting c expanding keywords
312 overwriting c expanding keywords
313
313
314 compare changenodes in a and c
314 compare changenodes in a and c
315
315
316 $ cat a c
316 $ cat a c
317 expand $Id: a,v ef63ca68695b 1970/01/01 00:00:00 user $
317 expand $Id: a,v ef63ca68695b 1970/01/01 00:00:00 user $
318 do not process $Id:
318 do not process $Id:
319 xxx $
319 xxx $
320 $Id: c,v 40a904bbbe4c 1970/01/01 00:00:01 user $
320 $Id: c,v 40a904bbbe4c 1970/01/01 00:00:01 user $
321 tests for different changenodes
321 tests for different changenodes
322
322
323 record
323 record
324
324
325 $ echo '$Id$' > r
325 $ echo '$Id$' > r
326 $ hg add r
326 $ hg add r
327
327
328 record chunk
328 record chunk
329
329
330 >>> lines = open('a').readlines()
330 >>> lines = open('a').readlines()
331 >>> lines.insert(1, 'foo\n')
331 >>> lines.insert(1, 'foo\n')
332 >>> lines.append('bar\n')
332 >>> lines.append('bar\n')
333 >>> open('a', 'w').writelines(lines)
333 >>> open('a', 'w').writelines(lines)
334 $ hg record -d '1 10' -m rectest a<<EOF
334 $ hg record -d '1 10' -m rectest a<<EOF
335 > y
335 > y
336 > y
336 > y
337 > n
337 > n
338 > EOF
338 > EOF
339 diff --git a/a b/a
339 diff --git a/a b/a
340 2 hunks, 2 lines changed
340 2 hunks, 2 lines changed
341 examine changes to 'a'? [Ynesfdaq?]
341 examine changes to 'a'? [Ynesfdaq?]
342 @@ -1,3 +1,4 @@
342 @@ -1,3 +1,4 @@
343 expand $Id$
343 expand $Id$
344 +foo
344 +foo
345 do not process $Id:
345 do not process $Id:
346 xxx $
346 xxx $
347 record change 1/2 to 'a'? [Ynesfdaq?]
347 record change 1/2 to 'a'? [Ynesfdaq?]
348 @@ -2,2 +3,3 @@
348 @@ -2,2 +3,3 @@
349 do not process $Id:
349 do not process $Id:
350 xxx $
350 xxx $
351 +bar
351 +bar
352 record change 2/2 to 'a'? [Ynesfdaq?]
352 record change 2/2 to 'a'? [Ynesfdaq?]
353
353
354 $ hg identify
354 $ hg identify
355 d17e03c92c97+ tip
355 d17e03c92c97+ tip
356 $ hg status
356 $ hg status
357 M a
357 M a
358 A r
358 A r
359
359
360 Cat modified file a
360 Cat modified file a
361
361
362 $ cat a
362 $ cat a
363 expand $Id: a,v d17e03c92c97 1970/01/01 00:00:01 test $
363 expand $Id: a,v d17e03c92c97 1970/01/01 00:00:01 test $
364 foo
364 foo
365 do not process $Id:
365 do not process $Id:
366 xxx $
366 xxx $
367 bar
367 bar
368
368
369 Diff remaining chunk
369 Diff remaining chunk
370
370
371 $ hg diff a
371 $ hg diff a
372 diff -r d17e03c92c97 a
372 diff -r d17e03c92c97 a
373 --- a/a Wed Dec 31 23:59:51 1969 -0000
373 --- a/a Wed Dec 31 23:59:51 1969 -0000
374 +++ b/a * (glob)
374 +++ b/a * (glob)
375 @@ -2,3 +2,4 @@
375 @@ -2,3 +2,4 @@
376 foo
376 foo
377 do not process $Id:
377 do not process $Id:
378 xxx $
378 xxx $
379 +bar
379 +bar
380
380
381 $ hg rollback
381 $ hg rollback
382 repository tip rolled back to revision 2 (undo commit)
382 repository tip rolled back to revision 2 (undo commit)
383 working directory now based on revision 2
383 working directory now based on revision 2
384
384
385 Record all chunks in file a
385 Record all chunks in file a
386
386
387 $ echo foo > msg
387 $ echo foo > msg
388
388
389 - do not use "hg record -m" here!
389 - do not use "hg record -m" here!
390
390
391 $ hg record -l msg -d '1 11' a<<EOF
391 $ hg record -l msg -d '1 11' a<<EOF
392 > y
392 > y
393 > y
393 > y
394 > y
394 > y
395 > EOF
395 > EOF
396 diff --git a/a b/a
396 diff --git a/a b/a
397 2 hunks, 2 lines changed
397 2 hunks, 2 lines changed
398 examine changes to 'a'? [Ynesfdaq?]
398 examine changes to 'a'? [Ynesfdaq?]
399 @@ -1,3 +1,4 @@
399 @@ -1,3 +1,4 @@
400 expand $Id$
400 expand $Id$
401 +foo
401 +foo
402 do not process $Id:
402 do not process $Id:
403 xxx $
403 xxx $
404 record change 1/2 to 'a'? [Ynesfdaq?]
404 record change 1/2 to 'a'? [Ynesfdaq?]
405 @@ -2,2 +3,3 @@
405 @@ -2,2 +3,3 @@
406 do not process $Id:
406 do not process $Id:
407 xxx $
407 xxx $
408 +bar
408 +bar
409 record change 2/2 to 'a'? [Ynesfdaq?]
409 record change 2/2 to 'a'? [Ynesfdaq?]
410
410
411 File a should be clean
411 File a should be clean
412
412
413 $ hg status -A a
413 $ hg status -A a
414 C a
414 C a
415
415
416 rollback and revert expansion
416 rollback and revert expansion
417
417
418 $ cat a
418 $ cat a
419 expand $Id: a,v 59f969a3b52c 1970/01/01 00:00:01 test $
419 expand $Id: a,v 59f969a3b52c 1970/01/01 00:00:01 test $
420 foo
420 foo
421 do not process $Id:
421 do not process $Id:
422 xxx $
422 xxx $
423 bar
423 bar
424 $ hg --verbose rollback
424 $ hg --verbose rollback
425 repository tip rolled back to revision 2 (undo commit)
425 repository tip rolled back to revision 2 (undo commit)
426 working directory now based on revision 2
426 working directory now based on revision 2
427 overwriting a expanding keywords
427 overwriting a expanding keywords
428 $ hg status a
428 $ hg status a
429 M a
429 M a
430 $ cat a
430 $ cat a
431 expand $Id: a,v ef63ca68695b 1970/01/01 00:00:00 user $
431 expand $Id: a,v ef63ca68695b 1970/01/01 00:00:00 user $
432 foo
432 foo
433 do not process $Id:
433 do not process $Id:
434 xxx $
434 xxx $
435 bar
435 bar
436 $ echo '$Id$' > y
436 $ echo '$Id$' > y
437 $ echo '$Id$' > z
437 $ echo '$Id$' > z
438 $ hg add y
438 $ hg add y
439 $ hg commit -Am "rollback only" z
439 $ hg commit -Am "rollback only" z
440 $ cat z
440 $ cat z
441 $Id: z,v 45a5d3adce53 1970/01/01 00:00:00 test $
441 $Id: z,v 45a5d3adce53 1970/01/01 00:00:00 test $
442 $ hg --verbose rollback
442 $ hg --verbose rollback
443 repository tip rolled back to revision 2 (undo commit)
443 repository tip rolled back to revision 2 (undo commit)
444 working directory now based on revision 2
444 working directory now based on revision 2
445 overwriting z shrinking keywords
445 overwriting z shrinking keywords
446
446
447 Only z should be overwritten
447 Only z should be overwritten
448
448
449 $ hg status a y z
449 $ hg status a y z
450 M a
450 M a
451 A y
451 A y
452 A z
452 A z
453 $ cat z
453 $ cat z
454 $Id$
454 $Id$
455 $ hg forget y z
455 $ hg forget y z
456 $ rm y z
456 $ rm y z
457
457
458 record added file alone
458 record added file alone
459
459
460 $ hg -v record -l msg -d '1 12' r<<EOF
460 $ hg -v record -l msg -d '1 12' r<<EOF
461 > y
461 > y
462 > EOF
462 > EOF
463 diff --git a/r b/r
463 diff --git a/r b/r
464 new file mode 100644
464 new file mode 100644
465 examine changes to 'r'? [Ynesfdaq?]
465 examine changes to 'r'? [Ynesfdaq?]
466 r
466 r
467 committed changeset 3:899491280810
467 committed changeset 3:899491280810
468 overwriting r expanding keywords
468 overwriting r expanding keywords
469 - status call required for dirstate.normallookup() check
469 - status call required for dirstate.normallookup() check
470 $ hg status r
470 $ hg status r
471 $ hg --verbose rollback
471 $ hg --verbose rollback
472 repository tip rolled back to revision 2 (undo commit)
472 repository tip rolled back to revision 2 (undo commit)
473 working directory now based on revision 2
473 working directory now based on revision 2
474 overwriting r shrinking keywords
474 overwriting r shrinking keywords
475 $ hg forget r
475 $ hg forget r
476 $ rm msg r
476 $ rm msg r
477 $ hg update -C
477 $ hg update -C
478 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
478 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
479
479
480 record added keyword ignored file
480 record added keyword ignored file
481
481
482 $ echo '$Id$' > i
482 $ echo '$Id$' > i
483 $ hg add i
483 $ hg add i
484 $ hg --verbose record -d '1 13' -m recignored<<EOF
484 $ hg --verbose record -d '1 13' -m recignored<<EOF
485 > y
485 > y
486 > EOF
486 > EOF
487 diff --git a/i b/i
487 diff --git a/i b/i
488 new file mode 100644
488 new file mode 100644
489 examine changes to 'i'? [Ynesfdaq?]
489 examine changes to 'i'? [Ynesfdaq?]
490 i
490 i
491 committed changeset 3:5f40fe93bbdc
491 committed changeset 3:5f40fe93bbdc
492 $ cat i
492 $ cat i
493 $Id$
493 $Id$
494 $ hg -q rollback
494 $ hg -q rollback
495 $ hg forget i
495 $ hg forget i
496 $ rm i
496 $ rm i
497
497
498 amend
498 amend
499
499
500 $ echo amend >> a
500 $ echo amend >> a
501 $ echo amend >> b
501 $ echo amend >> b
502 $ hg -q commit -d '1 14' -m 'prepare amend'
502 $ hg -q commit -d '1 14' -m 'prepare amend'
503
503
504 $ hg --debug commit --amend -d '1 15' -m 'amend without changes' | grep keywords
504 $ hg --debug commit --amend -d '1 15' -m 'amend without changes' | grep keywords
505 invalidating branch cache (tip differs)
505 invalidating branch cache (tip differs)
506 overwriting a expanding keywords
506 overwriting a expanding keywords
507 $ hg -q id
507 $ hg -q id
508 a71343332ea9
508 a71343332ea9
509 $ head -1 a
509 $ head -1 a
510 expand $Id: a,v a71343332ea9 1970/01/01 00:00:01 test $
510 expand $Id: a,v a71343332ea9 1970/01/01 00:00:01 test $
511
511
512 $ hg -q strip -n tip
512 $ hg -q strip -n tip
513
513
514 Test patch queue repo
514 Test patch queue repo
515
515
516 $ hg init --mq
516 $ hg init --mq
517 $ hg qimport -r tip -n mqtest.diff
517 $ hg qimport -r tip -n mqtest.diff
518 $ hg commit --mq -m mqtest
518 $ hg commit --mq -m mqtest
519
519
520 Keywords should not be expanded in patch
520 Keywords should not be expanded in patch
521
521
522 $ cat .hg/patches/mqtest.diff
522 $ cat .hg/patches/mqtest.diff
523 # HG changeset patch
523 # HG changeset patch
524 # User User Name <user@example.com>
524 # User User Name <user@example.com>
525 # Date 1 0
525 # Date 1 0
526 # Node ID 40a904bbbe4cd4ab0a1f28411e35db26341a40ad
526 # Node ID 40a904bbbe4cd4ab0a1f28411e35db26341a40ad
527 # Parent ef63ca68695bc9495032c6fda1350c71e6d256e9
527 # Parent ef63ca68695bc9495032c6fda1350c71e6d256e9
528 cndiff
528 cndiff
529
529
530 diff -r ef63ca68695b -r 40a904bbbe4c c
530 diff -r ef63ca68695b -r 40a904bbbe4c c
531 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
531 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
532 +++ b/c Thu Jan 01 00:00:01 1970 +0000
532 +++ b/c Thu Jan 01 00:00:01 1970 +0000
533 @@ -0,0 +1,2 @@
533 @@ -0,0 +1,2 @@
534 +$Id$
534 +$Id$
535 +tests for different changenodes
535 +tests for different changenodes
536
536
537 $ hg qpop
537 $ hg qpop
538 popping mqtest.diff
538 popping mqtest.diff
539 patch queue now empty
539 patch queue now empty
540
540
541 qgoto, implying qpush, should expand
541 qgoto, implying qpush, should expand
542
542
543 $ hg qgoto mqtest.diff
543 $ hg qgoto mqtest.diff
544 applying mqtest.diff
544 applying mqtest.diff
545 now at: mqtest.diff
545 now at: mqtest.diff
546 $ cat c
546 $ cat c
547 $Id: c,v 40a904bbbe4c 1970/01/01 00:00:01 user $
547 $Id: c,v 40a904bbbe4c 1970/01/01 00:00:01 user $
548 tests for different changenodes
548 tests for different changenodes
549 $ hg cat c
549 $ hg cat c
550 $Id: c,v 40a904bbbe4c 1970/01/01 00:00:01 user $
550 $Id: c,v 40a904bbbe4c 1970/01/01 00:00:01 user $
551 tests for different changenodes
551 tests for different changenodes
552
552
553 Keywords should not be expanded in filelog
553 Keywords should not be expanded in filelog
554
554
555 $ hg --config 'extensions.keyword=!' cat c
555 $ hg --config 'extensions.keyword=!' cat c
556 $Id$
556 $Id$
557 tests for different changenodes
557 tests for different changenodes
558
558
559 qpop and move on
559 qpop and move on
560
560
561 $ hg qpop
561 $ hg qpop
562 popping mqtest.diff
562 popping mqtest.diff
563 patch queue now empty
563 patch queue now empty
564
564
565 Copy and show added kwfiles
565 Copy and show added kwfiles
566
566
567 $ hg cp a c
567 $ hg cp a c
568 $ hg kwfiles
568 $ hg kwfiles
569 a
569 a
570 c
570 c
571
571
572 Commit and show expansion in original and copy
572 Commit and show expansion in original and copy
573
573
574 $ hg --debug commit -ma2c -d '1 0' -u 'User Name <user@example.com>'
574 $ hg --debug commit -ma2c -d '1 0' -u 'User Name <user@example.com>'
575 c
575 c
576 c: copy a:0045e12f6c5791aac80ca6cbfd97709a88307292
576 c: copy a:0045e12f6c5791aac80ca6cbfd97709a88307292
577 removing unknown node 40a904bbbe4c from 1-phase boundary
577 removing unknown node 40a904bbbe4c from 1-phase boundary
578 overwriting c expanding keywords
578 overwriting c expanding keywords
579 committed changeset 2:25736cf2f5cbe41f6be4e6784ef6ecf9f3bbcc7d
579 committed changeset 2:25736cf2f5cbe41f6be4e6784ef6ecf9f3bbcc7d
580 $ cat a c
580 $ cat a c
581 expand $Id: a,v ef63ca68695b 1970/01/01 00:00:00 user $
581 expand $Id: a,v ef63ca68695b 1970/01/01 00:00:00 user $
582 do not process $Id:
582 do not process $Id:
583 xxx $
583 xxx $
584 expand $Id: c,v 25736cf2f5cb 1970/01/01 00:00:01 user $
584 expand $Id: c,v 25736cf2f5cb 1970/01/01 00:00:01 user $
585 do not process $Id:
585 do not process $Id:
586 xxx $
586 xxx $
587
587
588 Touch copied c and check its status
588 Touch copied c and check its status
589
589
590 $ touch c
590 $ touch c
591 $ hg status
591 $ hg status
592
592
593 Copy kwfile to keyword ignored file unexpanding keywords
593 Copy kwfile to keyword ignored file unexpanding keywords
594
594
595 $ hg --verbose copy a i
595 $ hg --verbose copy a i
596 copying a to i
596 copying a to i
597 overwriting i shrinking keywords
597 overwriting i shrinking keywords
598 $ head -n 1 i
598 $ head -n 1 i
599 expand $Id$
599 expand $Id$
600 $ hg forget i
600 $ hg forget i
601 $ rm i
601 $ rm i
602
602
603 Copy ignored file to ignored file: no overwriting
603 Copy ignored file to ignored file: no overwriting
604
604
605 $ hg --verbose copy b i
605 $ hg --verbose copy b i
606 copying b to i
606 copying b to i
607 $ hg forget i
607 $ hg forget i
608 $ rm i
608 $ rm i
609
609
610 cp symlink file; hg cp -A symlink file (part1)
610 cp symlink file; hg cp -A symlink file (part1)
611 - copied symlink points to kwfile: overwrite
611 - copied symlink points to kwfile: overwrite
612
612
613 $ cp sym i
613 $ cp sym i
614 $ ls -l i
614 $ ls -l i
615 -rw-r--r--* (glob)
615 -rw-r--r--* (glob)
616 $ head -1 i
616 $ head -1 i
617 expand $Id: a,v ef63ca68695b 1970/01/01 00:00:00 user $
617 expand $Id: a,v ef63ca68695b 1970/01/01 00:00:00 user $
618 $ hg copy --after --verbose sym i
618 $ hg copy --after --verbose sym i
619 copying sym to i
619 copying sym to i
620 overwriting i shrinking keywords
620 overwriting i shrinking keywords
621 $ head -1 i
621 $ head -1 i
622 expand $Id$
622 expand $Id$
623 $ hg forget i
623 $ hg forget i
624 $ rm i
624 $ rm i
625
625
626 Test different options of hg kwfiles
626 Test different options of hg kwfiles
627
627
628 $ hg kwfiles
628 $ hg kwfiles
629 a
629 a
630 c
630 c
631 $ hg -v kwfiles --ignore
631 $ hg -v kwfiles --ignore
632 I b
632 I b
633 I sym
633 I sym
634 $ hg kwfiles --all
634 $ hg kwfiles --all
635 K a
635 K a
636 K c
636 K c
637 I b
637 I b
638 I sym
638 I sym
639
639
640 Diff specific revision
640 Diff specific revision
641
641
642 $ hg diff --rev 1
642 $ hg diff --rev 1
643 diff -r ef63ca68695b c
643 diff -r ef63ca68695b c
644 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
644 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
645 +++ b/c * (glob)
645 +++ b/c * (glob)
646 @@ -0,0 +1,3 @@
646 @@ -0,0 +1,3 @@
647 +expand $Id$
647 +expand $Id$
648 +do not process $Id:
648 +do not process $Id:
649 +xxx $
649 +xxx $
650
650
651 Status after rollback:
651 Status after rollback:
652
652
653 $ hg rollback
653 $ hg rollback
654 repository tip rolled back to revision 1 (undo commit)
654 repository tip rolled back to revision 1 (undo commit)
655 working directory now based on revision 1
655 working directory now based on revision 1
656 $ hg status
656 $ hg status
657 A c
657 A c
658 $ hg update --clean
658 $ hg update --clean
659 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
659 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
660
660
661 #if symlink
662
661 cp symlink file; hg cp -A symlink file (part2)
663 cp symlink file; hg cp -A symlink file (part2)
662 - copied symlink points to kw ignored file: do not overwrite
664 - copied symlink points to kw ignored file: do not overwrite
663
665
664 $ cat a > i
666 $ cat a > i
665 $ ln -s i symignored
667 $ ln -s i symignored
666 $ hg commit -Am 'fake expansion in ignored and symlink' i symignored
668 $ hg commit -Am 'fake expansion in ignored and symlink' i symignored
667 $ cp symignored x
669 $ cp symignored x
668 $ hg copy --after --verbose symignored x
670 $ hg copy --after --verbose symignored x
669 copying symignored to x
671 copying symignored to x
670 $ head -n 1 x
672 $ head -n 1 x
671 expand $Id: a,v ef63ca68695b 1970/01/01 00:00:00 user $
673 expand $Id: a,v ef63ca68695b 1970/01/01 00:00:00 user $
672 $ hg forget x
674 $ hg forget x
673 $ rm x
675 $ rm x
674
676
675 $ hg rollback
677 $ hg rollback
676 repository tip rolled back to revision 1 (undo commit)
678 repository tip rolled back to revision 1 (undo commit)
677 working directory now based on revision 1
679 working directory now based on revision 1
678 $ hg update --clean
680 $ hg update --clean
679 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
681 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
680 $ rm i symignored
682 $ rm i symignored
681
683
684 #endif
685
682 Custom keywordmaps as argument to kwdemo
686 Custom keywordmaps as argument to kwdemo
683
687
684 $ hg --quiet kwdemo "Xinfo = {author}: {desc}"
688 $ hg --quiet kwdemo "Xinfo = {author}: {desc}"
685 [extensions]
689 [extensions]
686 keyword =
690 keyword =
687 [keyword]
691 [keyword]
688 ** =
692 ** =
689 b = ignore
693 b = ignore
690 demo.txt =
694 demo.txt =
691 i = ignore
695 i = ignore
692 [keywordset]
696 [keywordset]
693 svn = False
697 svn = False
694 [keywordmaps]
698 [keywordmaps]
695 Xinfo = {author}: {desc}
699 Xinfo = {author}: {desc}
696 $Xinfo: test: hg keyword configuration and expansion example $
700 $Xinfo: test: hg keyword configuration and expansion example $
697
701
698 Configure custom keywordmaps
702 Configure custom keywordmaps
699
703
700 $ cat <<EOF >>$HGRCPATH
704 $ cat <<EOF >>$HGRCPATH
701 > [keywordmaps]
705 > [keywordmaps]
702 > Id = {file} {node|short} {date|rfc822date} {author|user}
706 > Id = {file} {node|short} {date|rfc822date} {author|user}
703 > Xinfo = {author}: {desc}
707 > Xinfo = {author}: {desc}
704 > EOF
708 > EOF
705
709
706 Cat and hg cat files before custom expansion
710 Cat and hg cat files before custom expansion
707
711
708 $ cat a b
712 $ cat a b
709 expand $Id: a,v ef63ca68695b 1970/01/01 00:00:00 user $
713 expand $Id: a,v ef63ca68695b 1970/01/01 00:00:00 user $
710 do not process $Id:
714 do not process $Id:
711 xxx $
715 xxx $
712 ignore $Id$
716 ignore $Id$
713 $ hg cat sym a b && echo
717 $ hg cat sym a b && echo
714 expand $Id: a ef63ca68695b Thu, 01 Jan 1970 00:00:00 +0000 user $
718 expand $Id: a ef63ca68695b Thu, 01 Jan 1970 00:00:00 +0000 user $
715 do not process $Id:
719 do not process $Id:
716 xxx $
720 xxx $
717 ignore $Id$
721 ignore $Id$
718 a
722 a
719
723
720 Write custom keyword and prepare multiline commit message
724 Write custom keyword and prepare multiline commit message
721
725
722 $ echo '$Xinfo$' >> a
726 $ echo '$Xinfo$' >> a
723 $ cat <<EOF >> log
727 $ cat <<EOF >> log
724 > firstline
728 > firstline
725 > secondline
729 > secondline
726 > EOF
730 > EOF
727
731
728 Interrupted commit should not change state
732 Interrupted commit should not change state
729
733
730 $ hg commit
734 $ hg commit
731 abort: empty commit message
735 abort: empty commit message
732 [255]
736 [255]
733 $ hg status
737 $ hg status
734 M a
738 M a
735 ? c
739 ? c
736 ? log
740 ? log
737
741
738 Commit with multiline message and custom expansion
742 Commit with multiline message and custom expansion
739
743
740 $ hg --debug commit -l log -d '2 0' -u 'User Name <user@example.com>'
744 $ hg --debug commit -l log -d '2 0' -u 'User Name <user@example.com>'
741 a
745 a
742 removing unknown node 40a904bbbe4c from 1-phase boundary
746 removing unknown node 40a904bbbe4c from 1-phase boundary
743 overwriting a expanding keywords
747 overwriting a expanding keywords
744 committed changeset 2:bb948857c743469b22bbf51f7ec8112279ca5d83
748 committed changeset 2:bb948857c743469b22bbf51f7ec8112279ca5d83
745 $ rm log
749 $ rm log
746
750
747 Stat, verify and show custom expansion (firstline)
751 Stat, verify and show custom expansion (firstline)
748
752
749 $ hg status
753 $ hg status
750 ? c
754 ? c
751 $ hg verify
755 $ hg verify
752 checking changesets
756 checking changesets
753 checking manifests
757 checking manifests
754 crosschecking files in changesets and manifests
758 crosschecking files in changesets and manifests
755 checking files
759 checking files
756 3 files, 3 changesets, 4 total revisions
760 3 files, 3 changesets, 4 total revisions
757 $ cat a b
761 $ cat a b
758 expand $Id: a bb948857c743 Thu, 01 Jan 1970 00:00:02 +0000 user $
762 expand $Id: a bb948857c743 Thu, 01 Jan 1970 00:00:02 +0000 user $
759 do not process $Id:
763 do not process $Id:
760 xxx $
764 xxx $
761 $Xinfo: User Name <user@example.com>: firstline $
765 $Xinfo: User Name <user@example.com>: firstline $
762 ignore $Id$
766 ignore $Id$
763 $ hg cat sym a b && echo
767 $ hg cat sym a b && echo
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 a
773 a
770
774
771 annotate
775 annotate
772
776
773 $ hg annotate a
777 $ hg annotate a
774 1: expand $Id$
778 1: expand $Id$
775 1: do not process $Id:
779 1: do not process $Id:
776 1: xxx $
780 1: xxx $
777 2: $Xinfo$
781 2: $Xinfo$
778
782
779 remove with status checks
783 remove with status checks
780
784
781 $ hg debugrebuildstate
785 $ hg debugrebuildstate
782 $ hg remove a
786 $ hg remove a
783 $ hg --debug commit -m rma
787 $ hg --debug commit -m rma
784 committed changeset 3:d14c712653769de926994cf7fbb06c8fbd68f012
788 committed changeset 3:d14c712653769de926994cf7fbb06c8fbd68f012
785 $ hg status
789 $ hg status
786 ? c
790 ? c
787
791
788 Rollback, revert, and check expansion
792 Rollback, revert, and check expansion
789
793
790 $ hg rollback
794 $ hg rollback
791 repository tip rolled back to revision 2 (undo commit)
795 repository tip rolled back to revision 2 (undo commit)
792 working directory now based on revision 2
796 working directory now based on revision 2
793 $ hg status
797 $ hg status
794 R a
798 R a
795 ? c
799 ? c
796 $ hg revert --no-backup --rev tip a
800 $ hg revert --no-backup --rev tip a
797 $ cat a
801 $ cat a
798 expand $Id: a bb948857c743 Thu, 01 Jan 1970 00:00:02 +0000 user $
802 expand $Id: a bb948857c743 Thu, 01 Jan 1970 00:00:02 +0000 user $
799 do not process $Id:
803 do not process $Id:
800 xxx $
804 xxx $
801 $Xinfo: User Name <user@example.com>: firstline $
805 $Xinfo: User Name <user@example.com>: firstline $
802
806
803 Clone to test global and local configurations
807 Clone to test global and local configurations
804
808
805 $ cd ..
809 $ cd ..
806
810
807 Expansion in destinaton with global configuration
811 Expansion in destinaton with global configuration
808
812
809 $ hg --quiet clone Test globalconf
813 $ hg --quiet clone Test globalconf
810 $ cat globalconf/a
814 $ cat globalconf/a
811 expand $Id: a bb948857c743 Thu, 01 Jan 1970 00:00:02 +0000 user $
815 expand $Id: a bb948857c743 Thu, 01 Jan 1970 00:00:02 +0000 user $
812 do not process $Id:
816 do not process $Id:
813 xxx $
817 xxx $
814 $Xinfo: User Name <user@example.com>: firstline $
818 $Xinfo: User Name <user@example.com>: firstline $
815
819
816 No expansion in destination with local configuration in origin only
820 No expansion in destination with local configuration in origin only
817
821
818 $ hg --quiet --config 'keyword.**=ignore' clone Test localconf
822 $ hg --quiet --config 'keyword.**=ignore' clone Test localconf
819 $ cat localconf/a
823 $ cat localconf/a
820 expand $Id$
824 expand $Id$
821 do not process $Id:
825 do not process $Id:
822 xxx $
826 xxx $
823 $Xinfo$
827 $Xinfo$
824
828
825 Clone to test incoming
829 Clone to test incoming
826
830
827 $ hg clone -r1 Test Test-a
831 $ hg clone -r1 Test Test-a
828 adding changesets
832 adding changesets
829 adding manifests
833 adding manifests
830 adding file changes
834 adding file changes
831 added 2 changesets with 3 changes to 3 files
835 added 2 changesets with 3 changes to 3 files
832 updating to branch default
836 updating to branch default
833 3 files updated, 0 files merged, 0 files removed, 0 files unresolved
837 3 files updated, 0 files merged, 0 files removed, 0 files unresolved
834 $ cd Test-a
838 $ cd Test-a
835 $ cat <<EOF >> .hg/hgrc
839 $ cat <<EOF >> .hg/hgrc
836 > [paths]
840 > [paths]
837 > default = ../Test
841 > default = ../Test
838 > EOF
842 > EOF
839 $ hg incoming
843 $ hg incoming
840 comparing with $TESTTMP/Test (glob)
844 comparing with $TESTTMP/Test (glob)
841 searching for changes
845 searching for changes
842 changeset: 2:bb948857c743
846 changeset: 2:bb948857c743
843 tag: tip
847 tag: tip
844 user: User Name <user@example.com>
848 user: User Name <user@example.com>
845 date: Thu Jan 01 00:00:02 1970 +0000
849 date: Thu Jan 01 00:00:02 1970 +0000
846 summary: firstline
850 summary: firstline
847
851
848 Imported patch should not be rejected
852 Imported patch should not be rejected
849
853
850 >>> import re
854 >>> import re
851 >>> text = re.sub(r'(Id.*)', r'\1 rejecttest', open('a').read())
855 >>> text = re.sub(r'(Id.*)', r'\1 rejecttest', open('a').read())
852 >>> open('a', 'wb').write(text)
856 >>> open('a', 'wb').write(text)
853 $ hg --debug commit -m'rejects?' -d '3 0' -u 'User Name <user@example.com>'
857 $ hg --debug commit -m'rejects?' -d '3 0' -u 'User Name <user@example.com>'
854 a
858 a
855 overwriting a expanding keywords
859 overwriting a expanding keywords
856 committed changeset 2:85e279d709ffc28c9fdd1b868570985fc3d87082
860 committed changeset 2:85e279d709ffc28c9fdd1b868570985fc3d87082
857 $ hg export -o ../rejecttest.diff tip
861 $ hg export -o ../rejecttest.diff tip
858 $ cd ../Test
862 $ cd ../Test
859 $ hg import ../rejecttest.diff
863 $ hg import ../rejecttest.diff
860 applying ../rejecttest.diff
864 applying ../rejecttest.diff
861 $ cat a b
865 $ cat a b
862 expand $Id: a 4e0994474d25 Thu, 01 Jan 1970 00:00:03 +0000 user $ rejecttest
866 expand $Id: a 4e0994474d25 Thu, 01 Jan 1970 00:00:03 +0000 user $ rejecttest
863 do not process $Id: rejecttest
867 do not process $Id: rejecttest
864 xxx $
868 xxx $
865 $Xinfo: User Name <user@example.com>: rejects? $
869 $Xinfo: User Name <user@example.com>: rejects? $
866 ignore $Id$
870 ignore $Id$
867
871
868 $ hg rollback
872 $ hg rollback
869 repository tip rolled back to revision 2 (undo import)
873 repository tip rolled back to revision 2 (undo import)
870 working directory now based on revision 2
874 working directory now based on revision 2
871 $ hg update --clean
875 $ hg update --clean
872 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
876 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
873
877
874 kwexpand/kwshrink on selected files
878 kwexpand/kwshrink on selected files
875
879
876 $ mkdir x
880 $ mkdir x
877 $ hg copy a x/a
881 $ hg copy a x/a
878 $ hg --verbose kwshrink a
882 $ hg --verbose kwshrink a
879 overwriting a shrinking keywords
883 overwriting a shrinking keywords
880 - sleep required for dirstate.normal() check
884 - sleep required for dirstate.normal() check
881 $ sleep 1
885 $ sleep 1
882 $ hg status a
886 $ hg status a
883 $ hg --verbose kwexpand a
887 $ hg --verbose kwexpand a
884 overwriting a expanding keywords
888 overwriting a expanding keywords
885 $ hg status a
889 $ hg status a
886
890
887 kwexpand x/a should abort
891 kwexpand x/a should abort
888
892
889 $ hg --verbose kwexpand x/a
893 $ hg --verbose kwexpand x/a
890 abort: outstanding uncommitted changes
894 abort: outstanding uncommitted changes
891 [255]
895 [255]
892 $ cd x
896 $ cd x
893 $ hg --debug commit -m xa -d '3 0' -u 'User Name <user@example.com>'
897 $ hg --debug commit -m xa -d '3 0' -u 'User Name <user@example.com>'
894 x/a
898 x/a
895 x/a: copy a:779c764182ce5d43e2b1eb66ce06d7b47bfe342e
899 x/a: copy a:779c764182ce5d43e2b1eb66ce06d7b47bfe342e
896 overwriting x/a expanding keywords
900 overwriting x/a expanding keywords
897 committed changeset 3:b4560182a3f9a358179fd2d835c15e9da379c1e4
901 committed changeset 3:b4560182a3f9a358179fd2d835c15e9da379c1e4
898 $ cat a
902 $ cat a
899 expand $Id: x/a b4560182a3f9 Thu, 01 Jan 1970 00:00:03 +0000 user $
903 expand $Id: x/a b4560182a3f9 Thu, 01 Jan 1970 00:00:03 +0000 user $
900 do not process $Id:
904 do not process $Id:
901 xxx $
905 xxx $
902 $Xinfo: User Name <user@example.com>: xa $
906 $Xinfo: User Name <user@example.com>: xa $
903
907
904 kwshrink a inside directory x
908 kwshrink a inside directory x
905
909
906 $ hg --verbose kwshrink a
910 $ hg --verbose kwshrink a
907 overwriting x/a shrinking keywords
911 overwriting x/a shrinking keywords
908 $ cat a
912 $ cat a
909 expand $Id$
913 expand $Id$
910 do not process $Id:
914 do not process $Id:
911 xxx $
915 xxx $
912 $Xinfo$
916 $Xinfo$
913 $ cd ..
917 $ cd ..
914
918
915 kwexpand nonexistent
919 kwexpand nonexistent
916
920
917 $ hg kwexpand nonexistent
921 $ hg kwexpand nonexistent
918 nonexistent:* (glob)
922 nonexistent:* (glob)
919
923
920
924
921 hg serve
925 hg serve
922 - expand with hgweb file
926 - expand with hgweb file
923 - no expansion with hgweb annotate/changeset/filediff
927 - no expansion with hgweb annotate/changeset/filediff
924 - check errors
928 - check errors
925
929
926 $ hg serve -p $HGPORT -d --pid-file=hg.pid -A access.log -E errors.log
930 $ hg serve -p $HGPORT -d --pid-file=hg.pid -A access.log -E errors.log
927 $ cat hg.pid >> $DAEMON_PIDS
931 $ cat hg.pid >> $DAEMON_PIDS
928 $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT '/file/tip/a/?style=raw'
932 $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT '/file/tip/a/?style=raw'
929 200 Script output follows
933 200 Script output follows
930
934
931 expand $Id: a bb948857c743 Thu, 01 Jan 1970 00:00:02 +0000 user $
935 expand $Id: a bb948857c743 Thu, 01 Jan 1970 00:00:02 +0000 user $
932 do not process $Id:
936 do not process $Id:
933 xxx $
937 xxx $
934 $Xinfo: User Name <user@example.com>: firstline $
938 $Xinfo: User Name <user@example.com>: firstline $
935 $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT '/annotate/tip/a/?style=raw'
939 $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT '/annotate/tip/a/?style=raw'
936 200 Script output follows
940 200 Script output follows
937
941
938
942
939 user@1: expand $Id$
943 user@1: expand $Id$
940 user@1: do not process $Id:
944 user@1: do not process $Id:
941 user@1: xxx $
945 user@1: xxx $
942 user@2: $Xinfo$
946 user@2: $Xinfo$
943
947
944
948
945
949
946
950
947 $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT '/rev/tip/?style=raw'
951 $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT '/rev/tip/?style=raw'
948 200 Script output follows
952 200 Script output follows
949
953
950
954
951 # HG changeset patch
955 # HG changeset patch
952 # User User Name <user@example.com>
956 # User User Name <user@example.com>
953 # Date 3 0
957 # Date 3 0
954 # Node ID b4560182a3f9a358179fd2d835c15e9da379c1e4
958 # Node ID b4560182a3f9a358179fd2d835c15e9da379c1e4
955 # Parent bb948857c743469b22bbf51f7ec8112279ca5d83
959 # Parent bb948857c743469b22bbf51f7ec8112279ca5d83
956 xa
960 xa
957
961
958 diff -r bb948857c743 -r b4560182a3f9 x/a
962 diff -r bb948857c743 -r b4560182a3f9 x/a
959 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
963 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
960 +++ b/x/a Thu Jan 01 00:00:03 1970 +0000
964 +++ b/x/a Thu Jan 01 00:00:03 1970 +0000
961 @@ -0,0 +1,4 @@
965 @@ -0,0 +1,4 @@
962 +expand $Id$
966 +expand $Id$
963 +do not process $Id:
967 +do not process $Id:
964 +xxx $
968 +xxx $
965 +$Xinfo$
969 +$Xinfo$
966
970
967 $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT '/diff/bb948857c743/a?style=raw'
971 $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT '/diff/bb948857c743/a?style=raw'
968 200 Script output follows
972 200 Script output follows
969
973
970
974
971 diff -r ef63ca68695b -r bb948857c743 a
975 diff -r ef63ca68695b -r bb948857c743 a
972 --- a/a Thu Jan 01 00:00:00 1970 +0000
976 --- a/a Thu Jan 01 00:00:00 1970 +0000
973 +++ b/a Thu Jan 01 00:00:02 1970 +0000
977 +++ b/a Thu Jan 01 00:00:02 1970 +0000
974 @@ -1,3 +1,4 @@
978 @@ -1,3 +1,4 @@
975 expand $Id$
979 expand $Id$
976 do not process $Id:
980 do not process $Id:
977 xxx $
981 xxx $
978 +$Xinfo$
982 +$Xinfo$
979
983
980
984
981
985
982
986
983 $ cat errors.log
987 $ cat errors.log
984
988
985 Prepare merge and resolve tests
989 Prepare merge and resolve tests
986
990
987 $ echo '$Id$' > m
991 $ echo '$Id$' > m
988 $ hg add m
992 $ hg add m
989 $ hg commit -m 4kw
993 $ hg commit -m 4kw
990 $ echo foo >> m
994 $ echo foo >> m
991 $ hg commit -m 5foo
995 $ hg commit -m 5foo
992
996
993 simplemerge
997 simplemerge
994
998
995 $ hg update 4
999 $ hg update 4
996 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
1000 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
997 $ echo foo >> m
1001 $ echo foo >> m
998 $ hg commit -m 6foo
1002 $ hg commit -m 6foo
999 created new head
1003 created new head
1000 $ hg merge
1004 $ hg merge
1001 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
1005 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
1002 (branch merge, don't forget to commit)
1006 (branch merge, don't forget to commit)
1003 $ hg commit -m simplemerge
1007 $ hg commit -m simplemerge
1004 $ cat m
1008 $ cat m
1005 $Id: m 27d48ee14f67 Thu, 01 Jan 1970 00:00:00 +0000 test $
1009 $Id: m 27d48ee14f67 Thu, 01 Jan 1970 00:00:00 +0000 test $
1006 foo
1010 foo
1007
1011
1008 conflict: keyword should stay outside conflict zone
1012 conflict: keyword should stay outside conflict zone
1009
1013
1010 $ hg update 4
1014 $ hg update 4
1011 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
1015 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
1012 $ echo bar >> m
1016 $ echo bar >> m
1013 $ hg commit -m 8bar
1017 $ hg commit -m 8bar
1014 created new head
1018 created new head
1015 $ hg merge
1019 $ hg merge
1016 merging m
1020 merging m
1017 warning: conflicts during merge.
1021 warning: conflicts during merge.
1018 merging m incomplete! (edit conflicts, then use 'hg resolve --mark')
1022 merging m incomplete! (edit conflicts, then use 'hg resolve --mark')
1019 0 files updated, 0 files merged, 0 files removed, 1 files unresolved
1023 0 files updated, 0 files merged, 0 files removed, 1 files unresolved
1020 use 'hg resolve' to retry unresolved file merges or 'hg update -C .' to abandon
1024 use 'hg resolve' to retry unresolved file merges or 'hg update -C .' to abandon
1021 [1]
1025 [1]
1022 $ cat m
1026 $ cat m
1023 $Id$
1027 $Id$
1024 <<<<<<< local
1028 <<<<<<< local
1025 bar
1029 bar
1026 =======
1030 =======
1027 foo
1031 foo
1028 >>>>>>> other
1032 >>>>>>> other
1029
1033
1030 resolve to local
1034 resolve to local
1031
1035
1032 $ HGMERGE=internal:local hg resolve -a
1036 $ HGMERGE=internal:local hg resolve -a
1033 $ hg commit -m localresolve
1037 $ hg commit -m localresolve
1034 $ cat m
1038 $ cat m
1035 $Id: m 800511b3a22d Thu, 01 Jan 1970 00:00:00 +0000 test $
1039 $Id: m 800511b3a22d Thu, 01 Jan 1970 00:00:00 +0000 test $
1036 bar
1040 bar
1037
1041
1038 Test restricted mode with transplant -b
1042 Test restricted mode with transplant -b
1039
1043
1040 $ hg update 6
1044 $ hg update 6
1041 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
1045 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
1042 $ hg branch foo
1046 $ hg branch foo
1043 marked working directory as branch foo
1047 marked working directory as branch foo
1044 (branches are permanent and global, did you want a bookmark?)
1048 (branches are permanent and global, did you want a bookmark?)
1045 $ mv a a.bak
1049 $ mv a a.bak
1046 $ echo foobranch > a
1050 $ echo foobranch > a
1047 $ cat a.bak >> a
1051 $ cat a.bak >> a
1048 $ rm a.bak
1052 $ rm a.bak
1049 $ hg commit -m 9foobranch
1053 $ hg commit -m 9foobranch
1050 $ hg update default
1054 $ hg update default
1051 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
1055 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
1052 $ hg -y transplant -b foo tip
1056 $ hg -y transplant -b foo tip
1053 applying 4aa30d025d50
1057 applying 4aa30d025d50
1054 4aa30d025d50 transplanted to e00abbf63521
1058 4aa30d025d50 transplanted to e00abbf63521
1055
1059
1056 Expansion in changeset but not in file
1060 Expansion in changeset but not in file
1057
1061
1058 $ hg tip -p
1062 $ hg tip -p
1059 changeset: 11:e00abbf63521
1063 changeset: 11:e00abbf63521
1060 tag: tip
1064 tag: tip
1061 parent: 9:800511b3a22d
1065 parent: 9:800511b3a22d
1062 user: test
1066 user: test
1063 date: Thu Jan 01 00:00:00 1970 +0000
1067 date: Thu Jan 01 00:00:00 1970 +0000
1064 summary: 9foobranch
1068 summary: 9foobranch
1065
1069
1066 diff -r 800511b3a22d -r e00abbf63521 a
1070 diff -r 800511b3a22d -r e00abbf63521 a
1067 --- a/a Thu Jan 01 00:00:00 1970 +0000
1071 --- a/a Thu Jan 01 00:00:00 1970 +0000
1068 +++ b/a Thu Jan 01 00:00:00 1970 +0000
1072 +++ b/a Thu Jan 01 00:00:00 1970 +0000
1069 @@ -1,3 +1,4 @@
1073 @@ -1,3 +1,4 @@
1070 +foobranch
1074 +foobranch
1071 expand $Id$
1075 expand $Id$
1072 do not process $Id:
1076 do not process $Id:
1073 xxx $
1077 xxx $
1074
1078
1075 $ head -n 2 a
1079 $ head -n 2 a
1076 foobranch
1080 foobranch
1077 expand $Id: a e00abbf63521 Thu, 01 Jan 1970 00:00:00 +0000 test $
1081 expand $Id: a e00abbf63521 Thu, 01 Jan 1970 00:00:00 +0000 test $
1078
1082
1079 Turn off expansion
1083 Turn off expansion
1080
1084
1081 $ hg -q rollback
1085 $ hg -q rollback
1082 $ hg -q update -C
1086 $ hg -q update -C
1083
1087
1084 kwshrink with unknown file u
1088 kwshrink with unknown file u
1085
1089
1086 $ cp a u
1090 $ cp a u
1087 $ hg --verbose kwshrink
1091 $ hg --verbose kwshrink
1088 overwriting a shrinking keywords
1092 overwriting a shrinking keywords
1089 overwriting m shrinking keywords
1093 overwriting m shrinking keywords
1090 overwriting x/a shrinking keywords
1094 overwriting x/a shrinking keywords
1091
1095
1092 Keywords shrunk in working directory, but not yet disabled
1096 Keywords shrunk in working directory, but not yet disabled
1093 - cat shows unexpanded keywords
1097 - cat shows unexpanded keywords
1094 - hg cat shows expanded keywords
1098 - hg cat shows expanded keywords
1095
1099
1096 $ cat a b
1100 $ cat a b
1097 expand $Id$
1101 expand $Id$
1098 do not process $Id:
1102 do not process $Id:
1099 xxx $
1103 xxx $
1100 $Xinfo$
1104 $Xinfo$
1101 ignore $Id$
1105 ignore $Id$
1102 $ hg cat sym a b && echo
1106 $ hg cat sym a b && echo
1103 expand $Id: a bb948857c743 Thu, 01 Jan 1970 00:00:02 +0000 user $
1107 expand $Id: a bb948857c743 Thu, 01 Jan 1970 00:00:02 +0000 user $
1104 do not process $Id:
1108 do not process $Id:
1105 xxx $
1109 xxx $
1106 $Xinfo: User Name <user@example.com>: firstline $
1110 $Xinfo: User Name <user@example.com>: firstline $
1107 ignore $Id$
1111 ignore $Id$
1108 a
1112 a
1109
1113
1110 Now disable keyword expansion
1114 Now disable keyword expansion
1111
1115
1112 $ rm "$HGRCPATH"
1116 $ rm "$HGRCPATH"
1113 $ cat a b
1117 $ cat a b
1114 expand $Id$
1118 expand $Id$
1115 do not process $Id:
1119 do not process $Id:
1116 xxx $
1120 xxx $
1117 $Xinfo$
1121 $Xinfo$
1118 ignore $Id$
1122 ignore $Id$
1119 $ hg cat sym a b && echo
1123 $ hg cat sym a b && echo
1120 expand $Id$
1124 expand $Id$
1121 do not process $Id:
1125 do not process $Id:
1122 xxx $
1126 xxx $
1123 $Xinfo$
1127 $Xinfo$
1124 ignore $Id$
1128 ignore $Id$
1125 a
1129 a
@@ -1,1213 +1,1217 b''
1 $ "$TESTDIR/hghave" symlink unix-permissions serve || exit 80
1 $ "$TESTDIR/hghave" unix-permissions serve || exit 80
2 $ USERCACHE=`pwd`/cache; export USERCACHE
2 $ USERCACHE=`pwd`/cache; export USERCACHE
3 $ mkdir -p ${USERCACHE}
3 $ mkdir -p ${USERCACHE}
4 $ cat >> $HGRCPATH <<EOF
4 $ cat >> $HGRCPATH <<EOF
5 > [extensions]
5 > [extensions]
6 > largefiles=
6 > largefiles=
7 > purge=
7 > purge=
8 > rebase=
8 > rebase=
9 > transplant=
9 > transplant=
10 > [phases]
10 > [phases]
11 > publish=False
11 > publish=False
12 > [largefiles]
12 > [largefiles]
13 > minsize=2
13 > minsize=2
14 > patterns=glob:**.dat
14 > patterns=glob:**.dat
15 > usercache=${USERCACHE}
15 > usercache=${USERCACHE}
16 > [hooks]
16 > [hooks]
17 > precommit=echo "Invoking status precommit hook"; hg status
17 > precommit=echo "Invoking status precommit hook"; hg status
18 > EOF
18 > EOF
19
19
20 Create the repo with a couple of revisions of both large and normal
20 Create the repo with a couple of revisions of both large and normal
21 files, testing that status correctly shows largefiles and that summary output
21 files, testing that status correctly shows largefiles and that summary output
22 is correct.
22 is correct.
23
23
24 $ hg init a
24 $ hg init a
25 $ cd a
25 $ cd a
26 $ mkdir sub
26 $ mkdir sub
27 $ echo normal1 > normal1
27 $ echo normal1 > normal1
28 $ echo normal2 > sub/normal2
28 $ echo normal2 > sub/normal2
29 $ echo large1 > large1
29 $ echo large1 > large1
30 $ echo large2 > sub/large2
30 $ echo large2 > sub/large2
31 $ hg add normal1 sub/normal2
31 $ hg add normal1 sub/normal2
32 $ hg add --large large1 sub/large2
32 $ hg add --large large1 sub/large2
33 $ hg commit -m "add files"
33 $ hg commit -m "add files"
34 Invoking status precommit hook
34 Invoking status precommit hook
35 A large1
35 A large1
36 A normal1
36 A normal1
37 A sub/large2
37 A sub/large2
38 A sub/normal2
38 A sub/normal2
39 $ echo normal11 > normal1
39 $ echo normal11 > normal1
40 $ echo normal22 > sub/normal2
40 $ echo normal22 > sub/normal2
41 $ echo large11 > large1
41 $ echo large11 > large1
42 $ echo large22 > sub/large2
42 $ echo large22 > sub/large2
43 $ hg commit -m "edit files"
43 $ hg commit -m "edit files"
44 Invoking status precommit hook
44 Invoking status precommit hook
45 M large1
45 M large1
46 M normal1
46 M normal1
47 M sub/large2
47 M sub/large2
48 M sub/normal2
48 M sub/normal2
49 $ hg sum --large
49 $ hg sum --large
50 parent: 1:ce8896473775 tip
50 parent: 1:ce8896473775 tip
51 edit files
51 edit files
52 branch: default
52 branch: default
53 commit: (clean)
53 commit: (clean)
54 update: (current)
54 update: (current)
55 largefiles: No remote repo
55 largefiles: No remote repo
56
56
57 Commit preserved largefile contents.
57 Commit preserved largefile contents.
58
58
59 $ cat normal1
59 $ cat normal1
60 normal11
60 normal11
61 $ cat large1
61 $ cat large1
62 large11
62 large11
63 $ cat sub/normal2
63 $ cat sub/normal2
64 normal22
64 normal22
65 $ cat sub/large2
65 $ cat sub/large2
66 large22
66 large22
67
67
68 Test status, subdir and unknown files
68 Test status, subdir and unknown files
69
69
70 $ echo unknown > sub/unknown
70 $ echo unknown > sub/unknown
71 $ hg st --all
71 $ hg st --all
72 ? sub/unknown
72 ? sub/unknown
73 C large1
73 C large1
74 C normal1
74 C normal1
75 C sub/large2
75 C sub/large2
76 C sub/normal2
76 C sub/normal2
77 $ hg st --all sub
77 $ hg st --all sub
78 ? sub/unknown
78 ? sub/unknown
79 C sub/large2
79 C sub/large2
80 C sub/normal2
80 C sub/normal2
81 $ rm sub/unknown
81 $ rm sub/unknown
82
82
83 Remove both largefiles and normal files.
83 Remove both largefiles and normal files.
84
84
85 $ hg remove normal1 large1
85 $ hg remove normal1 large1
86 $ hg status large1
86 $ hg status large1
87 R large1
87 R large1
88 $ hg commit -m "remove files"
88 $ hg commit -m "remove files"
89 Invoking status precommit hook
89 Invoking status precommit hook
90 R large1
90 R large1
91 R normal1
91 R normal1
92 $ ls
92 $ ls
93 sub
93 sub
94 $ echo "testlargefile" > large1-test
94 $ echo "testlargefile" > large1-test
95 $ hg add --large large1-test
95 $ hg add --large large1-test
96 $ hg st
96 $ hg st
97 A large1-test
97 A large1-test
98 $ hg rm large1-test
98 $ hg rm large1-test
99 not removing large1-test: file has been marked for add (use forget to undo)
99 not removing large1-test: file has been marked for add (use forget to undo)
100 $ hg st
100 $ hg st
101 A large1-test
101 A large1-test
102 $ hg forget large1-test
102 $ hg forget large1-test
103 $ hg st
103 $ hg st
104 ? large1-test
104 ? large1-test
105 $ rm large1-test
105 $ rm large1-test
106
106
107 Copy both largefiles and normal files (testing that status output is correct).
107 Copy both largefiles and normal files (testing that status output is correct).
108
108
109 $ hg cp sub/normal2 normal1
109 $ hg cp sub/normal2 normal1
110 $ hg cp sub/large2 large1
110 $ hg cp sub/large2 large1
111 $ hg commit -m "copy files"
111 $ hg commit -m "copy files"
112 Invoking status precommit hook
112 Invoking status precommit hook
113 A large1
113 A large1
114 A normal1
114 A normal1
115 $ cat normal1
115 $ cat normal1
116 normal22
116 normal22
117 $ cat large1
117 $ cat large1
118 large22
118 large22
119
119
120 Test moving largefiles and verify that normal files are also unaffected.
120 Test moving largefiles and verify that normal files are also unaffected.
121
121
122 $ hg mv normal1 normal3
122 $ hg mv normal1 normal3
123 $ hg mv large1 large3
123 $ hg mv large1 large3
124 $ hg mv sub/normal2 sub/normal4
124 $ hg mv sub/normal2 sub/normal4
125 $ hg mv sub/large2 sub/large4
125 $ hg mv sub/large2 sub/large4
126 $ hg commit -m "move files"
126 $ hg commit -m "move files"
127 Invoking status precommit hook
127 Invoking status precommit hook
128 A large3
128 A large3
129 A normal3
129 A normal3
130 A sub/large4
130 A sub/large4
131 A sub/normal4
131 A sub/normal4
132 R large1
132 R large1
133 R normal1
133 R normal1
134 R sub/large2
134 R sub/large2
135 R sub/normal2
135 R sub/normal2
136 $ cat normal3
136 $ cat normal3
137 normal22
137 normal22
138 $ cat large3
138 $ cat large3
139 large22
139 large22
140 $ cat sub/normal4
140 $ cat sub/normal4
141 normal22
141 normal22
142 $ cat sub/large4
142 $ cat sub/large4
143 large22
143 large22
144
144
145 Test display of largefiles in hgweb
145 Test display of largefiles in hgweb
146
146
147 $ hg serve -d -p $HGPORT --pid-file ../hg.pid
147 $ hg serve -d -p $HGPORT --pid-file ../hg.pid
148 $ cat ../hg.pid >> $DAEMON_PIDS
148 $ cat ../hg.pid >> $DAEMON_PIDS
149 $ "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT '/file/tip/?style=raw'
149 $ "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT '/file/tip/?style=raw'
150 200 Script output follows
150 200 Script output follows
151
151
152
152
153 drwxr-xr-x sub
153 drwxr-xr-x sub
154 -rw-r--r-- 41 large3
154 -rw-r--r-- 41 large3
155 -rw-r--r-- 9 normal3
155 -rw-r--r-- 9 normal3
156
156
157
157
158 $ "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT '/file/tip/sub/?style=raw'
158 $ "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT '/file/tip/sub/?style=raw'
159 200 Script output follows
159 200 Script output follows
160
160
161
161
162 -rw-r--r-- 41 large4
162 -rw-r--r-- 41 large4
163 -rw-r--r-- 9 normal4
163 -rw-r--r-- 9 normal4
164
164
165
165
166 $ "$TESTDIR/killdaemons.py"
166 $ "$TESTDIR/killdaemons.py"
167
167
168 Test archiving the various revisions. These hit corner cases known with
168 Test archiving the various revisions. These hit corner cases known with
169 archiving.
169 archiving.
170
170
171 $ hg archive -r 0 ../archive0
171 $ hg archive -r 0 ../archive0
172 $ hg archive -r 1 ../archive1
172 $ hg archive -r 1 ../archive1
173 $ hg archive -r 2 ../archive2
173 $ hg archive -r 2 ../archive2
174 $ hg archive -r 3 ../archive3
174 $ hg archive -r 3 ../archive3
175 $ hg archive -r 4 ../archive4
175 $ hg archive -r 4 ../archive4
176 $ cd ../archive0
176 $ cd ../archive0
177 $ cat normal1
177 $ cat normal1
178 normal1
178 normal1
179 $ cat large1
179 $ cat large1
180 large1
180 large1
181 $ cat sub/normal2
181 $ cat sub/normal2
182 normal2
182 normal2
183 $ cat sub/large2
183 $ cat sub/large2
184 large2
184 large2
185 $ cd ../archive1
185 $ cd ../archive1
186 $ cat normal1
186 $ cat normal1
187 normal11
187 normal11
188 $ cat large1
188 $ cat large1
189 large11
189 large11
190 $ cat sub/normal2
190 $ cat sub/normal2
191 normal22
191 normal22
192 $ cat sub/large2
192 $ cat sub/large2
193 large22
193 large22
194 $ cd ../archive2
194 $ cd ../archive2
195 $ ls
195 $ ls
196 sub
196 sub
197 $ cat sub/normal2
197 $ cat sub/normal2
198 normal22
198 normal22
199 $ cat sub/large2
199 $ cat sub/large2
200 large22
200 large22
201 $ cd ../archive3
201 $ cd ../archive3
202 $ cat normal1
202 $ cat normal1
203 normal22
203 normal22
204 $ cat large1
204 $ cat large1
205 large22
205 large22
206 $ cat sub/normal2
206 $ cat sub/normal2
207 normal22
207 normal22
208 $ cat sub/large2
208 $ cat sub/large2
209 large22
209 large22
210 $ cd ../archive4
210 $ cd ../archive4
211 $ cat normal3
211 $ cat normal3
212 normal22
212 normal22
213 $ cat large3
213 $ cat large3
214 large22
214 large22
215 $ cat sub/normal4
215 $ cat sub/normal4
216 normal22
216 normal22
217 $ cat sub/large4
217 $ cat sub/large4
218 large22
218 large22
219
219
220 Commit corner case: specify files to commit.
220 Commit corner case: specify files to commit.
221
221
222 $ cd ../a
222 $ cd ../a
223 $ echo normal3 > normal3
223 $ echo normal3 > normal3
224 $ echo large3 > large3
224 $ echo large3 > large3
225 $ echo normal4 > sub/normal4
225 $ echo normal4 > sub/normal4
226 $ echo large4 > sub/large4
226 $ echo large4 > sub/large4
227 $ hg commit normal3 large3 sub/normal4 sub/large4 -m "edit files again"
227 $ hg commit normal3 large3 sub/normal4 sub/large4 -m "edit files again"
228 Invoking status precommit hook
228 Invoking status precommit hook
229 M large3
229 M large3
230 M normal3
230 M normal3
231 M sub/large4
231 M sub/large4
232 M sub/normal4
232 M sub/normal4
233 $ cat normal3
233 $ cat normal3
234 normal3
234 normal3
235 $ cat large3
235 $ cat large3
236 large3
236 large3
237 $ cat sub/normal4
237 $ cat sub/normal4
238 normal4
238 normal4
239 $ cat sub/large4
239 $ cat sub/large4
240 large4
240 large4
241
241
242 One more commit corner case: commit from a subdirectory.
242 One more commit corner case: commit from a subdirectory.
243
243
244 $ cd ../a
244 $ cd ../a
245 $ echo normal33 > normal3
245 $ echo normal33 > normal3
246 $ echo large33 > large3
246 $ echo large33 > large3
247 $ echo normal44 > sub/normal4
247 $ echo normal44 > sub/normal4
248 $ echo large44 > sub/large4
248 $ echo large44 > sub/large4
249 $ cd sub
249 $ cd sub
250 $ hg commit -m "edit files yet again"
250 $ hg commit -m "edit files yet again"
251 Invoking status precommit hook
251 Invoking status precommit hook
252 M large3
252 M large3
253 M normal3
253 M normal3
254 M sub/large4
254 M sub/large4
255 M sub/normal4
255 M sub/normal4
256 $ cat ../normal3
256 $ cat ../normal3
257 normal33
257 normal33
258 $ cat ../large3
258 $ cat ../large3
259 large33
259 large33
260 $ cat normal4
260 $ cat normal4
261 normal44
261 normal44
262 $ cat large4
262 $ cat large4
263 large44
263 large44
264
264
265 Committing standins is not allowed.
265 Committing standins is not allowed.
266
266
267 $ cd ..
267 $ cd ..
268 $ echo large3 > large3
268 $ echo large3 > large3
269 $ hg commit .hglf/large3 -m "try to commit standin"
269 $ hg commit .hglf/large3 -m "try to commit standin"
270 abort: file ".hglf/large3" is a largefile standin
270 abort: file ".hglf/large3" is a largefile standin
271 (commit the largefile itself instead)
271 (commit the largefile itself instead)
272 [255]
272 [255]
273
273
274 Corner cases for adding largefiles.
274 Corner cases for adding largefiles.
275
275
276 $ echo large5 > large5
276 $ echo large5 > large5
277 $ hg add --large large5
277 $ hg add --large large5
278 $ hg add --large large5
278 $ hg add --large large5
279 large5 already a largefile
279 large5 already a largefile
280 $ mkdir sub2
280 $ mkdir sub2
281 $ echo large6 > sub2/large6
281 $ echo large6 > sub2/large6
282 $ echo large7 > sub2/large7
282 $ echo large7 > sub2/large7
283 $ hg add --large sub2
283 $ hg add --large sub2
284 adding sub2/large6 as a largefile (glob)
284 adding sub2/large6 as a largefile (glob)
285 adding sub2/large7 as a largefile (glob)
285 adding sub2/large7 as a largefile (glob)
286 $ hg st
286 $ hg st
287 M large3
287 M large3
288 A large5
288 A large5
289 A sub2/large6
289 A sub2/large6
290 A sub2/large7
290 A sub2/large7
291
291
292 Test "hg status" with combination of 'file pattern' and 'directory
292 Test "hg status" with combination of 'file pattern' and 'directory
293 pattern' for largefiles:
293 pattern' for largefiles:
294
294
295 $ hg status sub2/large6 sub2
295 $ hg status sub2/large6 sub2
296 A sub2/large6
296 A sub2/large6
297 A sub2/large7
297 A sub2/large7
298
298
299 Config settings (pattern **.dat, minsize 2 MB) are respected.
299 Config settings (pattern **.dat, minsize 2 MB) are respected.
300
300
301 $ echo testdata > test.dat
301 $ echo testdata > test.dat
302 $ dd bs=1k count=2k if=/dev/zero of=reallylarge > /dev/null 2> /dev/null
302 $ dd bs=1k count=2k if=/dev/zero of=reallylarge > /dev/null 2> /dev/null
303 $ hg add
303 $ hg add
304 adding reallylarge as a largefile
304 adding reallylarge as a largefile
305 adding test.dat as a largefile
305 adding test.dat as a largefile
306
306
307 Test that minsize and --lfsize handle float values;
307 Test that minsize and --lfsize handle float values;
308 also tests that --lfsize overrides largefiles.minsize.
308 also tests that --lfsize overrides largefiles.minsize.
309 (0.250 MB = 256 kB = 262144 B)
309 (0.250 MB = 256 kB = 262144 B)
310
310
311 $ dd if=/dev/zero of=ratherlarge bs=1024 count=256 > /dev/null 2> /dev/null
311 $ dd if=/dev/zero of=ratherlarge bs=1024 count=256 > /dev/null 2> /dev/null
312 $ dd if=/dev/zero of=medium bs=1024 count=128 > /dev/null 2> /dev/null
312 $ dd if=/dev/zero of=medium bs=1024 count=128 > /dev/null 2> /dev/null
313 $ hg --config largefiles.minsize=.25 add
313 $ hg --config largefiles.minsize=.25 add
314 adding ratherlarge as a largefile
314 adding ratherlarge as a largefile
315 adding medium
315 adding medium
316 $ hg forget medium
316 $ hg forget medium
317 $ hg --config largefiles.minsize=.25 add --lfsize=.125
317 $ hg --config largefiles.minsize=.25 add --lfsize=.125
318 adding medium as a largefile
318 adding medium as a largefile
319 $ dd if=/dev/zero of=notlarge bs=1024 count=127 > /dev/null 2> /dev/null
319 $ dd if=/dev/zero of=notlarge bs=1024 count=127 > /dev/null 2> /dev/null
320 $ hg --config largefiles.minsize=.25 add --lfsize=.125
320 $ hg --config largefiles.minsize=.25 add --lfsize=.125
321 adding notlarge
321 adding notlarge
322 $ hg forget notlarge
322 $ hg forget notlarge
323
323
324 Test forget on largefiles.
324 Test forget on largefiles.
325
325
326 $ hg forget large3 large5 test.dat reallylarge ratherlarge medium
326 $ hg forget large3 large5 test.dat reallylarge ratherlarge medium
327 $ hg commit -m "add/edit more largefiles"
327 $ hg commit -m "add/edit more largefiles"
328 Invoking status precommit hook
328 Invoking status precommit hook
329 A sub2/large6
329 A sub2/large6
330 A sub2/large7
330 A sub2/large7
331 R large3
331 R large3
332 ? large5
332 ? large5
333 ? medium
333 ? medium
334 ? notlarge
334 ? notlarge
335 ? ratherlarge
335 ? ratherlarge
336 ? reallylarge
336 ? reallylarge
337 ? test.dat
337 ? test.dat
338 $ hg st
338 $ hg st
339 ? large3
339 ? large3
340 ? large5
340 ? large5
341 ? medium
341 ? medium
342 ? notlarge
342 ? notlarge
343 ? ratherlarge
343 ? ratherlarge
344 ? reallylarge
344 ? reallylarge
345 ? test.dat
345 ? test.dat
346
346
347 Purge with largefiles: verify that largefiles are still in the working
347 Purge with largefiles: verify that largefiles are still in the working
348 dir after a purge.
348 dir after a purge.
349
349
350 $ hg purge --all
350 $ hg purge --all
351 $ cat sub/large4
351 $ cat sub/large4
352 large44
352 large44
353 $ cat sub2/large6
353 $ cat sub2/large6
354 large6
354 large6
355 $ cat sub2/large7
355 $ cat sub2/large7
356 large7
356 large7
357
357
358 Test addremove: verify that files that should be added as largfiles are added as
358 Test addremove: verify that files that should be added as largfiles are added as
359 such and that already-existing largfiles are not added as normal files by
359 such and that already-existing largfiles are not added as normal files by
360 accident.
360 accident.
361
361
362 $ rm normal3
362 $ rm normal3
363 $ rm sub/large4
363 $ rm sub/large4
364 $ echo "testing addremove with patterns" > testaddremove.dat
364 $ echo "testing addremove with patterns" > testaddremove.dat
365 $ echo "normaladdremove" > normaladdremove
365 $ echo "normaladdremove" > normaladdremove
366 $ hg addremove
366 $ hg addremove
367 removing sub/large4
367 removing sub/large4
368 adding testaddremove.dat as a largefile
368 adding testaddremove.dat as a largefile
369 removing normal3
369 removing normal3
370 adding normaladdremove
370 adding normaladdremove
371
371
372 Clone a largefiles repo.
372 Clone a largefiles repo.
373
373
374 $ hg clone . ../b
374 $ hg clone . ../b
375 updating to branch default
375 updating to branch default
376 5 files updated, 0 files merged, 0 files removed, 0 files unresolved
376 5 files updated, 0 files merged, 0 files removed, 0 files unresolved
377 getting changed largefiles
377 getting changed largefiles
378 3 largefiles updated, 0 removed
378 3 largefiles updated, 0 removed
379 $ cd ../b
379 $ cd ../b
380 $ hg log --template '{rev}:{node|short} {desc|firstline}\n'
380 $ hg log --template '{rev}:{node|short} {desc|firstline}\n'
381 7:daea875e9014 add/edit more largefiles
381 7:daea875e9014 add/edit more largefiles
382 6:4355d653f84f edit files yet again
382 6:4355d653f84f edit files yet again
383 5:9d5af5072dbd edit files again
383 5:9d5af5072dbd edit files again
384 4:74c02385b94c move files
384 4:74c02385b94c move files
385 3:9e8fbc4bce62 copy files
385 3:9e8fbc4bce62 copy files
386 2:51a0ae4d5864 remove files
386 2:51a0ae4d5864 remove files
387 1:ce8896473775 edit files
387 1:ce8896473775 edit files
388 0:30d30fe6a5be add files
388 0:30d30fe6a5be add files
389 $ cat normal3
389 $ cat normal3
390 normal33
390 normal33
391 $ cat sub/normal4
391 $ cat sub/normal4
392 normal44
392 normal44
393 $ cat sub/large4
393 $ cat sub/large4
394 large44
394 large44
395 $ cat sub2/large6
395 $ cat sub2/large6
396 large6
396 large6
397 $ cat sub2/large7
397 $ cat sub2/large7
398 large7
398 large7
399 $ cd ..
399 $ cd ..
400 $ hg clone a -r 3 c
400 $ hg clone a -r 3 c
401 adding changesets
401 adding changesets
402 adding manifests
402 adding manifests
403 adding file changes
403 adding file changes
404 added 4 changesets with 10 changes to 4 files
404 added 4 changesets with 10 changes to 4 files
405 updating to branch default
405 updating to branch default
406 4 files updated, 0 files merged, 0 files removed, 0 files unresolved
406 4 files updated, 0 files merged, 0 files removed, 0 files unresolved
407 getting changed largefiles
407 getting changed largefiles
408 2 largefiles updated, 0 removed
408 2 largefiles updated, 0 removed
409 $ cd c
409 $ cd c
410 $ hg log --template '{rev}:{node|short} {desc|firstline}\n'
410 $ hg log --template '{rev}:{node|short} {desc|firstline}\n'
411 3:9e8fbc4bce62 copy files
411 3:9e8fbc4bce62 copy files
412 2:51a0ae4d5864 remove files
412 2:51a0ae4d5864 remove files
413 1:ce8896473775 edit files
413 1:ce8896473775 edit files
414 0:30d30fe6a5be add files
414 0:30d30fe6a5be add files
415 $ cat normal1
415 $ cat normal1
416 normal22
416 normal22
417 $ cat large1
417 $ cat large1
418 large22
418 large22
419 $ cat sub/normal2
419 $ cat sub/normal2
420 normal22
420 normal22
421 $ cat sub/large2
421 $ cat sub/large2
422 large22
422 large22
423
423
424 Old revisions of a clone have correct largefiles content (this also
424 Old revisions of a clone have correct largefiles content (this also
425 tests update).
425 tests update).
426
426
427 $ hg update -r 1
427 $ hg update -r 1
428 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
428 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
429 getting changed largefiles
429 getting changed largefiles
430 1 largefiles updated, 0 removed
430 1 largefiles updated, 0 removed
431 $ cat large1
431 $ cat large1
432 large11
432 large11
433 $ cat sub/large2
433 $ cat sub/large2
434 large22
434 large22
435 $ cd ..
435 $ cd ..
436
436
437 Test cloning with --all-largefiles flag
437 Test cloning with --all-largefiles flag
438
438
439 $ rm -Rf ${USERCACHE}/*
439 $ rm -Rf ${USERCACHE}/*
440 $ hg clone --all-largefiles a a-backup
440 $ hg clone --all-largefiles a a-backup
441 updating to branch default
441 updating to branch default
442 5 files updated, 0 files merged, 0 files removed, 0 files unresolved
442 5 files updated, 0 files merged, 0 files removed, 0 files unresolved
443 getting changed largefiles
443 getting changed largefiles
444 3 largefiles updated, 0 removed
444 3 largefiles updated, 0 removed
445 8 additional largefiles cached
445 8 additional largefiles cached
446
446
447 $ hg clone --all-largefiles a ssh://localhost/a
447 $ hg clone --all-largefiles a ssh://localhost/a
448 abort: --all-largefiles is incompatible with non-local destination ssh://localhost/a
448 abort: --all-largefiles is incompatible with non-local destination ssh://localhost/a
449 [255]
449 [255]
450
450
451 Test pulling with --all-largefiles flag
451 Test pulling with --all-largefiles flag
452
452
453 $ rm -Rf a-backup
453 $ rm -Rf a-backup
454 $ hg clone -r 1 a a-backup
454 $ hg clone -r 1 a a-backup
455 adding changesets
455 adding changesets
456 adding manifests
456 adding manifests
457 adding file changes
457 adding file changes
458 added 2 changesets with 8 changes to 4 files
458 added 2 changesets with 8 changes to 4 files
459 updating to branch default
459 updating to branch default
460 4 files updated, 0 files merged, 0 files removed, 0 files unresolved
460 4 files updated, 0 files merged, 0 files removed, 0 files unresolved
461 getting changed largefiles
461 getting changed largefiles
462 2 largefiles updated, 0 removed
462 2 largefiles updated, 0 removed
463 $ rm -Rf ${USERCACHE}/*
463 $ rm -Rf ${USERCACHE}/*
464 $ cd a-backup
464 $ cd a-backup
465 $ hg pull --all-largefiles
465 $ hg pull --all-largefiles
466 pulling from $TESTTMP/a
466 pulling from $TESTTMP/a
467 searching for changes
467 searching for changes
468 adding changesets
468 adding changesets
469 adding manifests
469 adding manifests
470 adding file changes
470 adding file changes
471 added 6 changesets with 16 changes to 8 files
471 added 6 changesets with 16 changes to 8 files
472 (run 'hg update' to get a working copy)
472 (run 'hg update' to get a working copy)
473 caching new largefiles
473 caching new largefiles
474 3 largefiles cached
474 3 largefiles cached
475 3 additional largefiles cached
475 3 additional largefiles cached
476 $ cd ..
476 $ cd ..
477
477
478 Rebasing between two repositories does not revert largefiles to old
478 Rebasing between two repositories does not revert largefiles to old
479 revisions (this was a very bad bug that took a lot of work to fix).
479 revisions (this was a very bad bug that took a lot of work to fix).
480
480
481 $ hg clone a d
481 $ hg clone a d
482 updating to branch default
482 updating to branch default
483 5 files updated, 0 files merged, 0 files removed, 0 files unresolved
483 5 files updated, 0 files merged, 0 files removed, 0 files unresolved
484 getting changed largefiles
484 getting changed largefiles
485 3 largefiles updated, 0 removed
485 3 largefiles updated, 0 removed
486 $ cd b
486 $ cd b
487 $ echo large4-modified > sub/large4
487 $ echo large4-modified > sub/large4
488 $ echo normal3-modified > normal3
488 $ echo normal3-modified > normal3
489 $ hg commit -m "modify normal file and largefile in repo b"
489 $ hg commit -m "modify normal file and largefile in repo b"
490 Invoking status precommit hook
490 Invoking status precommit hook
491 M normal3
491 M normal3
492 M sub/large4
492 M sub/large4
493 $ cd ../d
493 $ cd ../d
494 $ echo large6-modified > sub2/large6
494 $ echo large6-modified > sub2/large6
495 $ echo normal4-modified > sub/normal4
495 $ echo normal4-modified > sub/normal4
496 $ hg commit -m "modify normal file largefile in repo d"
496 $ hg commit -m "modify normal file largefile in repo d"
497 Invoking status precommit hook
497 Invoking status precommit hook
498 M sub/normal4
498 M sub/normal4
499 M sub2/large6
499 M sub2/large6
500 $ cd ..
500 $ cd ..
501 $ hg clone d e
501 $ hg clone d e
502 updating to branch default
502 updating to branch default
503 5 files updated, 0 files merged, 0 files removed, 0 files unresolved
503 5 files updated, 0 files merged, 0 files removed, 0 files unresolved
504 getting changed largefiles
504 getting changed largefiles
505 3 largefiles updated, 0 removed
505 3 largefiles updated, 0 removed
506 $ cd d
506 $ cd d
507 $ hg pull --rebase ../b
507 $ hg pull --rebase ../b
508 pulling from ../b
508 pulling from ../b
509 searching for changes
509 searching for changes
510 adding changesets
510 adding changesets
511 adding manifests
511 adding manifests
512 adding file changes
512 adding file changes
513 added 1 changesets with 2 changes to 2 files (+1 heads)
513 added 1 changesets with 2 changes to 2 files (+1 heads)
514 Invoking status precommit hook
514 Invoking status precommit hook
515 M sub/normal4
515 M sub/normal4
516 M sub2/large6
516 M sub2/large6
517 saved backup bundle to $TESTTMP/d/.hg/strip-backup/f574fb32bb45-backup.hg (glob)
517 saved backup bundle to $TESTTMP/d/.hg/strip-backup/f574fb32bb45-backup.hg (glob)
518 nothing to rebase
518 nothing to rebase
519 $ hg log --template '{rev}:{node|short} {desc|firstline}\n'
519 $ hg log --template '{rev}:{node|short} {desc|firstline}\n'
520 9:598410d3eb9a modify normal file largefile in repo d
520 9:598410d3eb9a modify normal file largefile in repo d
521 8:a381d2c8c80e modify normal file and largefile in repo b
521 8:a381d2c8c80e modify normal file and largefile in repo b
522 7:daea875e9014 add/edit more largefiles
522 7:daea875e9014 add/edit more largefiles
523 6:4355d653f84f edit files yet again
523 6:4355d653f84f edit files yet again
524 5:9d5af5072dbd edit files again
524 5:9d5af5072dbd edit files again
525 4:74c02385b94c move files
525 4:74c02385b94c move files
526 3:9e8fbc4bce62 copy files
526 3:9e8fbc4bce62 copy files
527 2:51a0ae4d5864 remove files
527 2:51a0ae4d5864 remove files
528 1:ce8896473775 edit files
528 1:ce8896473775 edit files
529 0:30d30fe6a5be add files
529 0:30d30fe6a5be add files
530 $ cat normal3
530 $ cat normal3
531 normal3-modified
531 normal3-modified
532 $ cat sub/normal4
532 $ cat sub/normal4
533 normal4-modified
533 normal4-modified
534 $ cat sub/large4
534 $ cat sub/large4
535 large4-modified
535 large4-modified
536 $ cat sub2/large6
536 $ cat sub2/large6
537 large6-modified
537 large6-modified
538 $ cat sub2/large7
538 $ cat sub2/large7
539 large7
539 large7
540 $ cd ../e
540 $ cd ../e
541 $ hg pull ../b
541 $ hg pull ../b
542 pulling from ../b
542 pulling from ../b
543 searching for changes
543 searching for changes
544 adding changesets
544 adding changesets
545 adding manifests
545 adding manifests
546 adding file changes
546 adding file changes
547 added 1 changesets with 2 changes to 2 files (+1 heads)
547 added 1 changesets with 2 changes to 2 files (+1 heads)
548 (run 'hg heads' to see heads, 'hg merge' to merge)
548 (run 'hg heads' to see heads, 'hg merge' to merge)
549 caching new largefiles
549 caching new largefiles
550 0 largefiles cached
550 0 largefiles cached
551 $ hg rebase
551 $ hg rebase
552 Invoking status precommit hook
552 Invoking status precommit hook
553 M sub/normal4
553 M sub/normal4
554 M sub2/large6
554 M sub2/large6
555 saved backup bundle to $TESTTMP/e/.hg/strip-backup/f574fb32bb45-backup.hg (glob)
555 saved backup bundle to $TESTTMP/e/.hg/strip-backup/f574fb32bb45-backup.hg (glob)
556 $ hg log --template '{rev}:{node|short} {desc|firstline}\n'
556 $ hg log --template '{rev}:{node|short} {desc|firstline}\n'
557 9:598410d3eb9a modify normal file largefile in repo d
557 9:598410d3eb9a modify normal file largefile in repo d
558 8:a381d2c8c80e modify normal file and largefile in repo b
558 8:a381d2c8c80e modify normal file and largefile in repo b
559 7:daea875e9014 add/edit more largefiles
559 7:daea875e9014 add/edit more largefiles
560 6:4355d653f84f edit files yet again
560 6:4355d653f84f edit files yet again
561 5:9d5af5072dbd edit files again
561 5:9d5af5072dbd edit files again
562 4:74c02385b94c move files
562 4:74c02385b94c move files
563 3:9e8fbc4bce62 copy files
563 3:9e8fbc4bce62 copy files
564 2:51a0ae4d5864 remove files
564 2:51a0ae4d5864 remove files
565 1:ce8896473775 edit files
565 1:ce8896473775 edit files
566 0:30d30fe6a5be add files
566 0:30d30fe6a5be add files
567 $ cat normal3
567 $ cat normal3
568 normal3-modified
568 normal3-modified
569 $ cat sub/normal4
569 $ cat sub/normal4
570 normal4-modified
570 normal4-modified
571 $ cat sub/large4
571 $ cat sub/large4
572 large4-modified
572 large4-modified
573 $ cat sub2/large6
573 $ cat sub2/large6
574 large6-modified
574 large6-modified
575 $ cat sub2/large7
575 $ cat sub2/large7
576 large7
576 large7
577
577
578 Rollback on largefiles.
578 Rollback on largefiles.
579
579
580 $ echo large4-modified-again > sub/large4
580 $ echo large4-modified-again > sub/large4
581 $ hg commit -m "Modify large4 again"
581 $ hg commit -m "Modify large4 again"
582 Invoking status precommit hook
582 Invoking status precommit hook
583 M sub/large4
583 M sub/large4
584 $ hg rollback
584 $ hg rollback
585 repository tip rolled back to revision 9 (undo commit)
585 repository tip rolled back to revision 9 (undo commit)
586 working directory now based on revision 9
586 working directory now based on revision 9
587 $ hg st
587 $ hg st
588 M sub/large4
588 M sub/large4
589 $ hg log --template '{rev}:{node|short} {desc|firstline}\n'
589 $ hg log --template '{rev}:{node|short} {desc|firstline}\n'
590 9:598410d3eb9a modify normal file largefile in repo d
590 9:598410d3eb9a modify normal file largefile in repo d
591 8:a381d2c8c80e modify normal file and largefile in repo b
591 8:a381d2c8c80e modify normal file and largefile in repo b
592 7:daea875e9014 add/edit more largefiles
592 7:daea875e9014 add/edit more largefiles
593 6:4355d653f84f edit files yet again
593 6:4355d653f84f edit files yet again
594 5:9d5af5072dbd edit files again
594 5:9d5af5072dbd edit files again
595 4:74c02385b94c move files
595 4:74c02385b94c move files
596 3:9e8fbc4bce62 copy files
596 3:9e8fbc4bce62 copy files
597 2:51a0ae4d5864 remove files
597 2:51a0ae4d5864 remove files
598 1:ce8896473775 edit files
598 1:ce8896473775 edit files
599 0:30d30fe6a5be add files
599 0:30d30fe6a5be add files
600 $ cat sub/large4
600 $ cat sub/large4
601 large4-modified-again
601 large4-modified-again
602
602
603 "update --check" refuses to update with uncommitted changes.
603 "update --check" refuses to update with uncommitted changes.
604 $ hg update --check 8
604 $ hg update --check 8
605 abort: uncommitted local changes
605 abort: uncommitted local changes
606 [255]
606 [255]
607
607
608 "update --clean" leaves correct largefiles in working copy.
608 "update --clean" leaves correct largefiles in working copy.
609
609
610 $ hg update --clean
610 $ hg update --clean
611 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
611 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
612 getting changed largefiles
612 getting changed largefiles
613 1 largefiles updated, 0 removed
613 1 largefiles updated, 0 removed
614 $ cat normal3
614 $ cat normal3
615 normal3-modified
615 normal3-modified
616 $ cat sub/normal4
616 $ cat sub/normal4
617 normal4-modified
617 normal4-modified
618 $ cat sub/large4
618 $ cat sub/large4
619 large4-modified
619 large4-modified
620 $ cat sub2/large6
620 $ cat sub2/large6
621 large6-modified
621 large6-modified
622 $ cat sub2/large7
622 $ cat sub2/large7
623 large7
623 large7
624
624
625 Now "update check" is happy.
625 Now "update check" is happy.
626 $ hg update --check 8
626 $ hg update --check 8
627 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
627 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
628 getting changed largefiles
628 getting changed largefiles
629 1 largefiles updated, 0 removed
629 1 largefiles updated, 0 removed
630 $ hg update --check
630 $ hg update --check
631 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
631 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
632 getting changed largefiles
632 getting changed largefiles
633 1 largefiles updated, 0 removed
633 1 largefiles updated, 0 removed
634
634
635 Test removing empty largefiles directories on update
635 Test removing empty largefiles directories on update
636 $ test -d sub2 && echo "sub2 exists"
636 $ test -d sub2 && echo "sub2 exists"
637 sub2 exists
637 sub2 exists
638 $ hg update -q null
638 $ hg update -q null
639 $ test -d sub2 && echo "error: sub2 should not exist anymore"
639 $ test -d sub2 && echo "error: sub2 should not exist anymore"
640 [1]
640 [1]
641 $ hg update -q
641 $ hg update -q
642
642
643 Test hg remove removes empty largefiles directories
643 Test hg remove removes empty largefiles directories
644 $ test -d sub2 && echo "sub2 exists"
644 $ test -d sub2 && echo "sub2 exists"
645 sub2 exists
645 sub2 exists
646 $ hg remove sub2/*
646 $ hg remove sub2/*
647 $ test -d sub2 && echo "error: sub2 should not exist anymore"
647 $ test -d sub2 && echo "error: sub2 should not exist anymore"
648 [1]
648 [1]
649 $ hg revert sub2/large6 sub2/large7
649 $ hg revert sub2/large6 sub2/large7
650
650
651 "revert" works on largefiles (and normal files too).
651 "revert" works on largefiles (and normal files too).
652 $ echo hack3 >> normal3
652 $ echo hack3 >> normal3
653 $ echo hack4 >> sub/normal4
653 $ echo hack4 >> sub/normal4
654 $ echo hack4 >> sub/large4
654 $ echo hack4 >> sub/large4
655 $ rm sub2/large6
655 $ rm sub2/large6
656 $ hg revert sub2/large6
656 $ hg revert sub2/large6
657 $ hg rm sub2/large6
657 $ hg rm sub2/large6
658 $ echo new >> sub2/large8
658 $ echo new >> sub2/large8
659 $ hg add --large sub2/large8
659 $ hg add --large sub2/large8
660 # XXX we don't really want to report that we're reverting the standin;
660 # XXX we don't really want to report that we're reverting the standin;
661 # that's just an implementation detail. But I don't see an obvious fix. ;-(
661 # that's just an implementation detail. But I don't see an obvious fix. ;-(
662 $ hg revert sub
662 $ hg revert sub
663 reverting .hglf/sub/large4 (glob)
663 reverting .hglf/sub/large4 (glob)
664 reverting sub/normal4 (glob)
664 reverting sub/normal4 (glob)
665 $ hg status
665 $ hg status
666 M normal3
666 M normal3
667 A sub2/large8
667 A sub2/large8
668 R sub2/large6
668 R sub2/large6
669 ? sub/large4.orig
669 ? sub/large4.orig
670 ? sub/normal4.orig
670 ? sub/normal4.orig
671 $ cat sub/normal4
671 $ cat sub/normal4
672 normal4-modified
672 normal4-modified
673 $ cat sub/large4
673 $ cat sub/large4
674 large4-modified
674 large4-modified
675 $ hg revert -a --no-backup
675 $ hg revert -a --no-backup
676 undeleting .hglf/sub2/large6 (glob)
676 undeleting .hglf/sub2/large6 (glob)
677 forgetting .hglf/sub2/large8 (glob)
677 forgetting .hglf/sub2/large8 (glob)
678 reverting normal3
678 reverting normal3
679 $ hg status
679 $ hg status
680 ? sub/large4.orig
680 ? sub/large4.orig
681 ? sub/normal4.orig
681 ? sub/normal4.orig
682 ? sub2/large8
682 ? sub2/large8
683 $ cat normal3
683 $ cat normal3
684 normal3-modified
684 normal3-modified
685 $ cat sub2/large6
685 $ cat sub2/large6
686 large6-modified
686 large6-modified
687 $ rm sub/*.orig sub2/large8
687 $ rm sub/*.orig sub2/large8
688
688
689 revert some files to an older revision
689 revert some files to an older revision
690 $ hg revert --no-backup -r 8 sub2
690 $ hg revert --no-backup -r 8 sub2
691 reverting .hglf/sub2/large6 (glob)
691 reverting .hglf/sub2/large6 (glob)
692 $ cat sub2/large6
692 $ cat sub2/large6
693 large6
693 large6
694 $ hg revert --no-backup sub2
694 $ hg revert --no-backup sub2
695 reverting .hglf/sub2/large6 (glob)
695 reverting .hglf/sub2/large6 (glob)
696 $ hg status
696 $ hg status
697
697
698 "verify --large" actually verifies largefiles
698 "verify --large" actually verifies largefiles
699
699
700 $ hg verify --large
700 $ hg verify --large
701 checking changesets
701 checking changesets
702 checking manifests
702 checking manifests
703 crosschecking files in changesets and manifests
703 crosschecking files in changesets and manifests
704 checking files
704 checking files
705 10 files, 10 changesets, 28 total revisions
705 10 files, 10 changesets, 28 total revisions
706 searching 1 changesets for largefiles
706 searching 1 changesets for largefiles
707 verified existence of 3 revisions of 3 largefiles
707 verified existence of 3 revisions of 3 largefiles
708
708
709 Merging does not revert to old versions of largefiles and also check
709 Merging does not revert to old versions of largefiles and also check
710 that merging after having pulled from a non-default remote works
710 that merging after having pulled from a non-default remote works
711 correctly.
711 correctly.
712
712
713 $ cd ..
713 $ cd ..
714 $ hg clone -r 7 e temp
714 $ hg clone -r 7 e temp
715 adding changesets
715 adding changesets
716 adding manifests
716 adding manifests
717 adding file changes
717 adding file changes
718 added 8 changesets with 24 changes to 10 files
718 added 8 changesets with 24 changes to 10 files
719 updating to branch default
719 updating to branch default
720 5 files updated, 0 files merged, 0 files removed, 0 files unresolved
720 5 files updated, 0 files merged, 0 files removed, 0 files unresolved
721 getting changed largefiles
721 getting changed largefiles
722 3 largefiles updated, 0 removed
722 3 largefiles updated, 0 removed
723 $ hg clone temp f
723 $ hg clone temp f
724 updating to branch default
724 updating to branch default
725 5 files updated, 0 files merged, 0 files removed, 0 files unresolved
725 5 files updated, 0 files merged, 0 files removed, 0 files unresolved
726 getting changed largefiles
726 getting changed largefiles
727 3 largefiles updated, 0 removed
727 3 largefiles updated, 0 removed
728 # Delete the largefiles in the largefiles system cache so that we have an
728 # Delete the largefiles in the largefiles system cache so that we have an
729 # opportunity to test that caching after a pull works.
729 # opportunity to test that caching after a pull works.
730 $ rm ${USERCACHE}/*
730 $ rm ${USERCACHE}/*
731 $ cd f
731 $ cd f
732 $ echo "large4-merge-test" > sub/large4
732 $ echo "large4-merge-test" > sub/large4
733 $ hg commit -m "Modify large4 to test merge"
733 $ hg commit -m "Modify large4 to test merge"
734 Invoking status precommit hook
734 Invoking status precommit hook
735 M sub/large4
735 M sub/large4
736 $ hg pull ../e
736 $ hg pull ../e
737 pulling from ../e
737 pulling from ../e
738 searching for changes
738 searching for changes
739 adding changesets
739 adding changesets
740 adding manifests
740 adding manifests
741 adding file changes
741 adding file changes
742 added 2 changesets with 4 changes to 4 files (+1 heads)
742 added 2 changesets with 4 changes to 4 files (+1 heads)
743 (run 'hg heads' to see heads, 'hg merge' to merge)
743 (run 'hg heads' to see heads, 'hg merge' to merge)
744 caching new largefiles
744 caching new largefiles
745 2 largefiles cached
745 2 largefiles cached
746 $ hg merge
746 $ hg merge
747 merging sub/large4
747 merging sub/large4
748 largefile sub/large4 has a merge conflict
748 largefile sub/large4 has a merge conflict
749 keep (l)ocal or take (o)ther? l
749 keep (l)ocal or take (o)ther? l
750 3 files updated, 1 files merged, 0 files removed, 0 files unresolved
750 3 files updated, 1 files merged, 0 files removed, 0 files unresolved
751 (branch merge, don't forget to commit)
751 (branch merge, don't forget to commit)
752 getting changed largefiles
752 getting changed largefiles
753 1 largefiles updated, 0 removed
753 1 largefiles updated, 0 removed
754 $ hg commit -m "Merge repos e and f"
754 $ hg commit -m "Merge repos e and f"
755 Invoking status precommit hook
755 Invoking status precommit hook
756 M normal3
756 M normal3
757 M sub/normal4
757 M sub/normal4
758 M sub2/large6
758 M sub2/large6
759 $ cat normal3
759 $ cat normal3
760 normal3-modified
760 normal3-modified
761 $ cat sub/normal4
761 $ cat sub/normal4
762 normal4-modified
762 normal4-modified
763 $ cat sub/large4
763 $ cat sub/large4
764 large4-merge-test
764 large4-merge-test
765 $ cat sub2/large6
765 $ cat sub2/large6
766 large6-modified
766 large6-modified
767 $ cat sub2/large7
767 $ cat sub2/large7
768 large7
768 large7
769
769
770 Test status after merging with a branch that introduces a new largefile:
770 Test status after merging with a branch that introduces a new largefile:
771
771
772 $ echo large > large
772 $ echo large > large
773 $ hg add --large large
773 $ hg add --large large
774 $ hg commit -m 'add largefile'
774 $ hg commit -m 'add largefile'
775 Invoking status precommit hook
775 Invoking status precommit hook
776 A large
776 A large
777 $ hg update -q ".^"
777 $ hg update -q ".^"
778 $ echo change >> normal3
778 $ echo change >> normal3
779 $ hg commit -m 'some change'
779 $ hg commit -m 'some change'
780 Invoking status precommit hook
780 Invoking status precommit hook
781 M normal3
781 M normal3
782 created new head
782 created new head
783 $ hg merge
783 $ hg merge
784 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
784 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
785 (branch merge, don't forget to commit)
785 (branch merge, don't forget to commit)
786 getting changed largefiles
786 getting changed largefiles
787 1 largefiles updated, 0 removed
787 1 largefiles updated, 0 removed
788 $ hg status
788 $ hg status
789 M large
789 M large
790
790
791 Test that a normal file and a largefile with the same name and path cannot
791 Test that a normal file and a largefile with the same name and path cannot
792 coexist.
792 coexist.
793
793
794 $ rm sub2/large7
794 $ rm sub2/large7
795 $ echo "largeasnormal" > sub2/large7
795 $ echo "largeasnormal" > sub2/large7
796 $ hg add sub2/large7
796 $ hg add sub2/large7
797 sub2/large7 already a largefile
797 sub2/large7 already a largefile
798
798
799 Test that transplanting a largefile change works correctly.
799 Test that transplanting a largefile change works correctly.
800
800
801 $ cd ..
801 $ cd ..
802 $ hg clone -r 8 d g
802 $ hg clone -r 8 d g
803 adding changesets
803 adding changesets
804 adding manifests
804 adding manifests
805 adding file changes
805 adding file changes
806 added 9 changesets with 26 changes to 10 files
806 added 9 changesets with 26 changes to 10 files
807 updating to branch default
807 updating to branch default
808 5 files updated, 0 files merged, 0 files removed, 0 files unresolved
808 5 files updated, 0 files merged, 0 files removed, 0 files unresolved
809 getting changed largefiles
809 getting changed largefiles
810 3 largefiles updated, 0 removed
810 3 largefiles updated, 0 removed
811 $ cd g
811 $ cd g
812 $ hg transplant -s ../d 598410d3eb9a
812 $ hg transplant -s ../d 598410d3eb9a
813 searching for changes
813 searching for changes
814 searching for changes
814 searching for changes
815 adding changesets
815 adding changesets
816 adding manifests
816 adding manifests
817 adding file changes
817 adding file changes
818 added 1 changesets with 2 changes to 2 files
818 added 1 changesets with 2 changes to 2 files
819 getting changed largefiles
819 getting changed largefiles
820 1 largefiles updated, 0 removed
820 1 largefiles updated, 0 removed
821 $ hg log --template '{rev}:{node|short} {desc|firstline}\n'
821 $ hg log --template '{rev}:{node|short} {desc|firstline}\n'
822 9:598410d3eb9a modify normal file largefile in repo d
822 9:598410d3eb9a modify normal file largefile in repo d
823 8:a381d2c8c80e modify normal file and largefile in repo b
823 8:a381d2c8c80e modify normal file and largefile in repo b
824 7:daea875e9014 add/edit more largefiles
824 7:daea875e9014 add/edit more largefiles
825 6:4355d653f84f edit files yet again
825 6:4355d653f84f edit files yet again
826 5:9d5af5072dbd edit files again
826 5:9d5af5072dbd edit files again
827 4:74c02385b94c move files
827 4:74c02385b94c move files
828 3:9e8fbc4bce62 copy files
828 3:9e8fbc4bce62 copy files
829 2:51a0ae4d5864 remove files
829 2:51a0ae4d5864 remove files
830 1:ce8896473775 edit files
830 1:ce8896473775 edit files
831 0:30d30fe6a5be add files
831 0:30d30fe6a5be add files
832 $ cat normal3
832 $ cat normal3
833 normal3-modified
833 normal3-modified
834 $ cat sub/normal4
834 $ cat sub/normal4
835 normal4-modified
835 normal4-modified
836 $ cat sub/large4
836 $ cat sub/large4
837 large4-modified
837 large4-modified
838 $ cat sub2/large6
838 $ cat sub2/large6
839 large6-modified
839 large6-modified
840 $ cat sub2/large7
840 $ cat sub2/large7
841 large7
841 large7
842
842
843 Cat a largefile
843 Cat a largefile
844 $ hg cat normal3
844 $ hg cat normal3
845 normal3-modified
845 normal3-modified
846 $ hg cat sub/large4
846 $ hg cat sub/large4
847 large4-modified
847 large4-modified
848 $ rm ${USERCACHE}/*
848 $ rm ${USERCACHE}/*
849 $ hg cat -r a381d2c8c80e -o cat.out sub/large4
849 $ hg cat -r a381d2c8c80e -o cat.out sub/large4
850 $ cat cat.out
850 $ cat cat.out
851 large4-modified
851 large4-modified
852 $ rm cat.out
852 $ rm cat.out
853 $ hg cat -r a381d2c8c80e normal3
853 $ hg cat -r a381d2c8c80e normal3
854 normal3-modified
854 normal3-modified
855
855
856 Test that renaming a largefile results in correct output for status
856 Test that renaming a largefile results in correct output for status
857
857
858 $ hg rename sub/large4 large4-renamed
858 $ hg rename sub/large4 large4-renamed
859 $ hg commit -m "test rename output"
859 $ hg commit -m "test rename output"
860 Invoking status precommit hook
860 Invoking status precommit hook
861 A large4-renamed
861 A large4-renamed
862 R sub/large4
862 R sub/large4
863 $ cat large4-renamed
863 $ cat large4-renamed
864 large4-modified
864 large4-modified
865 $ cd sub2
865 $ cd sub2
866 $ hg rename large6 large6-renamed
866 $ hg rename large6 large6-renamed
867 $ hg st
867 $ hg st
868 A sub2/large6-renamed
868 A sub2/large6-renamed
869 R sub2/large6
869 R sub2/large6
870 $ cd ..
870 $ cd ..
871
871
872 Test --normal flag
872 Test --normal flag
873
873
874 $ dd if=/dev/zero bs=2k count=11k > new-largefile 2> /dev/null
874 $ dd if=/dev/zero bs=2k count=11k > new-largefile 2> /dev/null
875 $ hg add --normal --large new-largefile
875 $ hg add --normal --large new-largefile
876 abort: --normal cannot be used with --large
876 abort: --normal cannot be used with --large
877 [255]
877 [255]
878 $ hg add --normal new-largefile
878 $ hg add --normal new-largefile
879 new-largefile: up to 69 MB of RAM may be required to manage this file
879 new-largefile: up to 69 MB of RAM may be required to manage this file
880 (use 'hg revert new-largefile' to cancel the pending addition)
880 (use 'hg revert new-largefile' to cancel the pending addition)
881 $ cd ..
881 $ cd ..
882
882
883 vanilla clients not locked out from largefiles servers on vanilla repos
883 vanilla clients not locked out from largefiles servers on vanilla repos
884 $ mkdir r1
884 $ mkdir r1
885 $ cd r1
885 $ cd r1
886 $ hg init
886 $ hg init
887 $ echo c1 > f1
887 $ echo c1 > f1
888 $ hg add f1
888 $ hg add f1
889 $ hg commit -m "m1"
889 $ hg commit -m "m1"
890 Invoking status precommit hook
890 Invoking status precommit hook
891 A f1
891 A f1
892 $ cd ..
892 $ cd ..
893 $ hg serve -R r1 -d -p $HGPORT --pid-file hg.pid
893 $ hg serve -R r1 -d -p $HGPORT --pid-file hg.pid
894 $ cat hg.pid >> $DAEMON_PIDS
894 $ cat hg.pid >> $DAEMON_PIDS
895 $ hg --config extensions.largefiles=! clone http://localhost:$HGPORT r2
895 $ hg --config extensions.largefiles=! clone http://localhost:$HGPORT r2
896 requesting all changes
896 requesting all changes
897 adding changesets
897 adding changesets
898 adding manifests
898 adding manifests
899 adding file changes
899 adding file changes
900 added 1 changesets with 1 changes to 1 files
900 added 1 changesets with 1 changes to 1 files
901 updating to branch default
901 updating to branch default
902 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
902 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
903
903
904 largefiles clients still work with vanilla servers
904 largefiles clients still work with vanilla servers
905 $ hg --config extensions.largefiles=! serve -R r1 -d -p $HGPORT1 --pid-file hg.pid
905 $ hg --config extensions.largefiles=! serve -R r1 -d -p $HGPORT1 --pid-file hg.pid
906 $ cat hg.pid >> $DAEMON_PIDS
906 $ cat hg.pid >> $DAEMON_PIDS
907 $ hg clone http://localhost:$HGPORT1 r3
907 $ hg clone http://localhost:$HGPORT1 r3
908 requesting all changes
908 requesting all changes
909 adding changesets
909 adding changesets
910 adding manifests
910 adding manifests
911 adding file changes
911 adding file changes
912 added 1 changesets with 1 changes to 1 files
912 added 1 changesets with 1 changes to 1 files
913 updating to branch default
913 updating to branch default
914 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
914 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
915
915
916 vanilla clients locked out from largefiles http repos
916 vanilla clients locked out from largefiles http repos
917 $ mkdir r4
917 $ mkdir r4
918 $ cd r4
918 $ cd r4
919 $ hg init
919 $ hg init
920 $ echo c1 > f1
920 $ echo c1 > f1
921 $ hg add --large f1
921 $ hg add --large f1
922 $ hg commit -m "m1"
922 $ hg commit -m "m1"
923 Invoking status precommit hook
923 Invoking status precommit hook
924 A f1
924 A f1
925 $ cd ..
925 $ cd ..
926 $ hg serve -R r4 -d -p $HGPORT2 --pid-file hg.pid
926 $ hg serve -R r4 -d -p $HGPORT2 --pid-file hg.pid
927 $ cat hg.pid >> $DAEMON_PIDS
927 $ cat hg.pid >> $DAEMON_PIDS
928 $ hg --config extensions.largefiles=! clone http://localhost:$HGPORT2 r5
928 $ hg --config extensions.largefiles=! clone http://localhost:$HGPORT2 r5
929 abort: remote error:
929 abort: remote error:
930
930
931 This repository uses the largefiles extension.
931 This repository uses the largefiles extension.
932
932
933 Please enable it in your Mercurial config file.
933 Please enable it in your Mercurial config file.
934 [255]
934 [255]
935
935
936 used all HGPORTs, kill all daemons
936 used all HGPORTs, kill all daemons
937 $ "$TESTDIR/killdaemons.py"
937 $ "$TESTDIR/killdaemons.py"
938
938
939 vanilla clients locked out from largefiles ssh repos
939 vanilla clients locked out from largefiles ssh repos
940 $ hg --config extensions.largefiles=! clone -e "python \"$TESTDIR/dummyssh\"" ssh://user@dummy/r4 r5
940 $ hg --config extensions.largefiles=! clone -e "python \"$TESTDIR/dummyssh\"" ssh://user@dummy/r4 r5
941 abort: remote error:
941 abort: remote error:
942
942
943 This repository uses the largefiles extension.
943 This repository uses the largefiles extension.
944
944
945 Please enable it in your Mercurial config file.
945 Please enable it in your Mercurial config file.
946 [255]
946 [255]
947
947
948 largefiles clients refuse to push largefiles repos to vanilla servers
948 largefiles clients refuse to push largefiles repos to vanilla servers
949 $ mkdir r6
949 $ mkdir r6
950 $ cd r6
950 $ cd r6
951 $ hg init
951 $ hg init
952 $ echo c1 > f1
952 $ echo c1 > f1
953 $ hg add f1
953 $ hg add f1
954 $ hg commit -m "m1"
954 $ hg commit -m "m1"
955 Invoking status precommit hook
955 Invoking status precommit hook
956 A f1
956 A f1
957 $ cat >> .hg/hgrc <<!
957 $ cat >> .hg/hgrc <<!
958 > [web]
958 > [web]
959 > push_ssl = false
959 > push_ssl = false
960 > allow_push = *
960 > allow_push = *
961 > !
961 > !
962 $ cd ..
962 $ cd ..
963 $ hg clone r6 r7
963 $ hg clone r6 r7
964 updating to branch default
964 updating to branch default
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 $ cd r7
966 $ cd r7
967 $ echo c2 > f2
967 $ echo c2 > f2
968 $ hg add --large f2
968 $ hg add --large f2
969 $ hg commit -m "m2"
969 $ hg commit -m "m2"
970 Invoking status precommit hook
970 Invoking status precommit hook
971 A f2
971 A f2
972 $ hg --config extensions.largefiles=! -R ../r6 serve -d -p $HGPORT --pid-file ../hg.pid
972 $ hg --config extensions.largefiles=! -R ../r6 serve -d -p $HGPORT --pid-file ../hg.pid
973 $ cat ../hg.pid >> $DAEMON_PIDS
973 $ cat ../hg.pid >> $DAEMON_PIDS
974 $ hg push http://localhost:$HGPORT
974 $ hg push http://localhost:$HGPORT
975 pushing to http://localhost:$HGPORT/
975 pushing to http://localhost:$HGPORT/
976 searching for changes
976 searching for changes
977 abort: http://localhost:$HGPORT/ does not appear to be a largefile store
977 abort: http://localhost:$HGPORT/ does not appear to be a largefile store
978 [255]
978 [255]
979 $ cd ..
979 $ cd ..
980
980
981 putlfile errors are shown (issue3123)
981 putlfile errors are shown (issue3123)
982 Corrupt the cached largefile in r7
982 Corrupt the cached largefile in r7
983 $ echo corruption > $USERCACHE/4cdac4d8b084d0b599525cf732437fb337d422a8
983 $ echo corruption > $USERCACHE/4cdac4d8b084d0b599525cf732437fb337d422a8
984 $ hg init empty
984 $ hg init empty
985 $ hg serve -R empty -d -p $HGPORT1 --pid-file hg.pid \
985 $ hg serve -R empty -d -p $HGPORT1 --pid-file hg.pid \
986 > --config 'web.allow_push=*' --config web.push_ssl=False
986 > --config 'web.allow_push=*' --config web.push_ssl=False
987 $ cat hg.pid >> $DAEMON_PIDS
987 $ cat hg.pid >> $DAEMON_PIDS
988 $ hg push -R r7 http://localhost:$HGPORT1
988 $ hg push -R r7 http://localhost:$HGPORT1
989 pushing to http://localhost:$HGPORT1/
989 pushing to http://localhost:$HGPORT1/
990 searching for changes
990 searching for changes
991 remote: largefiles: failed to put 4cdac4d8b084d0b599525cf732437fb337d422a8 into store: largefile contents do not match hash
991 remote: largefiles: failed to put 4cdac4d8b084d0b599525cf732437fb337d422a8 into store: largefile contents do not match hash
992 abort: remotestore: could not put $TESTTMP/r7/.hg/largefiles/4cdac4d8b084d0b599525cf732437fb337d422a8 to remote store http://localhost:$HGPORT1/
992 abort: remotestore: could not put $TESTTMP/r7/.hg/largefiles/4cdac4d8b084d0b599525cf732437fb337d422a8 to remote store http://localhost:$HGPORT1/
993 [255]
993 [255]
994 $ rm -rf empty
994 $ rm -rf empty
995
995
996 Push a largefiles repository to a served empty repository
996 Push a largefiles repository to a served empty repository
997 $ hg init r8
997 $ hg init r8
998 $ echo c3 > r8/f1
998 $ echo c3 > r8/f1
999 $ hg add --large r8/f1 -R r8
999 $ hg add --large r8/f1 -R r8
1000 $ hg commit -m "m1" -R r8
1000 $ hg commit -m "m1" -R r8
1001 Invoking status precommit hook
1001 Invoking status precommit hook
1002 A f1
1002 A f1
1003 $ hg init empty
1003 $ hg init empty
1004 $ hg serve -R empty -d -p $HGPORT2 --pid-file hg.pid \
1004 $ hg serve -R empty -d -p $HGPORT2 --pid-file hg.pid \
1005 > --config 'web.allow_push=*' --config web.push_ssl=False
1005 > --config 'web.allow_push=*' --config web.push_ssl=False
1006 $ cat hg.pid >> $DAEMON_PIDS
1006 $ cat hg.pid >> $DAEMON_PIDS
1007 $ rm ${USERCACHE}/*
1007 $ rm ${USERCACHE}/*
1008 $ hg push -R r8 http://localhost:$HGPORT2
1008 $ hg push -R r8 http://localhost:$HGPORT2
1009 pushing to http://localhost:$HGPORT2/
1009 pushing to http://localhost:$HGPORT2/
1010 searching for changes
1010 searching for changes
1011 searching for changes
1011 searching for changes
1012 remote: adding changesets
1012 remote: adding changesets
1013 remote: adding manifests
1013 remote: adding manifests
1014 remote: adding file changes
1014 remote: adding file changes
1015 remote: added 1 changesets with 1 changes to 1 files
1015 remote: added 1 changesets with 1 changes to 1 files
1016 $ rm -rf empty
1016 $ rm -rf empty
1017
1017
1018 used all HGPORTs, kill all daemons
1018 used all HGPORTs, kill all daemons
1019 $ "$TESTDIR/killdaemons.py"
1019 $ "$TESTDIR/killdaemons.py"
1020
1020
1021 Clone a local repository owned by another user
1021 Clone a local repository owned by another user
1022 We have to simulate that here by setting $HOME and removing write permissions
1022 We have to simulate that here by setting $HOME and removing write permissions
1023 $ ORIGHOME="$HOME"
1023 $ ORIGHOME="$HOME"
1024 $ mkdir alice
1024 $ mkdir alice
1025 $ HOME="`pwd`/alice"
1025 $ HOME="`pwd`/alice"
1026 $ cd alice
1026 $ cd alice
1027 $ hg init pubrepo
1027 $ hg init pubrepo
1028 $ cd pubrepo
1028 $ cd pubrepo
1029 $ dd if=/dev/zero bs=1k count=11k > a-large-file 2> /dev/null
1029 $ dd if=/dev/zero bs=1k count=11k > a-large-file 2> /dev/null
1030 $ hg add --large a-large-file
1030 $ hg add --large a-large-file
1031 $ hg commit -m "Add a large file"
1031 $ hg commit -m "Add a large file"
1032 Invoking status precommit hook
1032 Invoking status precommit hook
1033 A a-large-file
1033 A a-large-file
1034 $ cd ..
1034 $ cd ..
1035 $ chmod -R a-w pubrepo
1035 $ chmod -R a-w pubrepo
1036 $ cd ..
1036 $ cd ..
1037 $ mkdir bob
1037 $ mkdir bob
1038 $ HOME="`pwd`/bob"
1038 $ HOME="`pwd`/bob"
1039 $ cd bob
1039 $ cd bob
1040 $ hg clone --pull ../alice/pubrepo pubrepo
1040 $ hg clone --pull ../alice/pubrepo pubrepo
1041 requesting all changes
1041 requesting all changes
1042 adding changesets
1042 adding changesets
1043 adding manifests
1043 adding manifests
1044 adding file changes
1044 adding file changes
1045 added 1 changesets with 1 changes to 1 files
1045 added 1 changesets with 1 changes to 1 files
1046 updating to branch default
1046 updating to branch default
1047 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
1047 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
1048 getting changed largefiles
1048 getting changed largefiles
1049 1 largefiles updated, 0 removed
1049 1 largefiles updated, 0 removed
1050 $ cd ..
1050 $ cd ..
1051 $ chmod -R u+w alice/pubrepo
1051 $ chmod -R u+w alice/pubrepo
1052 $ HOME="$ORIGHOME"
1052 $ HOME="$ORIGHOME"
1053
1053
1054 #if symlink
1055
1054 Symlink to a large largefile should behave the same as a symlink to a normal file
1056 Symlink to a large largefile should behave the same as a symlink to a normal file
1055 $ hg init largesymlink
1057 $ hg init largesymlink
1056 $ cd largesymlink
1058 $ cd largesymlink
1057 $ dd if=/dev/zero bs=1k count=10k of=largefile 2>/dev/null
1059 $ dd if=/dev/zero bs=1k count=10k of=largefile 2>/dev/null
1058 $ hg add --large largefile
1060 $ hg add --large largefile
1059 $ hg commit -m "commit a large file"
1061 $ hg commit -m "commit a large file"
1060 Invoking status precommit hook
1062 Invoking status precommit hook
1061 A largefile
1063 A largefile
1062 $ ln -s largefile largelink
1064 $ ln -s largefile largelink
1063 $ hg add largelink
1065 $ hg add largelink
1064 $ hg commit -m "commit a large symlink"
1066 $ hg commit -m "commit a large symlink"
1065 Invoking status precommit hook
1067 Invoking status precommit hook
1066 A largelink
1068 A largelink
1067 $ rm -f largelink
1069 $ rm -f largelink
1068 $ hg up >/dev/null
1070 $ hg up >/dev/null
1069 $ test -f largelink
1071 $ test -f largelink
1070 [1]
1072 [1]
1071 $ test -L largelink
1073 $ test -L largelink
1072 [1]
1074 [1]
1073 $ rm -f largelink # make next part of the test independent of the previous
1075 $ rm -f largelink # make next part of the test independent of the previous
1074 $ hg up -C >/dev/null
1076 $ hg up -C >/dev/null
1075 $ test -f largelink
1077 $ test -f largelink
1076 $ test -L largelink
1078 $ test -L largelink
1077 $ cd ..
1079 $ cd ..
1078
1080
1081 #endif
1082
1079 test for pattern matching on 'hg status':
1083 test for pattern matching on 'hg status':
1080 to boost performance, largefiles checks whether specified patterns are
1084 to boost performance, largefiles checks whether specified patterns are
1081 related to largefiles in working directory (NOT to STANDIN) or not.
1085 related to largefiles in working directory (NOT to STANDIN) or not.
1082
1086
1083 $ hg init statusmatch
1087 $ hg init statusmatch
1084 $ cd statusmatch
1088 $ cd statusmatch
1085
1089
1086 $ mkdir -p a/b/c/d
1090 $ mkdir -p a/b/c/d
1087 $ echo normal > a/b/c/d/e.normal.txt
1091 $ echo normal > a/b/c/d/e.normal.txt
1088 $ hg add a/b/c/d/e.normal.txt
1092 $ hg add a/b/c/d/e.normal.txt
1089 $ echo large > a/b/c/d/e.large.txt
1093 $ echo large > a/b/c/d/e.large.txt
1090 $ hg add --large a/b/c/d/e.large.txt
1094 $ hg add --large a/b/c/d/e.large.txt
1091 $ mkdir -p a/b/c/x
1095 $ mkdir -p a/b/c/x
1092 $ echo normal > a/b/c/x/y.normal.txt
1096 $ echo normal > a/b/c/x/y.normal.txt
1093 $ hg add a/b/c/x/y.normal.txt
1097 $ hg add a/b/c/x/y.normal.txt
1094 $ hg commit -m 'add files'
1098 $ hg commit -m 'add files'
1095 Invoking status precommit hook
1099 Invoking status precommit hook
1096 A a/b/c/d/e.large.txt
1100 A a/b/c/d/e.large.txt
1097 A a/b/c/d/e.normal.txt
1101 A a/b/c/d/e.normal.txt
1098 A a/b/c/x/y.normal.txt
1102 A a/b/c/x/y.normal.txt
1099
1103
1100 (1) no pattern: no performance boost
1104 (1) no pattern: no performance boost
1101 $ hg status -A
1105 $ hg status -A
1102 C a/b/c/d/e.large.txt
1106 C a/b/c/d/e.large.txt
1103 C a/b/c/d/e.normal.txt
1107 C a/b/c/d/e.normal.txt
1104 C a/b/c/x/y.normal.txt
1108 C a/b/c/x/y.normal.txt
1105
1109
1106 (2) pattern not related to largefiles: performance boost
1110 (2) pattern not related to largefiles: performance boost
1107 $ hg status -A a/b/c/x
1111 $ hg status -A a/b/c/x
1108 C a/b/c/x/y.normal.txt
1112 C a/b/c/x/y.normal.txt
1109
1113
1110 (3) pattern related to largefiles: no performance boost
1114 (3) pattern related to largefiles: no performance boost
1111 $ hg status -A a/b/c/d
1115 $ hg status -A a/b/c/d
1112 C a/b/c/d/e.large.txt
1116 C a/b/c/d/e.large.txt
1113 C a/b/c/d/e.normal.txt
1117 C a/b/c/d/e.normal.txt
1114
1118
1115 (4) pattern related to STANDIN (not to largefiles): performance boost
1119 (4) pattern related to STANDIN (not to largefiles): performance boost
1116 $ hg status -A .hglf/a
1120 $ hg status -A .hglf/a
1117 C .hglf/a/b/c/d/e.large.txt
1121 C .hglf/a/b/c/d/e.large.txt
1118
1122
1119 (5) mixed case: no performance boost
1123 (5) mixed case: no performance boost
1120 $ hg status -A a/b/c/x a/b/c/d
1124 $ hg status -A a/b/c/x a/b/c/d
1121 C a/b/c/d/e.large.txt
1125 C a/b/c/d/e.large.txt
1122 C a/b/c/d/e.normal.txt
1126 C a/b/c/d/e.normal.txt
1123 C a/b/c/x/y.normal.txt
1127 C a/b/c/x/y.normal.txt
1124
1128
1125 verify that largefiles doesn't break filesets
1129 verify that largefiles doesn't break filesets
1126
1130
1127 $ hg log --rev . --exclude "set:binary()"
1131 $ hg log --rev . --exclude "set:binary()"
1128 changeset: 0:41bd42f10efa
1132 changeset: 0:41bd42f10efa
1129 tag: tip
1133 tag: tip
1130 user: test
1134 user: test
1131 date: Thu Jan 01 00:00:00 1970 +0000
1135 date: Thu Jan 01 00:00:00 1970 +0000
1132 summary: add files
1136 summary: add files
1133
1137
1134 verify that large files in subrepos handled properly
1138 verify that large files in subrepos handled properly
1135 $ hg init subrepo
1139 $ hg init subrepo
1136 $ echo "subrepo = subrepo" > .hgsub
1140 $ echo "subrepo = subrepo" > .hgsub
1137 $ hg add .hgsub
1141 $ hg add .hgsub
1138 $ hg ci -m "add subrepo"
1142 $ hg ci -m "add subrepo"
1139 Invoking status precommit hook
1143 Invoking status precommit hook
1140 A .hgsub
1144 A .hgsub
1141 ? .hgsubstate
1145 ? .hgsubstate
1142 $ echo "rev 1" > subrepo/large.txt
1146 $ echo "rev 1" > subrepo/large.txt
1143 $ hg -R subrepo add --large subrepo/large.txt
1147 $ hg -R subrepo add --large subrepo/large.txt
1144 $ hg sum
1148 $ hg sum
1145 parent: 1:8ee150ea2e9c tip
1149 parent: 1:8ee150ea2e9c tip
1146 add subrepo
1150 add subrepo
1147 branch: default
1151 branch: default
1148 commit: 1 subrepos
1152 commit: 1 subrepos
1149 update: (current)
1153 update: (current)
1150 $ hg st
1154 $ hg st
1151 $ hg st -S
1155 $ hg st -S
1152 A subrepo/large.txt
1156 A subrepo/large.txt
1153 $ hg ci -S -m "commit top repo"
1157 $ hg ci -S -m "commit top repo"
1154 committing subrepository subrepo
1158 committing subrepository subrepo
1155 Invoking status precommit hook
1159 Invoking status precommit hook
1156 A large.txt
1160 A large.txt
1157 Invoking status precommit hook
1161 Invoking status precommit hook
1158 M .hgsubstate
1162 M .hgsubstate
1159 # No differences
1163 # No differences
1160 $ hg st -S
1164 $ hg st -S
1161 $ hg sum
1165 $ hg sum
1162 parent: 2:ce4cd0c527a6 tip
1166 parent: 2:ce4cd0c527a6 tip
1163 commit top repo
1167 commit top repo
1164 branch: default
1168 branch: default
1165 commit: (clean)
1169 commit: (clean)
1166 update: (current)
1170 update: (current)
1167 $ echo "rev 2" > subrepo/large.txt
1171 $ echo "rev 2" > subrepo/large.txt
1168 $ hg st -S
1172 $ hg st -S
1169 M subrepo/large.txt
1173 M subrepo/large.txt
1170 $ hg sum
1174 $ hg sum
1171 parent: 2:ce4cd0c527a6 tip
1175 parent: 2:ce4cd0c527a6 tip
1172 commit top repo
1176 commit top repo
1173 branch: default
1177 branch: default
1174 commit: 1 subrepos
1178 commit: 1 subrepos
1175 update: (current)
1179 update: (current)
1176 $ hg ci -m "this commit should fail without -S"
1180 $ hg ci -m "this commit should fail without -S"
1177 abort: uncommitted changes in subrepo subrepo
1181 abort: uncommitted changes in subrepo subrepo
1178 (use --subrepos for recursive commit)
1182 (use --subrepos for recursive commit)
1179 [255]
1183 [255]
1180
1184
1181 Add a normal file to the subrepo, then test archiving
1185 Add a normal file to the subrepo, then test archiving
1182
1186
1183 $ echo 'normal file' > subrepo/normal.txt
1187 $ echo 'normal file' > subrepo/normal.txt
1184 $ hg -R subrepo add subrepo/normal.txt
1188 $ hg -R subrepo add subrepo/normal.txt
1185
1189
1186 Lock in subrepo, otherwise the change isn't archived
1190 Lock in subrepo, otherwise the change isn't archived
1187
1191
1188 $ hg ci -S -m "add normal file to top level"
1192 $ hg ci -S -m "add normal file to top level"
1189 committing subrepository subrepo
1193 committing subrepository subrepo
1190 Invoking status precommit hook
1194 Invoking status precommit hook
1191 M large.txt
1195 M large.txt
1192 A normal.txt
1196 A normal.txt
1193 Invoking status precommit hook
1197 Invoking status precommit hook
1194 M .hgsubstate
1198 M .hgsubstate
1195 $ hg archive -S lf_subrepo_archive
1199 $ hg archive -S lf_subrepo_archive
1196 $ find lf_subrepo_archive | sort
1200 $ find lf_subrepo_archive | sort
1197 lf_subrepo_archive
1201 lf_subrepo_archive
1198 lf_subrepo_archive/.hg_archival.txt
1202 lf_subrepo_archive/.hg_archival.txt
1199 lf_subrepo_archive/.hgsub
1203 lf_subrepo_archive/.hgsub
1200 lf_subrepo_archive/.hgsubstate
1204 lf_subrepo_archive/.hgsubstate
1201 lf_subrepo_archive/a
1205 lf_subrepo_archive/a
1202 lf_subrepo_archive/a/b
1206 lf_subrepo_archive/a/b
1203 lf_subrepo_archive/a/b/c
1207 lf_subrepo_archive/a/b/c
1204 lf_subrepo_archive/a/b/c/d
1208 lf_subrepo_archive/a/b/c/d
1205 lf_subrepo_archive/a/b/c/d/e.large.txt
1209 lf_subrepo_archive/a/b/c/d/e.large.txt
1206 lf_subrepo_archive/a/b/c/d/e.normal.txt
1210 lf_subrepo_archive/a/b/c/d/e.normal.txt
1207 lf_subrepo_archive/a/b/c/x
1211 lf_subrepo_archive/a/b/c/x
1208 lf_subrepo_archive/a/b/c/x/y.normal.txt
1212 lf_subrepo_archive/a/b/c/x/y.normal.txt
1209 lf_subrepo_archive/subrepo
1213 lf_subrepo_archive/subrepo
1210 lf_subrepo_archive/subrepo/large.txt
1214 lf_subrepo_archive/subrepo/large.txt
1211 lf_subrepo_archive/subrepo/normal.txt
1215 lf_subrepo_archive/subrepo/normal.txt
1212
1216
1213 $ cd ..
1217 $ cd ..
@@ -1,262 +1,270 b''
1 $ "$TESTDIR/hghave" symlink || exit 80
2
3 $ cat >> $HGRCPATH <<EOF
1 $ cat >> $HGRCPATH <<EOF
4 > [extensions]
2 > [extensions]
5 > largefiles =
3 > largefiles =
6 > share =
4 > share =
7 > graphlog =
5 > graphlog =
8 > mq =
6 > mq =
9 > [largefiles]
7 > [largefiles]
10 > minsize = 0.5
8 > minsize = 0.5
11 > patterns = **.other
9 > patterns = **.other
12 > **.dat
10 > **.dat
13 > EOF
11 > EOF
14
12
15 "lfconvert" works
13 "lfconvert" works
16 $ hg init bigfile-repo
14 $ hg init bigfile-repo
17 $ cd bigfile-repo
15 $ cd bigfile-repo
18 $ cat >> .hg/hgrc <<EOF
16 $ cat >> .hg/hgrc <<EOF
19 > [extensions]
17 > [extensions]
20 > largefiles = !
18 > largefiles = !
21 > EOF
19 > EOF
22 $ mkdir sub
20 $ mkdir sub
23 $ dd if=/dev/zero bs=1k count=256 > large 2> /dev/null
21 $ dd if=/dev/zero bs=1k count=256 > large 2> /dev/null
24 $ dd if=/dev/zero bs=1k count=256 > large2 2> /dev/null
22 $ dd if=/dev/zero bs=1k count=256 > large2 2> /dev/null
25 $ echo normal > normal1
23 $ echo normal > normal1
26 $ echo alsonormal > sub/normal2
24 $ echo alsonormal > sub/normal2
27 $ dd if=/dev/zero bs=1k count=10 > sub/maybelarge.dat 2> /dev/null
25 $ dd if=/dev/zero bs=1k count=10 > sub/maybelarge.dat 2> /dev/null
28 $ hg addremove
26 $ hg addremove
29 adding large
27 adding large
30 adding large2
28 adding large2
31 adding normal1
29 adding normal1
32 adding sub/maybelarge.dat
30 adding sub/maybelarge.dat
33 adding sub/normal2
31 adding sub/normal2
34 $ hg commit -m"add large, normal1" large normal1
32 $ hg commit -m"add large, normal1" large normal1
35 $ hg commit -m"add sub/*" sub
33 $ hg commit -m"add sub/*" sub
34
36 Test tag parsing
35 Test tag parsing
37 $ cat >> .hgtags <<EOF
36 $ cat >> .hgtags <<EOF
38 > IncorrectlyFormattedTag!
37 > IncorrectlyFormattedTag!
39 > invalidhash sometag
38 > invalidhash sometag
40 > 0123456789abcdef anothertag
39 > 0123456789abcdef anothertag
41 > EOF
40 > EOF
42 $ hg add .hgtags
41 $ hg add .hgtags
43 $ hg commit -m"add large2" large2 .hgtags
42 $ hg commit -m"add large2" large2 .hgtags
44 $ hg rename large2 large3
43
45 Test link+rename largefile codepath
44 Test link+rename largefile codepath
46 $ ln -sf large large3
47 $ hg commit -m"make large2 a symlink" large2 large3
48 $ [ -d .hg/largefiles ] && echo fail || echo pass
45 $ [ -d .hg/largefiles ] && echo fail || echo pass
49 pass
46 pass
50 $ cd ..
47 $ cd ..
51 $ hg lfconvert --size 0.2 bigfile-repo largefiles-repo
48 $ hg lfconvert --size 0.2 bigfile-repo largefiles-repo
52 initializing destination largefiles-repo
49 initializing destination largefiles-repo
53 skipping incorrectly formatted tag IncorrectlyFormattedTag!
50 skipping incorrectly formatted tag IncorrectlyFormattedTag!
54 skipping incorrectly formatted id invalidhash
51 skipping incorrectly formatted id invalidhash
55 no mapping for id 0123456789abcdef
52 no mapping for id 0123456789abcdef
53 #if symlink
54 $ hg --cwd bigfile-repo rename large2 large3
55 $ ln -sf large bigfile-repo/large3
56 $ hg --cwd bigfile-repo commit -m"make large2 a symlink" large2 large3
57 $ hg lfconvert --size 0.2 bigfile-repo largefiles-repo-symlink
58 initializing destination largefiles-repo-symlink
59 skipping incorrectly formatted tag IncorrectlyFormattedTag!
60 skipping incorrectly formatted id invalidhash
61 no mapping for id 0123456789abcdef
56 abort: renamed/copied largefile large3 becomes symlink
62 abort: renamed/copied largefile large3 becomes symlink
57 [255]
63 [255]
64 #endif
58 $ cd bigfile-repo
65 $ cd bigfile-repo
59 $ hg strip --no-backup 2
66 $ hg strip --no-backup 2
60 0 files updated, 0 files merged, 2 files removed, 0 files unresolved
67 0 files updated, 0 files merged, 2 files removed, 0 files unresolved
61 $ cd ..
68 $ cd ..
62 $ rm -rf largefiles-repo
69 $ rm -rf largefiles-repo largefiles-repo-symlink
70
63 $ hg lfconvert --size 0.2 bigfile-repo largefiles-repo
71 $ hg lfconvert --size 0.2 bigfile-repo largefiles-repo
64 initializing destination largefiles-repo
72 initializing destination largefiles-repo
65
73
66 "lfconvert" converts content correctly
74 "lfconvert" converts content correctly
67 $ cd largefiles-repo
75 $ cd largefiles-repo
68 $ hg up
76 $ hg up
69 4 files updated, 0 files merged, 0 files removed, 0 files unresolved
77 4 files updated, 0 files merged, 0 files removed, 0 files unresolved
70 getting changed largefiles
78 getting changed largefiles
71 2 largefiles updated, 0 removed
79 2 largefiles updated, 0 removed
72 $ hg locate
80 $ hg locate
73 .hglf/large
81 .hglf/large
74 .hglf/sub/maybelarge.dat
82 .hglf/sub/maybelarge.dat
75 normal1
83 normal1
76 sub/normal2
84 sub/normal2
77 $ cat normal1
85 $ cat normal1
78 normal
86 normal
79 $ cat sub/normal2
87 $ cat sub/normal2
80 alsonormal
88 alsonormal
81 $ "$TESTDIR/md5sum.py" large sub/maybelarge.dat
89 $ "$TESTDIR/md5sum.py" large sub/maybelarge.dat
82 ec87a838931d4d5d2e94a04644788a55 large
90 ec87a838931d4d5d2e94a04644788a55 large
83 1276481102f218c981e0324180bafd9f sub/maybelarge.dat
91 1276481102f218c981e0324180bafd9f sub/maybelarge.dat
84
92
85 "lfconvert" adds 'largefiles' to .hg/requires.
93 "lfconvert" adds 'largefiles' to .hg/requires.
86 $ cat .hg/requires
94 $ cat .hg/requires
87 largefiles
95 largefiles
88 revlogv1
96 revlogv1
89 fncache
97 fncache
90 store
98 store
91 dotencode
99 dotencode
92
100
93 "lfconvert" includes a newline at the end of the standin files.
101 "lfconvert" includes a newline at the end of the standin files.
94 $ cat .hglf/large .hglf/sub/maybelarge.dat
102 $ cat .hglf/large .hglf/sub/maybelarge.dat
95 2e000fa7e85759c7f4c254d4d9c33ef481e459a7
103 2e000fa7e85759c7f4c254d4d9c33ef481e459a7
96 34e163be8e43c5631d8b92e9c43ab0bf0fa62b9c
104 34e163be8e43c5631d8b92e9c43ab0bf0fa62b9c
97 $ cd ..
105 $ cd ..
98
106
99 add some changesets to rename/remove/merge
107 add some changesets to rename/remove/merge
100 $ cd bigfile-repo
108 $ cd bigfile-repo
101 $ hg mv -q sub stuff
109 $ hg mv -q sub stuff
102 $ hg commit -m"rename sub/ to stuff/"
110 $ hg commit -m"rename sub/ to stuff/"
103 $ hg update -q 1
111 $ hg update -q 1
104 $ echo blah >> normal3
112 $ echo blah >> normal3
105 $ echo blah >> sub/normal2
113 $ echo blah >> sub/normal2
106 $ echo blah >> sub/maybelarge.dat
114 $ echo blah >> sub/maybelarge.dat
107 $ "$TESTDIR/md5sum.py" sub/maybelarge.dat
115 $ "$TESTDIR/md5sum.py" sub/maybelarge.dat
108 1dd0b99ff80e19cff409702a1d3f5e15 sub/maybelarge.dat
116 1dd0b99ff80e19cff409702a1d3f5e15 sub/maybelarge.dat
109 $ hg commit -A -m"add normal3, modify sub/*"
117 $ hg commit -A -m"add normal3, modify sub/*"
110 adding normal3
118 adding normal3
111 created new head
119 created new head
112 $ hg rm large normal3
120 $ hg rm large normal3
113 $ hg commit -q -m"remove large, normal3"
121 $ hg commit -q -m"remove large, normal3"
114 $ hg merge
122 $ hg merge
115 merging sub/maybelarge.dat and stuff/maybelarge.dat to stuff/maybelarge.dat
123 merging sub/maybelarge.dat and stuff/maybelarge.dat to stuff/maybelarge.dat
116 warning: $TESTTMP/bigfile-repo/stuff/maybelarge.dat looks like a binary file. (glob)
124 warning: $TESTTMP/bigfile-repo/stuff/maybelarge.dat looks like a binary file. (glob)
117 merging stuff/maybelarge.dat incomplete! (edit conflicts, then use 'hg resolve --mark')
125 merging stuff/maybelarge.dat incomplete! (edit conflicts, then use 'hg resolve --mark')
118 merging sub/normal2 and stuff/normal2 to stuff/normal2
126 merging sub/normal2 and stuff/normal2 to stuff/normal2
119 0 files updated, 1 files merged, 0 files removed, 1 files unresolved
127 0 files updated, 1 files merged, 0 files removed, 1 files unresolved
120 use 'hg resolve' to retry unresolved file merges or 'hg update -C .' to abandon
128 use 'hg resolve' to retry unresolved file merges or 'hg update -C .' to abandon
121 [1]
129 [1]
122 $ hg cat -r . sub/maybelarge.dat > stuff/maybelarge.dat
130 $ hg cat -r . sub/maybelarge.dat > stuff/maybelarge.dat
123 $ hg resolve -m stuff/maybelarge.dat
131 $ hg resolve -m stuff/maybelarge.dat
124 $ hg commit -m"merge"
132 $ hg commit -m"merge"
125 $ hg glog --template "{rev}:{node|short} {desc|firstline}\n"
133 $ hg glog --template "{rev}:{node|short} {desc|firstline}\n"
126 @ 5:4884f215abda merge
134 @ 5:4884f215abda merge
127 |\
135 |\
128 | o 4:7285f817b77e remove large, normal3
136 | o 4:7285f817b77e remove large, normal3
129 | |
137 | |
130 | o 3:67e3892e3534 add normal3, modify sub/*
138 | o 3:67e3892e3534 add normal3, modify sub/*
131 | |
139 | |
132 o | 2:c96c8beb5d56 rename sub/ to stuff/
140 o | 2:c96c8beb5d56 rename sub/ to stuff/
133 |/
141 |/
134 o 1:020c65d24e11 add sub/*
142 o 1:020c65d24e11 add sub/*
135 |
143 |
136 o 0:117b8328f97a add large, normal1
144 o 0:117b8328f97a add large, normal1
137
145
138 $ cd ..
146 $ cd ..
139
147
140 lfconvert with rename, merge, and remove
148 lfconvert with rename, merge, and remove
141 $ rm -rf largefiles-repo
149 $ rm -rf largefiles-repo
142 $ hg lfconvert --size 0.2 bigfile-repo largefiles-repo
150 $ hg lfconvert --size 0.2 bigfile-repo largefiles-repo
143 initializing destination largefiles-repo
151 initializing destination largefiles-repo
144 $ cd largefiles-repo
152 $ cd largefiles-repo
145 $ hg glog --template "{rev}:{node|short} {desc|firstline}\n"
153 $ hg glog --template "{rev}:{node|short} {desc|firstline}\n"
146 o 5:8e05f5f2b77e merge
154 o 5:8e05f5f2b77e merge
147 |\
155 |\
148 | o 4:a5a02de7a8e4 remove large, normal3
156 | o 4:a5a02de7a8e4 remove large, normal3
149 | |
157 | |
150 | o 3:55759520c76f add normal3, modify sub/*
158 | o 3:55759520c76f add normal3, modify sub/*
151 | |
159 | |
152 o | 2:261ad3f3f037 rename sub/ to stuff/
160 o | 2:261ad3f3f037 rename sub/ to stuff/
153 |/
161 |/
154 o 1:334e5237836d add sub/*
162 o 1:334e5237836d add sub/*
155 |
163 |
156 o 0:d4892ec57ce2 add large, normal1
164 o 0:d4892ec57ce2 add large, normal1
157
165
158 $ hg locate -r 2
166 $ hg locate -r 2
159 .hglf/large
167 .hglf/large
160 .hglf/stuff/maybelarge.dat
168 .hglf/stuff/maybelarge.dat
161 normal1
169 normal1
162 stuff/normal2
170 stuff/normal2
163 $ hg locate -r 3
171 $ hg locate -r 3
164 .hglf/large
172 .hglf/large
165 .hglf/sub/maybelarge.dat
173 .hglf/sub/maybelarge.dat
166 normal1
174 normal1
167 normal3
175 normal3
168 sub/normal2
176 sub/normal2
169 $ hg locate -r 4
177 $ hg locate -r 4
170 .hglf/sub/maybelarge.dat
178 .hglf/sub/maybelarge.dat
171 normal1
179 normal1
172 sub/normal2
180 sub/normal2
173 $ hg locate -r 5
181 $ hg locate -r 5
174 .hglf/stuff/maybelarge.dat
182 .hglf/stuff/maybelarge.dat
175 normal1
183 normal1
176 stuff/normal2
184 stuff/normal2
177 $ hg update
185 $ hg update
178 3 files updated, 0 files merged, 0 files removed, 0 files unresolved
186 3 files updated, 0 files merged, 0 files removed, 0 files unresolved
179 getting changed largefiles
187 getting changed largefiles
180 1 largefiles updated, 0 removed
188 1 largefiles updated, 0 removed
181 $ cat stuff/normal2
189 $ cat stuff/normal2
182 alsonormal
190 alsonormal
183 blah
191 blah
184 $ "$TESTDIR/md5sum.py" stuff/maybelarge.dat
192 $ "$TESTDIR/md5sum.py" stuff/maybelarge.dat
185 1dd0b99ff80e19cff409702a1d3f5e15 stuff/maybelarge.dat
193 1dd0b99ff80e19cff409702a1d3f5e15 stuff/maybelarge.dat
186 $ cat .hglf/stuff/maybelarge.dat
194 $ cat .hglf/stuff/maybelarge.dat
187 76236b6a2c6102826c61af4297dd738fb3b1de38
195 76236b6a2c6102826c61af4297dd738fb3b1de38
188 $ cd ..
196 $ cd ..
189
197
190 "lfconvert" error cases
198 "lfconvert" error cases
191 $ hg lfconvert http://localhost/foo foo
199 $ hg lfconvert http://localhost/foo foo
192 abort: http://localhost/foo is not a local Mercurial repo
200 abort: http://localhost/foo is not a local Mercurial repo
193 [255]
201 [255]
194 $ hg lfconvert foo ssh://localhost/foo
202 $ hg lfconvert foo ssh://localhost/foo
195 abort: ssh://localhost/foo is not a local Mercurial repo
203 abort: ssh://localhost/foo is not a local Mercurial repo
196 [255]
204 [255]
197 $ hg lfconvert nosuchrepo foo
205 $ hg lfconvert nosuchrepo foo
198 abort: repository nosuchrepo not found!
206 abort: repository nosuchrepo not found!
199 [255]
207 [255]
200 $ hg share -q -U bigfile-repo shared
208 $ hg share -q -U bigfile-repo shared
201 $ printf 'bogus' > shared/.hg/sharedpath
209 $ printf 'bogus' > shared/.hg/sharedpath
202 $ hg lfconvert shared foo
210 $ hg lfconvert shared foo
203 abort: .hg/sharedpath points to nonexistent directory $TESTTMP/bogus! (glob)
211 abort: .hg/sharedpath points to nonexistent directory $TESTTMP/bogus! (glob)
204 [255]
212 [255]
205 $ hg lfconvert bigfile-repo largefiles-repo
213 $ hg lfconvert bigfile-repo largefiles-repo
206 initializing destination largefiles-repo
214 initializing destination largefiles-repo
207 abort: repository largefiles-repo already exists!
215 abort: repository largefiles-repo already exists!
208 [255]
216 [255]
209
217
210 add another largefile to the new largefiles repo
218 add another largefile to the new largefiles repo
211 $ cd largefiles-repo
219 $ cd largefiles-repo
212 $ dd if=/dev/zero bs=1k count=1k > anotherlarge 2> /dev/null
220 $ dd if=/dev/zero bs=1k count=1k > anotherlarge 2> /dev/null
213 $ hg add --lfsize=1 anotherlarge
221 $ hg add --lfsize=1 anotherlarge
214 $ hg commit -m "add anotherlarge (should be a largefile)"
222 $ hg commit -m "add anotherlarge (should be a largefile)"
215 $ cat .hglf/anotherlarge
223 $ cat .hglf/anotherlarge
216 3b71f43ff30f4b15b5cd85dd9e95ebc7e84eb5a3
224 3b71f43ff30f4b15b5cd85dd9e95ebc7e84eb5a3
217 $ cd ..
225 $ cd ..
218
226
219 round-trip: converting back to a normal (non-largefiles) repo with
227 round-trip: converting back to a normal (non-largefiles) repo with
220 "lfconvert --to-normal" should give the same as ../bigfile-repo
228 "lfconvert --to-normal" should give the same as ../bigfile-repo
221 $ cd largefiles-repo
229 $ cd largefiles-repo
222 $ hg lfconvert --to-normal . ../normal-repo
230 $ hg lfconvert --to-normal . ../normal-repo
223 initializing destination ../normal-repo
231 initializing destination ../normal-repo
224 $ cd ../normal-repo
232 $ cd ../normal-repo
225 $ cat >> .hg/hgrc <<EOF
233 $ cat >> .hg/hgrc <<EOF
226 > [extensions]
234 > [extensions]
227 > largefiles = !
235 > largefiles = !
228 > EOF
236 > EOF
229
237
230 # Hmmm: the changeset ID for rev 5 is different from the original
238 # Hmmm: the changeset ID for rev 5 is different from the original
231 # normal repo (../bigfile-repo), because the changelog filelist
239 # normal repo (../bigfile-repo), because the changelog filelist
232 # differs between the two incarnations of rev 5: this repo includes
240 # differs between the two incarnations of rev 5: this repo includes
233 # 'large' in the list, but ../bigfile-repo does not. Since rev 5
241 # 'large' in the list, but ../bigfile-repo does not. Since rev 5
234 # removes 'large' relative to the first parent in both repos, it seems
242 # removes 'large' relative to the first parent in both repos, it seems
235 # to me that lfconvert is doing a *better* job than
243 # to me that lfconvert is doing a *better* job than
236 # "hg remove" + "hg merge" + "hg commit".
244 # "hg remove" + "hg merge" + "hg commit".
237 # $ hg -R ../bigfile-repo debugdata -c 5
245 # $ hg -R ../bigfile-repo debugdata -c 5
238 # $ hg debugdata -c 5
246 # $ hg debugdata -c 5
239 $ hg glog --template "{rev}:{node|short} {desc|firstline}\n"
247 $ hg glog --template "{rev}:{node|short} {desc|firstline}\n"
240 o 6:1635824e6f59 add anotherlarge (should be a largefile)
248 o 6:1635824e6f59 add anotherlarge (should be a largefile)
241 |
249 |
242 o 5:7215f8deeaaf merge
250 o 5:7215f8deeaaf merge
243 |\
251 |\
244 | o 4:7285f817b77e remove large, normal3
252 | o 4:7285f817b77e remove large, normal3
245 | |
253 | |
246 | o 3:67e3892e3534 add normal3, modify sub/*
254 | o 3:67e3892e3534 add normal3, modify sub/*
247 | |
255 | |
248 o | 2:c96c8beb5d56 rename sub/ to stuff/
256 o | 2:c96c8beb5d56 rename sub/ to stuff/
249 |/
257 |/
250 o 1:020c65d24e11 add sub/*
258 o 1:020c65d24e11 add sub/*
251 |
259 |
252 o 0:117b8328f97a add large, normal1
260 o 0:117b8328f97a add large, normal1
253
261
254 $ hg update
262 $ hg update
255 4 files updated, 0 files merged, 0 files removed, 0 files unresolved
263 4 files updated, 0 files merged, 0 files removed, 0 files unresolved
256 $ hg locate
264 $ hg locate
257 anotherlarge
265 anotherlarge
258 normal1
266 normal1
259 stuff/maybelarge.dat
267 stuff/maybelarge.dat
260 stuff/normal2
268 stuff/normal2
261 $ [ -d .hg/largefiles ] && echo fail || echo pass
269 $ [ -d .hg/largefiles ] && echo fail || echo pass
262 pass
270 pass
General Comments 0
You need to be logged in to leave comments. Login now