Show More
@@ -1,897 +1,815 | |||||
1 | $ "$TESTDIR/hghave" symlink unix-permissions serve || exit 80 |
|
1 | $ "$TESTDIR/hghave" symlink unix-permissions serve || exit 80 | |
2 |
|
2 | |||
3 | $ USERCACHE=`pwd`/cache; export USERCACHE |
|
3 | $ USERCACHE=`pwd`/cache; export USERCACHE | |
4 | $ mkdir -p ${USERCACHE} |
|
4 | $ mkdir -p ${USERCACHE} | |
5 | $ cat >> $HGRCPATH <<EOF |
|
5 | $ cat >> $HGRCPATH <<EOF | |
6 | > [extensions] |
|
6 | > [extensions] | |
7 | > largefiles= |
|
7 | > largefiles= | |
8 | > purge= |
|
8 | > purge= | |
9 | > rebase= |
|
9 | > rebase= | |
10 | > transplant= |
|
10 | > transplant= | |
11 | > [phases] |
|
11 | > [phases] | |
12 | > publish=False |
|
12 | > publish=False | |
13 | > [largefiles] |
|
13 | > [largefiles] | |
14 | > minsize=2 |
|
14 | > minsize=2 | |
15 | > patterns=glob:**.dat |
|
15 | > patterns=glob:**.dat | |
16 | > usercache=${USERCACHE} |
|
16 | > usercache=${USERCACHE} | |
17 | > EOF |
|
17 | > EOF | |
18 |
|
18 | |||
19 | Create the repo with a couple of revisions of both large and normal |
|
19 | Create the repo with a couple of revisions of both large and normal | |
20 | files, testing that status correctly shows largefiles. |
|
20 | files, testing that status correctly shows largefiles. | |
21 |
|
21 | |||
22 | $ hg init a |
|
22 | $ hg init a | |
23 | $ cd a |
|
23 | $ cd a | |
24 | $ mkdir sub |
|
24 | $ mkdir sub | |
25 | $ echo normal1 > normal1 |
|
25 | $ echo normal1 > normal1 | |
26 | $ echo normal2 > sub/normal2 |
|
26 | $ echo normal2 > sub/normal2 | |
27 | $ echo large1 > large1 |
|
27 | $ echo large1 > large1 | |
28 | $ echo large2 > sub/large2 |
|
28 | $ echo large2 > sub/large2 | |
29 | $ hg add normal1 sub/normal2 |
|
29 | $ hg add normal1 sub/normal2 | |
30 | $ hg add --large large1 sub/large2 |
|
30 | $ hg add --large large1 sub/large2 | |
31 | $ hg commit -m "add files" |
|
31 | $ hg commit -m "add files" | |
32 | $ echo normal11 > normal1 |
|
32 | $ echo normal11 > normal1 | |
33 | $ echo normal22 > sub/normal2 |
|
33 | $ echo normal22 > sub/normal2 | |
34 | $ echo large11 > large1 |
|
34 | $ echo large11 > large1 | |
35 | $ echo large22 > sub/large2 |
|
35 | $ echo large22 > sub/large2 | |
36 | $ hg st |
|
36 | $ hg st | |
37 | M large1 |
|
37 | M large1 | |
38 | M normal1 |
|
38 | M normal1 | |
39 | M sub/large2 |
|
39 | M sub/large2 | |
40 | M sub/normal2 |
|
40 | M sub/normal2 | |
41 | $ hg commit -m "edit files" |
|
41 | $ hg commit -m "edit files" | |
42 |
|
42 | |||
43 | Commit preserved largefile contents. |
|
43 | Commit preserved largefile contents. | |
44 |
|
44 | |||
45 | $ cat normal1 |
|
45 | $ cat normal1 | |
46 | normal11 |
|
46 | normal11 | |
47 | $ cat large1 |
|
47 | $ cat large1 | |
48 | large11 |
|
48 | large11 | |
49 | $ cat sub/normal2 |
|
49 | $ cat sub/normal2 | |
50 | normal22 |
|
50 | normal22 | |
51 | $ cat sub/large2 |
|
51 | $ cat sub/large2 | |
52 | large22 |
|
52 | large22 | |
53 |
|
53 | |||
54 | Remove both largefiles and normal files. |
|
54 | Remove both largefiles and normal files. | |
55 |
|
55 | |||
56 | $ hg remove normal1 large1 |
|
56 | $ hg remove normal1 large1 | |
57 | $ hg commit -m "remove files" |
|
57 | $ hg commit -m "remove files" | |
58 | $ ls |
|
58 | $ ls | |
59 | sub |
|
59 | sub | |
60 |
|
60 | |||
61 | Copy both largefiles and normal files (testing that status output is correct). |
|
61 | Copy both largefiles and normal files (testing that status output is correct). | |
62 |
|
62 | |||
63 | $ hg cp sub/normal2 normal1 |
|
63 | $ hg cp sub/normal2 normal1 | |
64 | $ hg cp sub/large2 large1 |
|
64 | $ hg cp sub/large2 large1 | |
65 | $ hg st |
|
65 | $ hg st | |
66 | A large1 |
|
66 | A large1 | |
67 | A normal1 |
|
67 | A normal1 | |
68 | $ hg commit -m "copy files" |
|
68 | $ hg commit -m "copy files" | |
69 | $ cat normal1 |
|
69 | $ cat normal1 | |
70 | normal22 |
|
70 | normal22 | |
71 | $ cat large1 |
|
71 | $ cat large1 | |
72 | large22 |
|
72 | large22 | |
73 |
|
73 | |||
74 | Test moving largefiles and verify that normal files are also unaffected. |
|
74 | Test moving largefiles and verify that normal files are also unaffected. | |
75 |
|
75 | |||
76 | $ hg mv normal1 normal3 |
|
76 | $ hg mv normal1 normal3 | |
77 | $ hg mv large1 large3 |
|
77 | $ hg mv large1 large3 | |
78 | $ hg mv sub/normal2 sub/normal4 |
|
78 | $ hg mv sub/normal2 sub/normal4 | |
79 | $ hg mv sub/large2 sub/large4 |
|
79 | $ hg mv sub/large2 sub/large4 | |
80 | $ hg commit -m "move files" |
|
80 | $ hg commit -m "move files" | |
81 | $ cat normal3 |
|
81 | $ cat normal3 | |
82 | normal22 |
|
82 | normal22 | |
83 | $ cat large3 |
|
83 | $ cat large3 | |
84 | large22 |
|
84 | large22 | |
85 | $ cat sub/normal4 |
|
85 | $ cat sub/normal4 | |
86 | normal22 |
|
86 | normal22 | |
87 | $ cat sub/large4 |
|
87 | $ cat sub/large4 | |
88 | large22 |
|
88 | large22 | |
89 |
|
89 | |||
90 | Test archiving the various revisions. These hit corner cases known with |
|
90 | Test archiving the various revisions. These hit corner cases known with | |
91 | archiving. |
|
91 | archiving. | |
92 |
|
92 | |||
93 | $ hg archive -r 0 ../archive0 |
|
93 | $ hg archive -r 0 ../archive0 | |
94 | $ hg archive -r 1 ../archive1 |
|
94 | $ hg archive -r 1 ../archive1 | |
95 | $ hg archive -r 2 ../archive2 |
|
95 | $ hg archive -r 2 ../archive2 | |
96 | $ hg archive -r 3 ../archive3 |
|
96 | $ hg archive -r 3 ../archive3 | |
97 | $ hg archive -r 4 ../archive4 |
|
97 | $ hg archive -r 4 ../archive4 | |
98 | $ cd ../archive0 |
|
98 | $ cd ../archive0 | |
99 | $ cat normal1 |
|
99 | $ cat normal1 | |
100 | normal1 |
|
100 | normal1 | |
101 | $ cat large1 |
|
101 | $ cat large1 | |
102 | large1 |
|
102 | large1 | |
103 | $ cat sub/normal2 |
|
103 | $ cat sub/normal2 | |
104 | normal2 |
|
104 | normal2 | |
105 | $ cat sub/large2 |
|
105 | $ cat sub/large2 | |
106 | large2 |
|
106 | large2 | |
107 | $ cd ../archive1 |
|
107 | $ cd ../archive1 | |
108 | $ cat normal1 |
|
108 | $ cat normal1 | |
109 | normal11 |
|
109 | normal11 | |
110 | $ cat large1 |
|
110 | $ cat large1 | |
111 | large11 |
|
111 | large11 | |
112 | $ cat sub/normal2 |
|
112 | $ cat sub/normal2 | |
113 | normal22 |
|
113 | normal22 | |
114 | $ cat sub/large2 |
|
114 | $ cat sub/large2 | |
115 | large22 |
|
115 | large22 | |
116 | $ cd ../archive2 |
|
116 | $ cd ../archive2 | |
117 | $ ls |
|
117 | $ ls | |
118 | sub |
|
118 | sub | |
119 | $ cat sub/normal2 |
|
119 | $ cat sub/normal2 | |
120 | normal22 |
|
120 | normal22 | |
121 | $ cat sub/large2 |
|
121 | $ cat sub/large2 | |
122 | large22 |
|
122 | large22 | |
123 | $ cd ../archive3 |
|
123 | $ cd ../archive3 | |
124 | $ cat normal1 |
|
124 | $ cat normal1 | |
125 | normal22 |
|
125 | normal22 | |
126 | $ cat large1 |
|
126 | $ cat large1 | |
127 | large22 |
|
127 | large22 | |
128 | $ cat sub/normal2 |
|
128 | $ cat sub/normal2 | |
129 | normal22 |
|
129 | normal22 | |
130 | $ cat sub/large2 |
|
130 | $ cat sub/large2 | |
131 | large22 |
|
131 | large22 | |
132 | $ cd ../archive4 |
|
132 | $ cd ../archive4 | |
133 | $ cat normal3 |
|
133 | $ cat normal3 | |
134 | normal22 |
|
134 | normal22 | |
135 | $ cat large3 |
|
135 | $ cat large3 | |
136 | large22 |
|
136 | large22 | |
137 | $ cat sub/normal4 |
|
137 | $ cat sub/normal4 | |
138 | normal22 |
|
138 | normal22 | |
139 | $ cat sub/large4 |
|
139 | $ cat sub/large4 | |
140 | large22 |
|
140 | large22 | |
141 |
|
141 | |||
142 | Commit corner case: specify files to commit. |
|
142 | Commit corner case: specify files to commit. | |
143 |
|
143 | |||
144 | $ cd ../a |
|
144 | $ cd ../a | |
145 | $ echo normal3 > normal3 |
|
145 | $ echo normal3 > normal3 | |
146 | $ echo large3 > large3 |
|
146 | $ echo large3 > large3 | |
147 | $ echo normal4 > sub/normal4 |
|
147 | $ echo normal4 > sub/normal4 | |
148 | $ echo large4 > sub/large4 |
|
148 | $ echo large4 > sub/large4 | |
149 | $ hg commit normal3 large3 sub/normal4 sub/large4 -m "edit files again" |
|
149 | $ hg commit normal3 large3 sub/normal4 sub/large4 -m "edit files again" | |
150 | $ cat normal3 |
|
150 | $ cat normal3 | |
151 | normal3 |
|
151 | normal3 | |
152 | $ cat large3 |
|
152 | $ cat large3 | |
153 | large3 |
|
153 | large3 | |
154 | $ cat sub/normal4 |
|
154 | $ cat sub/normal4 | |
155 | normal4 |
|
155 | normal4 | |
156 | $ cat sub/large4 |
|
156 | $ cat sub/large4 | |
157 | large4 |
|
157 | large4 | |
158 |
|
158 | |||
159 | One more commit corner case: commit from a subdirectory. |
|
159 | One more commit corner case: commit from a subdirectory. | |
160 |
|
160 | |||
161 | $ cd ../a |
|
161 | $ cd ../a | |
162 | $ echo normal33 > normal3 |
|
162 | $ echo normal33 > normal3 | |
163 | $ echo large33 > large3 |
|
163 | $ echo large33 > large3 | |
164 | $ echo normal44 > sub/normal4 |
|
164 | $ echo normal44 > sub/normal4 | |
165 | $ echo large44 > sub/large4 |
|
165 | $ echo large44 > sub/large4 | |
166 | $ cd sub |
|
166 | $ cd sub | |
167 | $ hg commit -m "edit files yet again" |
|
167 | $ hg commit -m "edit files yet again" | |
168 | $ cat ../normal3 |
|
168 | $ cat ../normal3 | |
169 | normal33 |
|
169 | normal33 | |
170 | $ cat ../large3 |
|
170 | $ cat ../large3 | |
171 | large33 |
|
171 | large33 | |
172 | $ cat normal4 |
|
172 | $ cat normal4 | |
173 | normal44 |
|
173 | normal44 | |
174 | $ cat large4 |
|
174 | $ cat large4 | |
175 | large44 |
|
175 | large44 | |
176 |
|
176 | |||
177 | Committing standins is not allowed. |
|
177 | Committing standins is not allowed. | |
178 |
|
178 | |||
179 | $ cd .. |
|
179 | $ cd .. | |
180 | $ echo large3 > large3 |
|
180 | $ echo large3 > large3 | |
181 | $ hg commit .hglf/large3 -m "try to commit standin" |
|
181 | $ hg commit .hglf/large3 -m "try to commit standin" | |
182 | abort: file ".hglf/large3" is a largefile standin |
|
182 | abort: file ".hglf/large3" is a largefile standin | |
183 | (commit the largefile itself instead) |
|
183 | (commit the largefile itself instead) | |
184 | [255] |
|
184 | [255] | |
185 |
|
185 | |||
186 | Corner cases for adding largefiles. |
|
186 | Corner cases for adding largefiles. | |
187 |
|
187 | |||
188 | $ echo large5 > large5 |
|
188 | $ echo large5 > large5 | |
189 | $ hg add --large large5 |
|
189 | $ hg add --large large5 | |
190 | $ hg add --large large5 |
|
190 | $ hg add --large large5 | |
191 | large5 already a largefile |
|
191 | large5 already a largefile | |
192 | $ mkdir sub2 |
|
192 | $ mkdir sub2 | |
193 | $ echo large6 > sub2/large6 |
|
193 | $ echo large6 > sub2/large6 | |
194 | $ echo large7 > sub2/large7 |
|
194 | $ echo large7 > sub2/large7 | |
195 | $ hg add --large sub2 |
|
195 | $ hg add --large sub2 | |
196 | adding sub2/large6 as a largefile (glob) |
|
196 | adding sub2/large6 as a largefile (glob) | |
197 | adding sub2/large7 as a largefile (glob) |
|
197 | adding sub2/large7 as a largefile (glob) | |
198 | $ hg st |
|
198 | $ hg st | |
199 | M large3 |
|
199 | M large3 | |
200 | A large5 |
|
200 | A large5 | |
201 | A sub2/large6 |
|
201 | A sub2/large6 | |
202 | A sub2/large7 |
|
202 | A sub2/large7 | |
203 |
|
203 | |||
204 | Config settings (pattern **.dat, minsize 2 MB) are respected. |
|
204 | Config settings (pattern **.dat, minsize 2 MB) are respected. | |
205 |
|
205 | |||
206 | $ echo testdata > test.dat |
|
206 | $ echo testdata > test.dat | |
207 | $ dd bs=1k count=2k if=/dev/zero of=reallylarge > /dev/null 2> /dev/null |
|
207 | $ dd bs=1k count=2k if=/dev/zero of=reallylarge > /dev/null 2> /dev/null | |
208 | $ hg add |
|
208 | $ hg add | |
209 | adding reallylarge as a largefile |
|
209 | adding reallylarge as a largefile | |
210 | adding test.dat as a largefile |
|
210 | adding test.dat as a largefile | |
211 |
|
211 | |||
212 | Test that minsize and --lfsize handle float values; |
|
212 | Test that minsize and --lfsize handle float values; | |
213 | also tests that --lfsize overrides largefiles.minsize. |
|
213 | also tests that --lfsize overrides largefiles.minsize. | |
214 | (0.250 MB = 256 kB = 262144 B) |
|
214 | (0.250 MB = 256 kB = 262144 B) | |
215 |
|
215 | |||
216 | $ dd if=/dev/zero of=ratherlarge bs=1024 count=256 > /dev/null 2> /dev/null |
|
216 | $ dd if=/dev/zero of=ratherlarge bs=1024 count=256 > /dev/null 2> /dev/null | |
217 | $ dd if=/dev/zero of=medium bs=1024 count=128 > /dev/null 2> /dev/null |
|
217 | $ dd if=/dev/zero of=medium bs=1024 count=128 > /dev/null 2> /dev/null | |
218 | $ hg --config largefiles.minsize=.25 add |
|
218 | $ hg --config largefiles.minsize=.25 add | |
219 | adding ratherlarge as a largefile |
|
219 | adding ratherlarge as a largefile | |
220 | adding medium |
|
220 | adding medium | |
221 | $ hg forget medium |
|
221 | $ hg forget medium | |
222 | $ hg --config largefiles.minsize=.25 add --lfsize=.125 |
|
222 | $ hg --config largefiles.minsize=.25 add --lfsize=.125 | |
223 | adding medium as a largefile |
|
223 | adding medium as a largefile | |
224 | $ dd if=/dev/zero of=notlarge bs=1024 count=127 > /dev/null 2> /dev/null |
|
224 | $ dd if=/dev/zero of=notlarge bs=1024 count=127 > /dev/null 2> /dev/null | |
225 | $ hg --config largefiles.minsize=.25 add --lfsize=.125 |
|
225 | $ hg --config largefiles.minsize=.25 add --lfsize=.125 | |
226 | adding notlarge |
|
226 | adding notlarge | |
227 | $ hg forget notlarge |
|
227 | $ hg forget notlarge | |
228 |
|
228 | |||
229 | Test forget on largefiles. |
|
229 | Test forget on largefiles. | |
230 |
|
230 | |||
231 | $ hg forget large3 large5 test.dat reallylarge ratherlarge medium |
|
231 | $ hg forget large3 large5 test.dat reallylarge ratherlarge medium | |
232 | $ hg st |
|
232 | $ hg st | |
233 | A sub2/large6 |
|
233 | A sub2/large6 | |
234 | A sub2/large7 |
|
234 | A sub2/large7 | |
235 | R large3 |
|
235 | R large3 | |
236 | ? large5 |
|
236 | ? large5 | |
237 | ? medium |
|
237 | ? medium | |
238 | ? notlarge |
|
238 | ? notlarge | |
239 | ? ratherlarge |
|
239 | ? ratherlarge | |
240 | ? reallylarge |
|
240 | ? reallylarge | |
241 | ? test.dat |
|
241 | ? test.dat | |
242 | $ hg commit -m "add/edit more largefiles" |
|
242 | $ hg commit -m "add/edit more largefiles" | |
243 | $ hg st |
|
243 | $ hg st | |
244 | ? large3 |
|
244 | ? large3 | |
245 | ? large5 |
|
245 | ? large5 | |
246 | ? medium |
|
246 | ? medium | |
247 | ? notlarge |
|
247 | ? notlarge | |
248 | ? ratherlarge |
|
248 | ? ratherlarge | |
249 | ? reallylarge |
|
249 | ? reallylarge | |
250 | ? test.dat |
|
250 | ? test.dat | |
251 |
|
251 | |||
252 | Purge with largefiles: verify that largefiles are still in the working |
|
252 | Purge with largefiles: verify that largefiles are still in the working | |
253 | dir after a purge. |
|
253 | dir after a purge. | |
254 |
|
254 | |||
255 | $ hg purge --all |
|
255 | $ hg purge --all | |
256 | $ cat sub/large4 |
|
256 | $ cat sub/large4 | |
257 | large44 |
|
257 | large44 | |
258 | $ cat sub2/large6 |
|
258 | $ cat sub2/large6 | |
259 | large6 |
|
259 | large6 | |
260 | $ cat sub2/large7 |
|
260 | $ cat sub2/large7 | |
261 | large7 |
|
261 | large7 | |
262 |
|
262 | |||
263 | Clone a largefiles repo. |
|
263 | Clone a largefiles repo. | |
264 |
|
264 | |||
265 | $ hg clone . ../b |
|
265 | $ hg clone . ../b | |
266 | updating to branch default |
|
266 | updating to branch default | |
267 | 5 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
267 | 5 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
268 | getting changed largefiles |
|
268 | getting changed largefiles | |
269 | 3 largefiles updated, 0 removed |
|
269 | 3 largefiles updated, 0 removed | |
270 | $ cd ../b |
|
270 | $ cd ../b | |
271 | $ hg log --template '{rev}:{node|short} {desc|firstline}\n' |
|
271 | $ hg log --template '{rev}:{node|short} {desc|firstline}\n' | |
272 | 7:daea875e9014 add/edit more largefiles |
|
272 | 7:daea875e9014 add/edit more largefiles | |
273 | 6:4355d653f84f edit files yet again |
|
273 | 6:4355d653f84f edit files yet again | |
274 | 5:9d5af5072dbd edit files again |
|
274 | 5:9d5af5072dbd edit files again | |
275 | 4:74c02385b94c move files |
|
275 | 4:74c02385b94c move files | |
276 | 3:9e8fbc4bce62 copy files |
|
276 | 3:9e8fbc4bce62 copy files | |
277 | 2:51a0ae4d5864 remove files |
|
277 | 2:51a0ae4d5864 remove files | |
278 | 1:ce8896473775 edit files |
|
278 | 1:ce8896473775 edit files | |
279 | 0:30d30fe6a5be add files |
|
279 | 0:30d30fe6a5be add files | |
280 | $ cat normal3 |
|
280 | $ cat normal3 | |
281 | normal33 |
|
281 | normal33 | |
282 | $ cat sub/normal4 |
|
282 | $ cat sub/normal4 | |
283 | normal44 |
|
283 | normal44 | |
284 | $ cat sub/large4 |
|
284 | $ cat sub/large4 | |
285 | large44 |
|
285 | large44 | |
286 | $ cat sub2/large6 |
|
286 | $ cat sub2/large6 | |
287 | large6 |
|
287 | large6 | |
288 | $ cat sub2/large7 |
|
288 | $ cat sub2/large7 | |
289 | large7 |
|
289 | large7 | |
290 | $ cd .. |
|
290 | $ cd .. | |
291 | $ hg clone a -r 3 c |
|
291 | $ hg clone a -r 3 c | |
292 | adding changesets |
|
292 | adding changesets | |
293 | adding manifests |
|
293 | adding manifests | |
294 | adding file changes |
|
294 | adding file changes | |
295 | added 4 changesets with 10 changes to 4 files |
|
295 | added 4 changesets with 10 changes to 4 files | |
296 | updating to branch default |
|
296 | updating to branch default | |
297 | 4 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
297 | 4 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
298 | getting changed largefiles |
|
298 | getting changed largefiles | |
299 | 2 largefiles updated, 0 removed |
|
299 | 2 largefiles updated, 0 removed | |
300 | $ cd c |
|
300 | $ cd c | |
301 | $ hg log --template '{rev}:{node|short} {desc|firstline}\n' |
|
301 | $ hg log --template '{rev}:{node|short} {desc|firstline}\n' | |
302 | 3:9e8fbc4bce62 copy files |
|
302 | 3:9e8fbc4bce62 copy files | |
303 | 2:51a0ae4d5864 remove files |
|
303 | 2:51a0ae4d5864 remove files | |
304 | 1:ce8896473775 edit files |
|
304 | 1:ce8896473775 edit files | |
305 | 0:30d30fe6a5be add files |
|
305 | 0:30d30fe6a5be add files | |
306 | $ cat normal1 |
|
306 | $ cat normal1 | |
307 | normal22 |
|
307 | normal22 | |
308 | $ cat large1 |
|
308 | $ cat large1 | |
309 | large22 |
|
309 | large22 | |
310 | $ cat sub/normal2 |
|
310 | $ cat sub/normal2 | |
311 | normal22 |
|
311 | normal22 | |
312 | $ cat sub/large2 |
|
312 | $ cat sub/large2 | |
313 | large22 |
|
313 | large22 | |
314 |
|
314 | |||
315 | Old revisions of a clone have correct largefiles content (this also |
|
315 | Old revisions of a clone have correct largefiles content (this also | |
316 | tests update). |
|
316 | tests update). | |
317 |
|
317 | |||
318 | $ hg update -r 1 |
|
318 | $ hg update -r 1 | |
319 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
319 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
320 | getting changed largefiles |
|
320 | getting changed largefiles | |
321 | 1 largefiles updated, 0 removed |
|
321 | 1 largefiles updated, 0 removed | |
322 | $ cat large1 |
|
322 | $ cat large1 | |
323 | large11 |
|
323 | large11 | |
324 | $ cat sub/large2 |
|
324 | $ cat sub/large2 | |
325 | large22 |
|
325 | large22 | |
326 |
|
326 | |||
327 | Rebasing between two repositories does not revert largefiles to old |
|
327 | Rebasing between two repositories does not revert largefiles to old | |
328 | revisions (this was a very bad bug that took a lot of work to fix). |
|
328 | revisions (this was a very bad bug that took a lot of work to fix). | |
329 |
|
329 | |||
330 | $ cd .. |
|
330 | $ cd .. | |
331 | $ hg clone a d |
|
331 | $ hg clone a d | |
332 | updating to branch default |
|
332 | updating to branch default | |
333 | 5 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
333 | 5 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
334 | getting changed largefiles |
|
334 | getting changed largefiles | |
335 | 3 largefiles updated, 0 removed |
|
335 | 3 largefiles updated, 0 removed | |
336 | $ cd b |
|
336 | $ cd b | |
337 | $ echo large4-modified > sub/large4 |
|
337 | $ echo large4-modified > sub/large4 | |
338 | $ echo normal3-modified > normal3 |
|
338 | $ echo normal3-modified > normal3 | |
339 | $ hg commit -m "modify normal file and largefile in repo b" |
|
339 | $ hg commit -m "modify normal file and largefile in repo b" | |
340 | $ cd ../d |
|
340 | $ cd ../d | |
341 | $ echo large6-modified > sub2/large6 |
|
341 | $ echo large6-modified > sub2/large6 | |
342 | $ echo normal4-modified > sub/normal4 |
|
342 | $ echo normal4-modified > sub/normal4 | |
343 | $ hg commit -m "modify normal file largefile in repo d" |
|
343 | $ hg commit -m "modify normal file largefile in repo d" | |
344 | $ cd .. |
|
344 | $ cd .. | |
345 | $ hg clone d e |
|
345 | $ hg clone d e | |
346 | updating to branch default |
|
346 | updating to branch default | |
347 | 5 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
347 | 5 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
348 | getting changed largefiles |
|
348 | getting changed largefiles | |
349 | 3 largefiles updated, 0 removed |
|
349 | 3 largefiles updated, 0 removed | |
350 | $ cd d |
|
350 | $ cd d | |
351 | $ hg pull --rebase ../b |
|
351 | $ hg pull --rebase ../b | |
352 | pulling from ../b |
|
352 | pulling from ../b | |
353 | searching for changes |
|
353 | searching for changes | |
354 | adding changesets |
|
354 | adding changesets | |
355 | adding manifests |
|
355 | adding manifests | |
356 | adding file changes |
|
356 | adding file changes | |
357 | added 1 changesets with 2 changes to 2 files (+1 heads) |
|
357 | added 1 changesets with 2 changes to 2 files (+1 heads) | |
358 | getting changed largefiles |
|
358 | getting changed largefiles | |
359 | 1 largefiles updated, 0 removed |
|
359 | 1 largefiles updated, 0 removed | |
360 | saved backup bundle to $TESTTMP/d/.hg/strip-backup/f574fb32bb45-backup.hg (glob) |
|
360 | saved backup bundle to $TESTTMP/d/.hg/strip-backup/f574fb32bb45-backup.hg (glob) | |
361 | nothing to rebase |
|
361 | nothing to rebase | |
362 | $ hg log --template '{rev}:{node|short} {desc|firstline}\n' |
|
362 | $ hg log --template '{rev}:{node|short} {desc|firstline}\n' | |
363 | 9:598410d3eb9a modify normal file largefile in repo d |
|
363 | 9:598410d3eb9a modify normal file largefile in repo d | |
364 | 8:a381d2c8c80e modify normal file and largefile in repo b |
|
364 | 8:a381d2c8c80e modify normal file and largefile in repo b | |
365 | 7:daea875e9014 add/edit more largefiles |
|
365 | 7:daea875e9014 add/edit more largefiles | |
366 | 6:4355d653f84f edit files yet again |
|
366 | 6:4355d653f84f edit files yet again | |
367 | 5:9d5af5072dbd edit files again |
|
367 | 5:9d5af5072dbd edit files again | |
368 | 4:74c02385b94c move files |
|
368 | 4:74c02385b94c move files | |
369 | 3:9e8fbc4bce62 copy files |
|
369 | 3:9e8fbc4bce62 copy files | |
370 | 2:51a0ae4d5864 remove files |
|
370 | 2:51a0ae4d5864 remove files | |
371 | 1:ce8896473775 edit files |
|
371 | 1:ce8896473775 edit files | |
372 | 0:30d30fe6a5be add files |
|
372 | 0:30d30fe6a5be add files | |
373 | $ cat normal3 |
|
373 | $ cat normal3 | |
374 | normal3-modified |
|
374 | normal3-modified | |
375 | $ cat sub/normal4 |
|
375 | $ cat sub/normal4 | |
376 | normal4-modified |
|
376 | normal4-modified | |
377 | $ cat sub/large4 |
|
377 | $ cat sub/large4 | |
378 | large4-modified |
|
378 | large4-modified | |
379 | $ cat sub2/large6 |
|
379 | $ cat sub2/large6 | |
380 | large6-modified |
|
380 | large6-modified | |
381 | $ cat sub2/large7 |
|
381 | $ cat sub2/large7 | |
382 | large7 |
|
382 | large7 | |
383 | $ cd ../e |
|
383 | $ cd ../e | |
384 | $ hg pull ../b |
|
384 | $ hg pull ../b | |
385 | pulling from ../b |
|
385 | pulling from ../b | |
386 | searching for changes |
|
386 | searching for changes | |
387 | adding changesets |
|
387 | adding changesets | |
388 | adding manifests |
|
388 | adding manifests | |
389 | adding file changes |
|
389 | adding file changes | |
390 | added 1 changesets with 2 changes to 2 files (+1 heads) |
|
390 | added 1 changesets with 2 changes to 2 files (+1 heads) | |
391 | (run 'hg heads' to see heads, 'hg merge' to merge) |
|
391 | (run 'hg heads' to see heads, 'hg merge' to merge) | |
392 | $ hg rebase |
|
392 | $ hg rebase | |
393 | getting changed largefiles |
|
393 | getting changed largefiles | |
394 | 1 largefiles updated, 0 removed |
|
394 | 1 largefiles updated, 0 removed | |
395 | saved backup bundle to $TESTTMP/e/.hg/strip-backup/f574fb32bb45-backup.hg (glob) |
|
395 | saved backup bundle to $TESTTMP/e/.hg/strip-backup/f574fb32bb45-backup.hg (glob) | |
396 | $ hg log |
|
396 | $ hg log --template '{rev}:{node|short} {desc|firstline}\n' | |
397 | changeset: 9:598410d3eb9a |
|
397 | 9:598410d3eb9a modify normal file largefile in repo d | |
398 | tag: tip |
|
398 | 8:a381d2c8c80e modify normal file and largefile in repo b | |
399 | user: test |
|
399 | 7:daea875e9014 add/edit more largefiles | |
400 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
400 | 6:4355d653f84f edit files yet again | |
401 | summary: modify normal file largefile in repo d |
|
401 | 5:9d5af5072dbd edit files again | |
402 |
|
402 | 4:74c02385b94c move files | ||
403 | changeset: 8:a381d2c8c80e |
|
403 | 3:9e8fbc4bce62 copy files | |
404 | user: test |
|
404 | 2:51a0ae4d5864 remove files | |
405 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
405 | 1:ce8896473775 edit files | |
406 | summary: modify normal file and largefile in repo b |
|
406 | 0:30d30fe6a5be add files | |
407 |
|
||||
408 | changeset: 7:daea875e9014 |
|
|||
409 | user: test |
|
|||
410 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
|||
411 | summary: add/edit more largefiles |
|
|||
412 |
|
||||
413 | changeset: 6:4355d653f84f |
|
|||
414 | user: test |
|
|||
415 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
|||
416 | summary: edit files yet again |
|
|||
417 |
|
||||
418 | changeset: 5:9d5af5072dbd |
|
|||
419 | user: test |
|
|||
420 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
|||
421 | summary: edit files again |
|
|||
422 |
|
||||
423 | changeset: 4:74c02385b94c |
|
|||
424 | user: test |
|
|||
425 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
|||
426 | summary: move files |
|
|||
427 |
|
||||
428 | changeset: 3:9e8fbc4bce62 |
|
|||
429 | user: test |
|
|||
430 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
|||
431 | summary: copy files |
|
|||
432 |
|
||||
433 | changeset: 2:51a0ae4d5864 |
|
|||
434 | user: test |
|
|||
435 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
|||
436 | summary: remove files |
|
|||
437 |
|
||||
438 | changeset: 1:ce8896473775 |
|
|||
439 | user: test |
|
|||
440 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
|||
441 | summary: edit files |
|
|||
442 |
|
||||
443 | changeset: 0:30d30fe6a5be |
|
|||
444 | user: test |
|
|||
445 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
|||
446 | summary: add files |
|
|||
447 |
|
||||
448 | $ cat normal3 |
|
407 | $ cat normal3 | |
449 | normal3-modified |
|
408 | normal3-modified | |
450 | $ cat sub/normal4 |
|
409 | $ cat sub/normal4 | |
451 | normal4-modified |
|
410 | normal4-modified | |
452 | $ cat sub/large4 |
|
411 | $ cat sub/large4 | |
453 | large4-modified |
|
412 | large4-modified | |
454 | $ cat sub2/large6 |
|
413 | $ cat sub2/large6 | |
455 | large6-modified |
|
414 | large6-modified | |
456 | $ cat sub2/large7 |
|
415 | $ cat sub2/large7 | |
457 | large7 |
|
416 | large7 | |
458 |
|
417 | |||
459 | Rollback on largefiles. |
|
418 | Rollback on largefiles. | |
460 |
|
419 | |||
461 | $ echo large4-modified-again > sub/large4 |
|
420 | $ echo large4-modified-again > sub/large4 | |
462 | $ hg commit -m "Modify large4 again" |
|
421 | $ hg commit -m "Modify large4 again" | |
463 | $ hg rollback |
|
422 | $ hg rollback | |
464 | repository tip rolled back to revision 9 (undo commit) |
|
423 | repository tip rolled back to revision 9 (undo commit) | |
465 | working directory now based on revision 9 |
|
424 | working directory now based on revision 9 | |
466 | $ hg st |
|
425 | $ hg st | |
467 | M sub/large4 |
|
426 | M sub/large4 | |
468 | $ hg log |
|
427 | $ hg log --template '{rev}:{node|short} {desc|firstline}\n' | |
469 | changeset: 9:598410d3eb9a |
|
428 | 9:598410d3eb9a modify normal file largefile in repo d | |
470 | tag: tip |
|
429 | 8:a381d2c8c80e modify normal file and largefile in repo b | |
471 | user: test |
|
430 | 7:daea875e9014 add/edit more largefiles | |
472 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
431 | 6:4355d653f84f edit files yet again | |
473 | summary: modify normal file largefile in repo d |
|
432 | 5:9d5af5072dbd edit files again | |
474 |
|
433 | 4:74c02385b94c move files | ||
475 | changeset: 8:a381d2c8c80e |
|
434 | 3:9e8fbc4bce62 copy files | |
476 | user: test |
|
435 | 2:51a0ae4d5864 remove files | |
477 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
436 | 1:ce8896473775 edit files | |
478 | summary: modify normal file and largefile in repo b |
|
437 | 0:30d30fe6a5be add files | |
479 |
|
||||
480 | changeset: 7:daea875e9014 |
|
|||
481 | user: test |
|
|||
482 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
|||
483 | summary: add/edit more largefiles |
|
|||
484 |
|
||||
485 | changeset: 6:4355d653f84f |
|
|||
486 | user: test |
|
|||
487 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
|||
488 | summary: edit files yet again |
|
|||
489 |
|
||||
490 | changeset: 5:9d5af5072dbd |
|
|||
491 | user: test |
|
|||
492 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
|||
493 | summary: edit files again |
|
|||
494 |
|
||||
495 | changeset: 4:74c02385b94c |
|
|||
496 | user: test |
|
|||
497 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
|||
498 | summary: move files |
|
|||
499 |
|
||||
500 | changeset: 3:9e8fbc4bce62 |
|
|||
501 | user: test |
|
|||
502 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
|||
503 | summary: copy files |
|
|||
504 |
|
||||
505 | changeset: 2:51a0ae4d5864 |
|
|||
506 | user: test |
|
|||
507 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
|||
508 | summary: remove files |
|
|||
509 |
|
||||
510 | changeset: 1:ce8896473775 |
|
|||
511 | user: test |
|
|||
512 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
|||
513 | summary: edit files |
|
|||
514 |
|
||||
515 | changeset: 0:30d30fe6a5be |
|
|||
516 | user: test |
|
|||
517 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
|||
518 | summary: add files |
|
|||
519 |
|
||||
520 | $ cat sub/large4 |
|
438 | $ cat sub/large4 | |
521 | large4-modified-again |
|
439 | large4-modified-again | |
522 |
|
440 | |||
523 | "update --check" refuses to update with uncommitted changes. |
|
441 | "update --check" refuses to update with uncommitted changes. | |
524 | $ hg update --check 8 |
|
442 | $ hg update --check 8 | |
525 | abort: uncommitted local changes |
|
443 | abort: uncommitted local changes | |
526 | [255] |
|
444 | [255] | |
527 |
|
445 | |||
528 | "update --clean" leaves correct largefiles in working copy. |
|
446 | "update --clean" leaves correct largefiles in working copy. | |
529 |
|
447 | |||
530 | $ hg update --clean |
|
448 | $ hg update --clean | |
531 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
449 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
532 | getting changed largefiles |
|
450 | getting changed largefiles | |
533 | 1 largefiles updated, 0 removed |
|
451 | 1 largefiles updated, 0 removed | |
534 | $ cat normal3 |
|
452 | $ cat normal3 | |
535 | normal3-modified |
|
453 | normal3-modified | |
536 | $ cat sub/normal4 |
|
454 | $ cat sub/normal4 | |
537 | normal4-modified |
|
455 | normal4-modified | |
538 | $ cat sub/large4 |
|
456 | $ cat sub/large4 | |
539 | large4-modified |
|
457 | large4-modified | |
540 | $ cat sub2/large6 |
|
458 | $ cat sub2/large6 | |
541 | large6-modified |
|
459 | large6-modified | |
542 | $ cat sub2/large7 |
|
460 | $ cat sub2/large7 | |
543 | large7 |
|
461 | large7 | |
544 |
|
462 | |||
545 | Now "update check" is happy. |
|
463 | Now "update check" is happy. | |
546 | $ hg update --check 8 |
|
464 | $ hg update --check 8 | |
547 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
465 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
548 | getting changed largefiles |
|
466 | getting changed largefiles | |
549 | 1 largefiles updated, 0 removed |
|
467 | 1 largefiles updated, 0 removed | |
550 | $ hg update --check |
|
468 | $ hg update --check | |
551 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
469 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
552 | getting changed largefiles |
|
470 | getting changed largefiles | |
553 | 1 largefiles updated, 0 removed |
|
471 | 1 largefiles updated, 0 removed | |
554 |
|
472 | |||
555 | "revert" works on largefiles (and normal files too). |
|
473 | "revert" works on largefiles (and normal files too). | |
556 | $ echo hack3 >> normal3 |
|
474 | $ echo hack3 >> normal3 | |
557 | $ echo hack4 >> sub/normal4 |
|
475 | $ echo hack4 >> sub/normal4 | |
558 | $ echo hack4 >> sub/large4 |
|
476 | $ echo hack4 >> sub/large4 | |
559 | $ hg rm sub2/large6 |
|
477 | $ hg rm sub2/large6 | |
560 | $ echo new >> sub2/large8 |
|
478 | $ echo new >> sub2/large8 | |
561 | $ hg add --large sub2/large8 |
|
479 | $ hg add --large sub2/large8 | |
562 | # XXX we don't really want to report that we're reverting the standin; |
|
480 | # XXX we don't really want to report that we're reverting the standin; | |
563 | # that's just an implementation detail. But I don't see an obvious fix. ;-( |
|
481 | # that's just an implementation detail. But I don't see an obvious fix. ;-( | |
564 | $ hg revert sub |
|
482 | $ hg revert sub | |
565 | reverting .hglf/sub/large4 (glob) |
|
483 | reverting .hglf/sub/large4 (glob) | |
566 | reverting sub/normal4 (glob) |
|
484 | reverting sub/normal4 (glob) | |
567 | $ hg status |
|
485 | $ hg status | |
568 | M normal3 |
|
486 | M normal3 | |
569 | A sub2/large8 |
|
487 | A sub2/large8 | |
570 | R sub2/large6 |
|
488 | R sub2/large6 | |
571 | ? sub/large4.orig |
|
489 | ? sub/large4.orig | |
572 | ? sub/normal4.orig |
|
490 | ? sub/normal4.orig | |
573 | $ cat sub/normal4 |
|
491 | $ cat sub/normal4 | |
574 | normal4-modified |
|
492 | normal4-modified | |
575 | $ cat sub/large4 |
|
493 | $ cat sub/large4 | |
576 | large4-modified |
|
494 | large4-modified | |
577 | $ hg revert -a --no-backup |
|
495 | $ hg revert -a --no-backup | |
578 | undeleting .hglf/sub2/large6 (glob) |
|
496 | undeleting .hglf/sub2/large6 (glob) | |
579 | forgetting .hglf/sub2/large8 (glob) |
|
497 | forgetting .hglf/sub2/large8 (glob) | |
580 | reverting normal3 |
|
498 | reverting normal3 | |
581 | $ hg status |
|
499 | $ hg status | |
582 | ? sub/large4.orig |
|
500 | ? sub/large4.orig | |
583 | ? sub/normal4.orig |
|
501 | ? sub/normal4.orig | |
584 | ? sub2/large8 |
|
502 | ? sub2/large8 | |
585 | $ cat normal3 |
|
503 | $ cat normal3 | |
586 | normal3-modified |
|
504 | normal3-modified | |
587 | $ cat sub2/large6 |
|
505 | $ cat sub2/large6 | |
588 | large6-modified |
|
506 | large6-modified | |
589 | $ rm sub/*.orig sub2/large8 |
|
507 | $ rm sub/*.orig sub2/large8 | |
590 |
|
508 | |||
591 | revert some files to an older revision |
|
509 | revert some files to an older revision | |
592 | $ hg revert --no-backup -r 8 sub2 |
|
510 | $ hg revert --no-backup -r 8 sub2 | |
593 | reverting .hglf/sub2/large6 (glob) |
|
511 | reverting .hglf/sub2/large6 (glob) | |
594 | $ cat sub2/large6 |
|
512 | $ cat sub2/large6 | |
595 | large6 |
|
513 | large6 | |
596 | $ hg revert --no-backup sub2 |
|
514 | $ hg revert --no-backup sub2 | |
597 | reverting .hglf/sub2/large6 (glob) |
|
515 | reverting .hglf/sub2/large6 (glob) | |
598 | $ hg status |
|
516 | $ hg status | |
599 |
|
517 | |||
600 | "verify --large" actually verifies largefiles |
|
518 | "verify --large" actually verifies largefiles | |
601 |
|
519 | |||
602 | $ hg verify --large |
|
520 | $ hg verify --large | |
603 | checking changesets |
|
521 | checking changesets | |
604 | checking manifests |
|
522 | checking manifests | |
605 | crosschecking files in changesets and manifests |
|
523 | crosschecking files in changesets and manifests | |
606 | checking files |
|
524 | checking files | |
607 | 10 files, 10 changesets, 28 total revisions |
|
525 | 10 files, 10 changesets, 28 total revisions | |
608 | searching 1 changesets for largefiles |
|
526 | searching 1 changesets for largefiles | |
609 | verified existence of 3 revisions of 3 largefiles |
|
527 | verified existence of 3 revisions of 3 largefiles | |
610 |
|
528 | |||
611 | Merging does not revert to old versions of largefiles (this has also |
|
529 | Merging does not revert to old versions of largefiles (this has also | |
612 | been very problematic). |
|
530 | been very problematic). | |
613 |
|
531 | |||
614 | $ cd .. |
|
532 | $ cd .. | |
615 | $ hg clone -r 7 e f |
|
533 | $ hg clone -r 7 e f | |
616 | adding changesets |
|
534 | adding changesets | |
617 | adding manifests |
|
535 | adding manifests | |
618 | adding file changes |
|
536 | adding file changes | |
619 | added 8 changesets with 24 changes to 10 files |
|
537 | added 8 changesets with 24 changes to 10 files | |
620 | updating to branch default |
|
538 | updating to branch default | |
621 | 5 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
539 | 5 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
622 | getting changed largefiles |
|
540 | getting changed largefiles | |
623 | 3 largefiles updated, 0 removed |
|
541 | 3 largefiles updated, 0 removed | |
624 | $ cd f |
|
542 | $ cd f | |
625 | $ echo "large4-merge-test" > sub/large4 |
|
543 | $ echo "large4-merge-test" > sub/large4 | |
626 | $ hg commit -m "Modify large4 to test merge" |
|
544 | $ hg commit -m "Modify large4 to test merge" | |
627 | $ hg pull ../e |
|
545 | $ hg pull ../e | |
628 | pulling from ../e |
|
546 | pulling from ../e | |
629 | searching for changes |
|
547 | searching for changes | |
630 | adding changesets |
|
548 | adding changesets | |
631 | adding manifests |
|
549 | adding manifests | |
632 | adding file changes |
|
550 | adding file changes | |
633 | added 2 changesets with 4 changes to 4 files (+1 heads) |
|
551 | added 2 changesets with 4 changes to 4 files (+1 heads) | |
634 | (run 'hg heads' to see heads, 'hg merge' to merge) |
|
552 | (run 'hg heads' to see heads, 'hg merge' to merge) | |
635 | $ hg merge |
|
553 | $ hg merge | |
636 | merging sub/large4 |
|
554 | merging sub/large4 | |
637 | largefile sub/large4 has a merge conflict |
|
555 | largefile sub/large4 has a merge conflict | |
638 | keep (l)ocal or take (o)ther? l |
|
556 | keep (l)ocal or take (o)ther? l | |
639 | 3 files updated, 1 files merged, 0 files removed, 0 files unresolved |
|
557 | 3 files updated, 1 files merged, 0 files removed, 0 files unresolved | |
640 | (branch merge, don't forget to commit) |
|
558 | (branch merge, don't forget to commit) | |
641 | getting changed largefiles |
|
559 | getting changed largefiles | |
642 | 1 largefiles updated, 0 removed |
|
560 | 1 largefiles updated, 0 removed | |
643 | $ hg commit -m "Merge repos e and f" |
|
561 | $ hg commit -m "Merge repos e and f" | |
644 | $ cat normal3 |
|
562 | $ cat normal3 | |
645 | normal3-modified |
|
563 | normal3-modified | |
646 | $ cat sub/normal4 |
|
564 | $ cat sub/normal4 | |
647 | normal4-modified |
|
565 | normal4-modified | |
648 | $ cat sub/large4 |
|
566 | $ cat sub/large4 | |
649 | large4-merge-test |
|
567 | large4-merge-test | |
650 | $ cat sub2/large6 |
|
568 | $ cat sub2/large6 | |
651 | large6-modified |
|
569 | large6-modified | |
652 | $ cat sub2/large7 |
|
570 | $ cat sub2/large7 | |
653 | large7 |
|
571 | large7 | |
654 |
|
572 | |||
655 | Test status after merging with a branch that introduces a new largefile: |
|
573 | Test status after merging with a branch that introduces a new largefile: | |
656 |
|
574 | |||
657 | $ echo large > large |
|
575 | $ echo large > large | |
658 | $ hg add --large large |
|
576 | $ hg add --large large | |
659 | $ hg commit -m 'add largefile' |
|
577 | $ hg commit -m 'add largefile' | |
660 | $ hg update -q ".^" |
|
578 | $ hg update -q ".^" | |
661 | $ echo change >> normal3 |
|
579 | $ echo change >> normal3 | |
662 | $ hg commit -m 'some change' |
|
580 | $ hg commit -m 'some change' | |
663 | created new head |
|
581 | created new head | |
664 | $ hg merge |
|
582 | $ hg merge | |
665 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
583 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
666 | (branch merge, don't forget to commit) |
|
584 | (branch merge, don't forget to commit) | |
667 | getting changed largefiles |
|
585 | getting changed largefiles | |
668 | 1 largefiles updated, 0 removed |
|
586 | 1 largefiles updated, 0 removed | |
669 | $ hg status |
|
587 | $ hg status | |
670 | M large |
|
588 | M large | |
671 |
|
589 | |||
672 | Test that a normal file and a largefile with the same name and path cannot |
|
590 | Test that a normal file and a largefile with the same name and path cannot | |
673 | coexist. |
|
591 | coexist. | |
674 |
|
592 | |||
675 | $ rm sub2/large7 |
|
593 | $ rm sub2/large7 | |
676 | $ echo "largeasnormal" > sub2/large7 |
|
594 | $ echo "largeasnormal" > sub2/large7 | |
677 | $ hg add sub2/large7 |
|
595 | $ hg add sub2/large7 | |
678 | sub2/large7 already a largefile |
|
596 | sub2/large7 already a largefile | |
679 |
|
597 | |||
680 | Test that transplanting a largefile change works correctly. |
|
598 | Test that transplanting a largefile change works correctly. | |
681 |
|
599 | |||
682 | $ cd .. |
|
600 | $ cd .. | |
683 | $ hg clone -r 8 d g |
|
601 | $ hg clone -r 8 d g | |
684 | adding changesets |
|
602 | adding changesets | |
685 | adding manifests |
|
603 | adding manifests | |
686 | adding file changes |
|
604 | adding file changes | |
687 | added 9 changesets with 26 changes to 10 files |
|
605 | added 9 changesets with 26 changes to 10 files | |
688 | updating to branch default |
|
606 | updating to branch default | |
689 | 5 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
607 | 5 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
690 | getting changed largefiles |
|
608 | getting changed largefiles | |
691 | 3 largefiles updated, 0 removed |
|
609 | 3 largefiles updated, 0 removed | |
692 | $ cd g |
|
610 | $ cd g | |
693 | $ hg transplant -s ../d 598410d3eb9a |
|
611 | $ hg transplant -s ../d 598410d3eb9a | |
694 | searching for changes |
|
612 | searching for changes | |
695 | searching for changes |
|
613 | searching for changes | |
696 | adding changesets |
|
614 | adding changesets | |
697 | adding manifests |
|
615 | adding manifests | |
698 | adding file changes |
|
616 | adding file changes | |
699 | added 1 changesets with 2 changes to 2 files |
|
617 | added 1 changesets with 2 changes to 2 files | |
700 | getting changed largefiles |
|
618 | getting changed largefiles | |
701 | 1 largefiles updated, 0 removed |
|
619 | 1 largefiles updated, 0 removed | |
702 | $ hg log --template '{rev}:{node|short} {desc|firstline}\n' |
|
620 | $ hg log --template '{rev}:{node|short} {desc|firstline}\n' | |
703 | 9:598410d3eb9a modify normal file largefile in repo d |
|
621 | 9:598410d3eb9a modify normal file largefile in repo d | |
704 | 8:a381d2c8c80e modify normal file and largefile in repo b |
|
622 | 8:a381d2c8c80e modify normal file and largefile in repo b | |
705 | 7:daea875e9014 add/edit more largefiles |
|
623 | 7:daea875e9014 add/edit more largefiles | |
706 | 6:4355d653f84f edit files yet again |
|
624 | 6:4355d653f84f edit files yet again | |
707 | 5:9d5af5072dbd edit files again |
|
625 | 5:9d5af5072dbd edit files again | |
708 | 4:74c02385b94c move files |
|
626 | 4:74c02385b94c move files | |
709 | 3:9e8fbc4bce62 copy files |
|
627 | 3:9e8fbc4bce62 copy files | |
710 | 2:51a0ae4d5864 remove files |
|
628 | 2:51a0ae4d5864 remove files | |
711 | 1:ce8896473775 edit files |
|
629 | 1:ce8896473775 edit files | |
712 | 0:30d30fe6a5be add files |
|
630 | 0:30d30fe6a5be add files | |
713 | $ cat normal3 |
|
631 | $ cat normal3 | |
714 | normal3-modified |
|
632 | normal3-modified | |
715 | $ cat sub/normal4 |
|
633 | $ cat sub/normal4 | |
716 | normal4-modified |
|
634 | normal4-modified | |
717 | $ cat sub/large4 |
|
635 | $ cat sub/large4 | |
718 | large4-modified |
|
636 | large4-modified | |
719 | $ cat sub2/large6 |
|
637 | $ cat sub2/large6 | |
720 | large6-modified |
|
638 | large6-modified | |
721 | $ cat sub2/large7 |
|
639 | $ cat sub2/large7 | |
722 | large7 |
|
640 | large7 | |
723 |
|
641 | |||
724 | Test that renaming a largefile results in correct output for status |
|
642 | Test that renaming a largefile results in correct output for status | |
725 |
|
643 | |||
726 | $ hg rename sub/large4 large4-renamed |
|
644 | $ hg rename sub/large4 large4-renamed | |
727 | $ hg st |
|
645 | $ hg st | |
728 | A large4-renamed |
|
646 | A large4-renamed | |
729 | R sub/large4 |
|
647 | R sub/large4 | |
730 | $ hg commit -m "test rename output" |
|
648 | $ hg commit -m "test rename output" | |
731 | $ cat large4-renamed |
|
649 | $ cat large4-renamed | |
732 | large4-modified |
|
650 | large4-modified | |
733 | $ cd sub2 |
|
651 | $ cd sub2 | |
734 | $ hg rename large6 large6-renamed |
|
652 | $ hg rename large6 large6-renamed | |
735 | $ hg st |
|
653 | $ hg st | |
736 | A sub2/large6-renamed |
|
654 | A sub2/large6-renamed | |
737 | R sub2/large6 |
|
655 | R sub2/large6 | |
738 | $ cd ../.. |
|
656 | $ cd ../.. | |
739 |
|
657 | |||
740 | vanilla clients not locked out from largefiles servers on vanilla repos |
|
658 | vanilla clients not locked out from largefiles servers on vanilla repos | |
741 | $ mkdir r1 |
|
659 | $ mkdir r1 | |
742 | $ cd r1 |
|
660 | $ cd r1 | |
743 | $ hg init |
|
661 | $ hg init | |
744 | $ echo c1 > f1 |
|
662 | $ echo c1 > f1 | |
745 | $ hg add f1 |
|
663 | $ hg add f1 | |
746 | $ hg com -m "m1" |
|
664 | $ hg com -m "m1" | |
747 | $ cd .. |
|
665 | $ cd .. | |
748 | $ hg serve -R r1 -d -p $HGPORT --pid-file hg.pid |
|
666 | $ hg serve -R r1 -d -p $HGPORT --pid-file hg.pid | |
749 | $ cat hg.pid >> $DAEMON_PIDS |
|
667 | $ cat hg.pid >> $DAEMON_PIDS | |
750 | $ hg --config extensions.largefiles=! clone http://localhost:$HGPORT r2 |
|
668 | $ hg --config extensions.largefiles=! clone http://localhost:$HGPORT r2 | |
751 | requesting all changes |
|
669 | requesting all changes | |
752 | adding changesets |
|
670 | adding changesets | |
753 | adding manifests |
|
671 | adding manifests | |
754 | adding file changes |
|
672 | adding file changes | |
755 | added 1 changesets with 1 changes to 1 files |
|
673 | added 1 changesets with 1 changes to 1 files | |
756 | updating to branch default |
|
674 | updating to branch default | |
757 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
675 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
758 |
|
676 | |||
759 | largefiles clients still work with vanilla servers |
|
677 | largefiles clients still work with vanilla servers | |
760 | $ hg --config extensions.largefiles=! serve -R r1 -d -p $HGPORT1 --pid-file hg.pid |
|
678 | $ hg --config extensions.largefiles=! serve -R r1 -d -p $HGPORT1 --pid-file hg.pid | |
761 | $ cat hg.pid >> $DAEMON_PIDS |
|
679 | $ cat hg.pid >> $DAEMON_PIDS | |
762 | $ hg clone http://localhost:$HGPORT1 r3 |
|
680 | $ hg clone http://localhost:$HGPORT1 r3 | |
763 | requesting all changes |
|
681 | requesting all changes | |
764 | adding changesets |
|
682 | adding changesets | |
765 | adding manifests |
|
683 | adding manifests | |
766 | adding file changes |
|
684 | adding file changes | |
767 | added 1 changesets with 1 changes to 1 files |
|
685 | added 1 changesets with 1 changes to 1 files | |
768 | updating to branch default |
|
686 | updating to branch default | |
769 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
687 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
770 |
|
688 | |||
771 | vanilla clients locked out from largefiles http repos |
|
689 | vanilla clients locked out from largefiles http repos | |
772 | $ mkdir r4 |
|
690 | $ mkdir r4 | |
773 | $ cd r4 |
|
691 | $ cd r4 | |
774 | $ hg init |
|
692 | $ hg init | |
775 | $ echo c1 > f1 |
|
693 | $ echo c1 > f1 | |
776 | $ hg add --large f1 |
|
694 | $ hg add --large f1 | |
777 | $ hg com -m "m1" |
|
695 | $ hg com -m "m1" | |
778 | $ cd .. |
|
696 | $ cd .. | |
779 | $ hg serve -R r4 -d -p $HGPORT2 --pid-file hg.pid |
|
697 | $ hg serve -R r4 -d -p $HGPORT2 --pid-file hg.pid | |
780 | $ cat hg.pid >> $DAEMON_PIDS |
|
698 | $ cat hg.pid >> $DAEMON_PIDS | |
781 | $ hg --config extensions.largefiles=! clone http://localhost:$HGPORT2 r5 |
|
699 | $ hg --config extensions.largefiles=! clone http://localhost:$HGPORT2 r5 | |
782 | abort: remote error: |
|
700 | abort: remote error: | |
783 |
|
701 | |||
784 | This repository uses the largefiles extension. |
|
702 | This repository uses the largefiles extension. | |
785 |
|
703 | |||
786 | Please enable it in your Mercurial config file. |
|
704 | Please enable it in your Mercurial config file. | |
787 | [255] |
|
705 | [255] | |
788 |
|
706 | |||
789 | used all HGPORTs, kill all daemons |
|
707 | used all HGPORTs, kill all daemons | |
790 | $ "$TESTDIR/killdaemons.py" |
|
708 | $ "$TESTDIR/killdaemons.py" | |
791 |
|
709 | |||
792 | vanilla clients locked out from largefiles ssh repos |
|
710 | vanilla clients locked out from largefiles ssh repos | |
793 | $ hg --config extensions.largefiles=! clone -e "python $TESTDIR/dummyssh" ssh://user@dummy/r4 r5 |
|
711 | $ hg --config extensions.largefiles=! clone -e "python $TESTDIR/dummyssh" ssh://user@dummy/r4 r5 | |
794 | abort: remote error: |
|
712 | abort: remote error: | |
795 |
|
713 | |||
796 | This repository uses the largefiles extension. |
|
714 | This repository uses the largefiles extension. | |
797 |
|
715 | |||
798 | Please enable it in your Mercurial config file. |
|
716 | Please enable it in your Mercurial config file. | |
799 | [255] |
|
717 | [255] | |
800 |
|
718 | |||
801 | largefiles clients refuse to push largefiles repos to vanilla servers |
|
719 | largefiles clients refuse to push largefiles repos to vanilla servers | |
802 | $ mkdir r6 |
|
720 | $ mkdir r6 | |
803 | $ cd r6 |
|
721 | $ cd r6 | |
804 | $ hg init |
|
722 | $ hg init | |
805 | $ echo c1 > f1 |
|
723 | $ echo c1 > f1 | |
806 | $ hg add f1 |
|
724 | $ hg add f1 | |
807 | $ hg com -m "m1" |
|
725 | $ hg com -m "m1" | |
808 | $ cat >> .hg/hgrc <<! |
|
726 | $ cat >> .hg/hgrc <<! | |
809 | > [web] |
|
727 | > [web] | |
810 | > push_ssl = false |
|
728 | > push_ssl = false | |
811 | > allow_push = * |
|
729 | > allow_push = * | |
812 | > ! |
|
730 | > ! | |
813 | $ cd .. |
|
731 | $ cd .. | |
814 | $ hg clone r6 r7 |
|
732 | $ hg clone r6 r7 | |
815 | updating to branch default |
|
733 | updating to branch default | |
816 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
734 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
817 | $ cd r7 |
|
735 | $ cd r7 | |
818 | $ echo c2 > f2 |
|
736 | $ echo c2 > f2 | |
819 | $ hg add --large f2 |
|
737 | $ hg add --large f2 | |
820 | $ hg com -m "m2" |
|
738 | $ hg com -m "m2" | |
821 | $ hg --config extensions.largefiles=! -R ../r6 serve -d -p $HGPORT --pid-file ../hg.pid |
|
739 | $ hg --config extensions.largefiles=! -R ../r6 serve -d -p $HGPORT --pid-file ../hg.pid | |
822 | $ cat ../hg.pid >> $DAEMON_PIDS |
|
740 | $ cat ../hg.pid >> $DAEMON_PIDS | |
823 | $ hg push http://localhost:$HGPORT |
|
741 | $ hg push http://localhost:$HGPORT | |
824 | pushing to http://localhost:$HGPORT/ |
|
742 | pushing to http://localhost:$HGPORT/ | |
825 | searching for changes |
|
743 | searching for changes | |
826 | abort: http://localhost:$HGPORT/ does not appear to be a largefile store |
|
744 | abort: http://localhost:$HGPORT/ does not appear to be a largefile store | |
827 | [255] |
|
745 | [255] | |
828 | $ cd .. |
|
746 | $ cd .. | |
829 |
|
747 | |||
830 | putlfile errors are shown (issue3123) |
|
748 | putlfile errors are shown (issue3123) | |
831 | Corrupt the cached largefile in r7 |
|
749 | Corrupt the cached largefile in r7 | |
832 | $ echo corruption > $USERCACHE/4cdac4d8b084d0b599525cf732437fb337d422a8 |
|
750 | $ echo corruption > $USERCACHE/4cdac4d8b084d0b599525cf732437fb337d422a8 | |
833 | $ hg init empty |
|
751 | $ hg init empty | |
834 | $ hg serve -R empty -d -p $HGPORT1 --pid-file hg.pid \ |
|
752 | $ hg serve -R empty -d -p $HGPORT1 --pid-file hg.pid \ | |
835 | > --config 'web.allow_push=*' --config web.push_ssl=False |
|
753 | > --config 'web.allow_push=*' --config web.push_ssl=False | |
836 | $ cat hg.pid >> $DAEMON_PIDS |
|
754 | $ cat hg.pid >> $DAEMON_PIDS | |
837 | $ hg push -R r7 http://localhost:$HGPORT1 |
|
755 | $ hg push -R r7 http://localhost:$HGPORT1 | |
838 | pushing to http://localhost:$HGPORT1/ |
|
756 | pushing to http://localhost:$HGPORT1/ | |
839 | searching for changes |
|
757 | searching for changes | |
840 | remote: largefiles: failed to put 4cdac4d8b084d0b599525cf732437fb337d422a8 into store: largefile contents do not match hash |
|
758 | remote: largefiles: failed to put 4cdac4d8b084d0b599525cf732437fb337d422a8 into store: largefile contents do not match hash | |
841 | abort: remotestore: could not put $TESTTMP/r7/.hg/largefiles/4cdac4d8b084d0b599525cf732437fb337d422a8 to remote store http://localhost:$HGPORT1/ |
|
759 | abort: remotestore: could not put $TESTTMP/r7/.hg/largefiles/4cdac4d8b084d0b599525cf732437fb337d422a8 to remote store http://localhost:$HGPORT1/ | |
842 | [255] |
|
760 | [255] | |
843 | $ rm -rf empty |
|
761 | $ rm -rf empty | |
844 |
|
762 | |||
845 | Clone a local repository owned by another user |
|
763 | Clone a local repository owned by another user | |
846 | We have to simulate that here by setting $HOME and removing write permissions |
|
764 | We have to simulate that here by setting $HOME and removing write permissions | |
847 | $ ORIGHOME="$HOME" |
|
765 | $ ORIGHOME="$HOME" | |
848 | $ mkdir alice |
|
766 | $ mkdir alice | |
849 | $ HOME="`pwd`/alice" |
|
767 | $ HOME="`pwd`/alice" | |
850 | $ cd alice |
|
768 | $ cd alice | |
851 | $ hg init pubrepo |
|
769 | $ hg init pubrepo | |
852 | $ cd pubrepo |
|
770 | $ cd pubrepo | |
853 | $ dd if=/dev/urandom bs=1k count=11k > a-large-file 2> /dev/null |
|
771 | $ dd if=/dev/urandom bs=1k count=11k > a-large-file 2> /dev/null | |
854 | $ hg add --large a-large-file |
|
772 | $ hg add --large a-large-file | |
855 | $ hg commit -m "Add a large file" |
|
773 | $ hg commit -m "Add a large file" | |
856 | $ cd .. |
|
774 | $ cd .. | |
857 | $ chmod -R a-w pubrepo |
|
775 | $ chmod -R a-w pubrepo | |
858 | $ cd .. |
|
776 | $ cd .. | |
859 | $ mkdir bob |
|
777 | $ mkdir bob | |
860 | $ HOME="`pwd`/bob" |
|
778 | $ HOME="`pwd`/bob" | |
861 | $ cd bob |
|
779 | $ cd bob | |
862 | $ hg clone --pull ../alice/pubrepo pubrepo |
|
780 | $ hg clone --pull ../alice/pubrepo pubrepo | |
863 | requesting all changes |
|
781 | requesting all changes | |
864 | adding changesets |
|
782 | adding changesets | |
865 | adding manifests |
|
783 | adding manifests | |
866 | adding file changes |
|
784 | adding file changes | |
867 | added 1 changesets with 1 changes to 1 files |
|
785 | added 1 changesets with 1 changes to 1 files | |
868 | updating to branch default |
|
786 | updating to branch default | |
869 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
787 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
870 | getting changed largefiles |
|
788 | getting changed largefiles | |
871 | 1 largefiles updated, 0 removed |
|
789 | 1 largefiles updated, 0 removed | |
872 | $ cd .. |
|
790 | $ cd .. | |
873 | $ chmod -R u+w alice/pubrepo |
|
791 | $ chmod -R u+w alice/pubrepo | |
874 | $ HOME="$ORIGHOME" |
|
792 | $ HOME="$ORIGHOME" | |
875 |
|
793 | |||
876 | Symlink to a large largefile should behave the same as a symlink to a normal file |
|
794 | Symlink to a large largefile should behave the same as a symlink to a normal file | |
877 | $ hg init largesymlink |
|
795 | $ hg init largesymlink | |
878 | $ cd largesymlink |
|
796 | $ cd largesymlink | |
879 | $ dd if=/dev/zero bs=1k count=10k of=largefile 2>/dev/null |
|
797 | $ dd if=/dev/zero bs=1k count=10k of=largefile 2>/dev/null | |
880 | $ hg add --large largefile |
|
798 | $ hg add --large largefile | |
881 | $ hg commit -m "commit a large file" |
|
799 | $ hg commit -m "commit a large file" | |
882 | $ ln -s largefile largelink |
|
800 | $ ln -s largefile largelink | |
883 | $ hg add largelink |
|
801 | $ hg add largelink | |
884 | $ hg commit -m "commit a large symlink" |
|
802 | $ hg commit -m "commit a large symlink" | |
885 | $ rm -f largelink |
|
803 | $ rm -f largelink | |
886 | $ hg up >/dev/null |
|
804 | $ hg up >/dev/null | |
887 | $ test -f largelink |
|
805 | $ test -f largelink | |
888 | [1] |
|
806 | [1] | |
889 | $ test -L largelink |
|
807 | $ test -L largelink | |
890 | [1] |
|
808 | [1] | |
891 | $ rm -f largelink # make next part of the test independent of the previous |
|
809 | $ rm -f largelink # make next part of the test independent of the previous | |
892 | $ hg up -C >/dev/null |
|
810 | $ hg up -C >/dev/null | |
893 | $ test -f largelink |
|
811 | $ test -f largelink | |
894 | $ test -L largelink |
|
812 | $ test -L largelink | |
895 | $ cd .. |
|
813 | $ cd .. | |
896 |
|
814 | |||
897 |
|
815 |
General Comments 0
You need to be logged in to leave comments.
Login now