Show More
@@ -1,504 +1,505 b'' | |||||
1 | # Copyright 2009-2010 Gregory P. Ward |
|
1 | # Copyright 2009-2010 Gregory P. Ward | |
2 | # Copyright 2009-2010 Intelerad Medical Systems Incorporated |
|
2 | # Copyright 2009-2010 Intelerad Medical Systems Incorporated | |
3 | # Copyright 2010-2011 Fog Creek Software |
|
3 | # Copyright 2010-2011 Fog Creek Software | |
4 | # Copyright 2010-2011 Unity Technologies |
|
4 | # Copyright 2010-2011 Unity Technologies | |
5 | # |
|
5 | # | |
6 | # This software may be used and distributed according to the terms of the |
|
6 | # This software may be used and distributed according to the terms of the | |
7 | # GNU General Public License version 2 or any later version. |
|
7 | # GNU General Public License version 2 or any later version. | |
8 |
|
8 | |||
9 | '''setup for largefiles repositories: reposetup''' |
|
9 | '''setup for largefiles repositories: reposetup''' | |
10 | import copy |
|
10 | import copy | |
11 | import types |
|
11 | import types | |
12 | import os |
|
12 | import os | |
13 |
|
13 | |||
14 | from mercurial import context, error, manifest, match as match_, util, \ |
|
14 | from mercurial import context, error, manifest, match as match_, util, \ | |
15 | discovery |
|
15 | discovery | |
16 | from mercurial import node as node_ |
|
16 | from mercurial import node as node_ | |
17 | from mercurial.i18n import _ |
|
17 | from mercurial.i18n import _ | |
18 | from mercurial import localrepo |
|
18 | from mercurial import localrepo | |
19 |
|
19 | |||
20 | import lfcommands |
|
20 | import lfcommands | |
21 | import proto |
|
21 | import proto | |
22 | import lfutil |
|
22 | import lfutil | |
23 |
|
23 | |||
24 | def reposetup(ui, repo): |
|
24 | def reposetup(ui, repo): | |
25 | # wire repositories should be given new wireproto functions but not the |
|
25 | # wire repositories should be given new wireproto functions but not the | |
26 | # other largefiles modifications |
|
26 | # other largefiles modifications | |
27 | if not repo.local(): |
|
27 | if not repo.local(): | |
28 | return proto.wirereposetup(ui, repo) |
|
28 | return proto.wirereposetup(ui, repo) | |
29 |
|
29 | |||
|
30 | origclass = localrepo.localrepository | |||
|
31 | repoclass = repo.__class__ | |||
30 | for name in ('status', 'commitctx', 'commit', 'push'): |
|
32 | for name in ('status', 'commitctx', 'commit', 'push'): | |
31 |
|
|
33 | if (getattr(origclass, name) != getattr(repoclass, name) or | |
32 |
|
|
34 | isinstance(getattr(repo, name), types.FunctionType)): | |
33 | method.func_name == 'wrap'): |
|
|||
34 | ui.warn(_('largefiles: repo method %r appears to have already been' |
|
35 | ui.warn(_('largefiles: repo method %r appears to have already been' | |
35 | ' wrapped by another extension: ' |
|
36 | ' wrapped by another extension: ' | |
36 | 'largefiles may behave incorrectly\n') |
|
37 | 'largefiles may behave incorrectly\n') | |
37 | % name) |
|
38 | % name) | |
38 |
|
39 | |||
39 | class lfilesrepo(repo.__class__): |
|
40 | class lfilesrepo(repo.__class__): | |
40 | lfstatus = False |
|
41 | lfstatus = False | |
41 | def status_nolfiles(self, *args, **kwargs): |
|
42 | def status_nolfiles(self, *args, **kwargs): | |
42 | return super(lfilesrepo, self).status(*args, **kwargs) |
|
43 | return super(lfilesrepo, self).status(*args, **kwargs) | |
43 |
|
44 | |||
44 | # When lfstatus is set, return a context that gives the names |
|
45 | # When lfstatus is set, return a context that gives the names | |
45 | # of largefiles instead of their corresponding standins and |
|
46 | # of largefiles instead of their corresponding standins and | |
46 | # identifies the largefiles as always binary, regardless of |
|
47 | # identifies the largefiles as always binary, regardless of | |
47 | # their actual contents. |
|
48 | # their actual contents. | |
48 | def __getitem__(self, changeid): |
|
49 | def __getitem__(self, changeid): | |
49 | ctx = super(lfilesrepo, self).__getitem__(changeid) |
|
50 | ctx = super(lfilesrepo, self).__getitem__(changeid) | |
50 | if self.lfstatus: |
|
51 | if self.lfstatus: | |
51 | class lfilesmanifestdict(manifest.manifestdict): |
|
52 | class lfilesmanifestdict(manifest.manifestdict): | |
52 | def __contains__(self, filename): |
|
53 | def __contains__(self, filename): | |
53 | if super(lfilesmanifestdict, |
|
54 | if super(lfilesmanifestdict, | |
54 | self).__contains__(filename): |
|
55 | self).__contains__(filename): | |
55 | return True |
|
56 | return True | |
56 | return super(lfilesmanifestdict, |
|
57 | return super(lfilesmanifestdict, | |
57 | self).__contains__(lfutil.standin(filename)) |
|
58 | self).__contains__(lfutil.standin(filename)) | |
58 | class lfilesctx(ctx.__class__): |
|
59 | class lfilesctx(ctx.__class__): | |
59 | def files(self): |
|
60 | def files(self): | |
60 | filenames = super(lfilesctx, self).files() |
|
61 | filenames = super(lfilesctx, self).files() | |
61 | return [lfutil.splitstandin(f) or f for f in filenames] |
|
62 | return [lfutil.splitstandin(f) or f for f in filenames] | |
62 | def manifest(self): |
|
63 | def manifest(self): | |
63 | man1 = super(lfilesctx, self).manifest() |
|
64 | man1 = super(lfilesctx, self).manifest() | |
64 | man1.__class__ = lfilesmanifestdict |
|
65 | man1.__class__ = lfilesmanifestdict | |
65 | return man1 |
|
66 | return man1 | |
66 | def filectx(self, path, fileid=None, filelog=None): |
|
67 | def filectx(self, path, fileid=None, filelog=None): | |
67 | try: |
|
68 | try: | |
68 | if filelog is not None: |
|
69 | if filelog is not None: | |
69 | result = super(lfilesctx, self).filectx( |
|
70 | result = super(lfilesctx, self).filectx( | |
70 | path, fileid, filelog) |
|
71 | path, fileid, filelog) | |
71 | else: |
|
72 | else: | |
72 | result = super(lfilesctx, self).filectx( |
|
73 | result = super(lfilesctx, self).filectx( | |
73 | path, fileid) |
|
74 | path, fileid) | |
74 | except error.LookupError: |
|
75 | except error.LookupError: | |
75 | # Adding a null character will cause Mercurial to |
|
76 | # Adding a null character will cause Mercurial to | |
76 | # identify this as a binary file. |
|
77 | # identify this as a binary file. | |
77 | if filelog is not None: |
|
78 | if filelog is not None: | |
78 | result = super(lfilesctx, self).filectx( |
|
79 | result = super(lfilesctx, self).filectx( | |
79 | lfutil.standin(path), fileid, filelog) |
|
80 | lfutil.standin(path), fileid, filelog) | |
80 | else: |
|
81 | else: | |
81 | result = super(lfilesctx, self).filectx( |
|
82 | result = super(lfilesctx, self).filectx( | |
82 | lfutil.standin(path), fileid) |
|
83 | lfutil.standin(path), fileid) | |
83 | olddata = result.data |
|
84 | olddata = result.data | |
84 | result.data = lambda: olddata() + '\0' |
|
85 | result.data = lambda: olddata() + '\0' | |
85 | return result |
|
86 | return result | |
86 | ctx.__class__ = lfilesctx |
|
87 | ctx.__class__ = lfilesctx | |
87 | return ctx |
|
88 | return ctx | |
88 |
|
89 | |||
89 | # Figure out the status of big files and insert them into the |
|
90 | # Figure out the status of big files and insert them into the | |
90 | # appropriate list in the result. Also removes standin files |
|
91 | # appropriate list in the result. Also removes standin files | |
91 | # from the listing. Revert to the original status if |
|
92 | # from the listing. Revert to the original status if | |
92 | # self.lfstatus is False. |
|
93 | # self.lfstatus is False. | |
93 | # XXX large file status is buggy when used on repo proxy. |
|
94 | # XXX large file status is buggy when used on repo proxy. | |
94 | # XXX this needs to be investigated. |
|
95 | # XXX this needs to be investigated. | |
95 | @localrepo.unfilteredmethod |
|
96 | @localrepo.unfilteredmethod | |
96 | def status(self, node1='.', node2=None, match=None, ignored=False, |
|
97 | def status(self, node1='.', node2=None, match=None, ignored=False, | |
97 | clean=False, unknown=False, listsubrepos=False): |
|
98 | clean=False, unknown=False, listsubrepos=False): | |
98 | listignored, listclean, listunknown = ignored, clean, unknown |
|
99 | listignored, listclean, listunknown = ignored, clean, unknown | |
99 | if not self.lfstatus: |
|
100 | if not self.lfstatus: | |
100 | return super(lfilesrepo, self).status(node1, node2, match, |
|
101 | return super(lfilesrepo, self).status(node1, node2, match, | |
101 | listignored, listclean, listunknown, listsubrepos) |
|
102 | listignored, listclean, listunknown, listsubrepos) | |
102 | else: |
|
103 | else: | |
103 | # some calls in this function rely on the old version of status |
|
104 | # some calls in this function rely on the old version of status | |
104 | self.lfstatus = False |
|
105 | self.lfstatus = False | |
105 | if isinstance(node1, context.changectx): |
|
106 | if isinstance(node1, context.changectx): | |
106 | ctx1 = node1 |
|
107 | ctx1 = node1 | |
107 | else: |
|
108 | else: | |
108 | ctx1 = self[node1] |
|
109 | ctx1 = self[node1] | |
109 | if isinstance(node2, context.changectx): |
|
110 | if isinstance(node2, context.changectx): | |
110 | ctx2 = node2 |
|
111 | ctx2 = node2 | |
111 | else: |
|
112 | else: | |
112 | ctx2 = self[node2] |
|
113 | ctx2 = self[node2] | |
113 | working = ctx2.rev() is None |
|
114 | working = ctx2.rev() is None | |
114 | parentworking = working and ctx1 == self['.'] |
|
115 | parentworking = working and ctx1 == self['.'] | |
115 |
|
116 | |||
116 | def inctx(file, ctx): |
|
117 | def inctx(file, ctx): | |
117 | try: |
|
118 | try: | |
118 | if ctx.rev() is None: |
|
119 | if ctx.rev() is None: | |
119 | return file in ctx.manifest() |
|
120 | return file in ctx.manifest() | |
120 | ctx[file] |
|
121 | ctx[file] | |
121 | return True |
|
122 | return True | |
122 | except KeyError: |
|
123 | except KeyError: | |
123 | return False |
|
124 | return False | |
124 |
|
125 | |||
125 | if match is None: |
|
126 | if match is None: | |
126 | match = match_.always(self.root, self.getcwd()) |
|
127 | match = match_.always(self.root, self.getcwd()) | |
127 |
|
128 | |||
128 | # First check if there were files specified on the |
|
129 | # First check if there were files specified on the | |
129 | # command line. If there were, and none of them were |
|
130 | # command line. If there were, and none of them were | |
130 | # largefiles, we should just bail here and let super |
|
131 | # largefiles, we should just bail here and let super | |
131 | # handle it -- thus gaining a big performance boost. |
|
132 | # handle it -- thus gaining a big performance boost. | |
132 | lfdirstate = lfutil.openlfdirstate(ui, self) |
|
133 | lfdirstate = lfutil.openlfdirstate(ui, self) | |
133 | if match.files() and not match.anypats(): |
|
134 | if match.files() and not match.anypats(): | |
134 | for f in lfdirstate: |
|
135 | for f in lfdirstate: | |
135 | if match(f): |
|
136 | if match(f): | |
136 | break |
|
137 | break | |
137 | else: |
|
138 | else: | |
138 | return super(lfilesrepo, self).status(node1, node2, |
|
139 | return super(lfilesrepo, self).status(node1, node2, | |
139 | match, listignored, listclean, |
|
140 | match, listignored, listclean, | |
140 | listunknown, listsubrepos) |
|
141 | listunknown, listsubrepos) | |
141 |
|
142 | |||
142 | # Create a copy of match that matches standins instead |
|
143 | # Create a copy of match that matches standins instead | |
143 | # of largefiles. |
|
144 | # of largefiles. | |
144 | def tostandins(files): |
|
145 | def tostandins(files): | |
145 | if not working: |
|
146 | if not working: | |
146 | return files |
|
147 | return files | |
147 | newfiles = [] |
|
148 | newfiles = [] | |
148 | dirstate = self.dirstate |
|
149 | dirstate = self.dirstate | |
149 | for f in files: |
|
150 | for f in files: | |
150 | sf = lfutil.standin(f) |
|
151 | sf = lfutil.standin(f) | |
151 | if sf in dirstate: |
|
152 | if sf in dirstate: | |
152 | newfiles.append(sf) |
|
153 | newfiles.append(sf) | |
153 | elif sf in dirstate.dirs(): |
|
154 | elif sf in dirstate.dirs(): | |
154 | # Directory entries could be regular or |
|
155 | # Directory entries could be regular or | |
155 | # standin, check both |
|
156 | # standin, check both | |
156 | newfiles.extend((f, sf)) |
|
157 | newfiles.extend((f, sf)) | |
157 | else: |
|
158 | else: | |
158 | newfiles.append(f) |
|
159 | newfiles.append(f) | |
159 | return newfiles |
|
160 | return newfiles | |
160 |
|
161 | |||
161 | m = copy.copy(match) |
|
162 | m = copy.copy(match) | |
162 | m._files = tostandins(m._files) |
|
163 | m._files = tostandins(m._files) | |
163 |
|
164 | |||
164 | result = super(lfilesrepo, self).status(node1, node2, m, |
|
165 | result = super(lfilesrepo, self).status(node1, node2, m, | |
165 | ignored, clean, unknown, listsubrepos) |
|
166 | ignored, clean, unknown, listsubrepos) | |
166 | if working: |
|
167 | if working: | |
167 |
|
168 | |||
168 | def sfindirstate(f): |
|
169 | def sfindirstate(f): | |
169 | sf = lfutil.standin(f) |
|
170 | sf = lfutil.standin(f) | |
170 | dirstate = self.dirstate |
|
171 | dirstate = self.dirstate | |
171 | return sf in dirstate or sf in dirstate.dirs() |
|
172 | return sf in dirstate or sf in dirstate.dirs() | |
172 |
|
173 | |||
173 | match._files = [f for f in match._files |
|
174 | match._files = [f for f in match._files | |
174 | if sfindirstate(f)] |
|
175 | if sfindirstate(f)] | |
175 | # Don't waste time getting the ignored and unknown |
|
176 | # Don't waste time getting the ignored and unknown | |
176 | # files from lfdirstate |
|
177 | # files from lfdirstate | |
177 | s = lfdirstate.status(match, [], False, |
|
178 | s = lfdirstate.status(match, [], False, | |
178 | listclean, False) |
|
179 | listclean, False) | |
179 | (unsure, modified, added, removed, missing, _unknown, |
|
180 | (unsure, modified, added, removed, missing, _unknown, | |
180 | _ignored, clean) = s |
|
181 | _ignored, clean) = s | |
181 | if parentworking: |
|
182 | if parentworking: | |
182 | for lfile in unsure: |
|
183 | for lfile in unsure: | |
183 | standin = lfutil.standin(lfile) |
|
184 | standin = lfutil.standin(lfile) | |
184 | if standin not in ctx1: |
|
185 | if standin not in ctx1: | |
185 | # from second parent |
|
186 | # from second parent | |
186 | modified.append(lfile) |
|
187 | modified.append(lfile) | |
187 | elif ctx1[standin].data().strip() \ |
|
188 | elif ctx1[standin].data().strip() \ | |
188 | != lfutil.hashfile(self.wjoin(lfile)): |
|
189 | != lfutil.hashfile(self.wjoin(lfile)): | |
189 | modified.append(lfile) |
|
190 | modified.append(lfile) | |
190 | else: |
|
191 | else: | |
191 | clean.append(lfile) |
|
192 | clean.append(lfile) | |
192 | lfdirstate.normal(lfile) |
|
193 | lfdirstate.normal(lfile) | |
193 | else: |
|
194 | else: | |
194 | tocheck = unsure + modified + added + clean |
|
195 | tocheck = unsure + modified + added + clean | |
195 | modified, added, clean = [], [], [] |
|
196 | modified, added, clean = [], [], [] | |
196 |
|
197 | |||
197 | for lfile in tocheck: |
|
198 | for lfile in tocheck: | |
198 | standin = lfutil.standin(lfile) |
|
199 | standin = lfutil.standin(lfile) | |
199 | if inctx(standin, ctx1): |
|
200 | if inctx(standin, ctx1): | |
200 | if ctx1[standin].data().strip() != \ |
|
201 | if ctx1[standin].data().strip() != \ | |
201 | lfutil.hashfile(self.wjoin(lfile)): |
|
202 | lfutil.hashfile(self.wjoin(lfile)): | |
202 | modified.append(lfile) |
|
203 | modified.append(lfile) | |
203 | else: |
|
204 | else: | |
204 | clean.append(lfile) |
|
205 | clean.append(lfile) | |
205 | else: |
|
206 | else: | |
206 | added.append(lfile) |
|
207 | added.append(lfile) | |
207 |
|
208 | |||
208 | # Standins no longer found in lfdirstate has been removed |
|
209 | # Standins no longer found in lfdirstate has been removed | |
209 | for standin in ctx1.manifest(): |
|
210 | for standin in ctx1.manifest(): | |
210 | if not lfutil.isstandin(standin): |
|
211 | if not lfutil.isstandin(standin): | |
211 | continue |
|
212 | continue | |
212 | lfile = lfutil.splitstandin(standin) |
|
213 | lfile = lfutil.splitstandin(standin) | |
213 | if not match(lfile): |
|
214 | if not match(lfile): | |
214 | continue |
|
215 | continue | |
215 | if lfile not in lfdirstate: |
|
216 | if lfile not in lfdirstate: | |
216 | removed.append(lfile) |
|
217 | removed.append(lfile) | |
217 |
|
218 | |||
218 | # Filter result lists |
|
219 | # Filter result lists | |
219 | result = list(result) |
|
220 | result = list(result) | |
220 |
|
221 | |||
221 | # Largefiles are not really removed when they're |
|
222 | # Largefiles are not really removed when they're | |
222 | # still in the normal dirstate. Likewise, normal |
|
223 | # still in the normal dirstate. Likewise, normal | |
223 | # files are not really removed if they are still in |
|
224 | # files are not really removed if they are still in | |
224 | # lfdirstate. This happens in merges where files |
|
225 | # lfdirstate. This happens in merges where files | |
225 | # change type. |
|
226 | # change type. | |
226 | removed = [f for f in removed if f not in self.dirstate] |
|
227 | removed = [f for f in removed if f not in self.dirstate] | |
227 | result[2] = [f for f in result[2] if f not in lfdirstate] |
|
228 | result[2] = [f for f in result[2] if f not in lfdirstate] | |
228 |
|
229 | |||
229 | lfiles = set(lfdirstate._map) |
|
230 | lfiles = set(lfdirstate._map) | |
230 | # Unknown files |
|
231 | # Unknown files | |
231 | result[4] = set(result[4]).difference(lfiles) |
|
232 | result[4] = set(result[4]).difference(lfiles) | |
232 | # Ignored files |
|
233 | # Ignored files | |
233 | result[5] = set(result[5]).difference(lfiles) |
|
234 | result[5] = set(result[5]).difference(lfiles) | |
234 | # combine normal files and largefiles |
|
235 | # combine normal files and largefiles | |
235 | normals = [[fn for fn in filelist |
|
236 | normals = [[fn for fn in filelist | |
236 | if not lfutil.isstandin(fn)] |
|
237 | if not lfutil.isstandin(fn)] | |
237 | for filelist in result] |
|
238 | for filelist in result] | |
238 | lfiles = (modified, added, removed, missing, [], [], clean) |
|
239 | lfiles = (modified, added, removed, missing, [], [], clean) | |
239 | result = [sorted(list1 + list2) |
|
240 | result = [sorted(list1 + list2) | |
240 | for (list1, list2) in zip(normals, lfiles)] |
|
241 | for (list1, list2) in zip(normals, lfiles)] | |
241 | else: |
|
242 | else: | |
242 | def toname(f): |
|
243 | def toname(f): | |
243 | if lfutil.isstandin(f): |
|
244 | if lfutil.isstandin(f): | |
244 | return lfutil.splitstandin(f) |
|
245 | return lfutil.splitstandin(f) | |
245 | return f |
|
246 | return f | |
246 | result = [[toname(f) for f in items] for items in result] |
|
247 | result = [[toname(f) for f in items] for items in result] | |
247 |
|
248 | |||
248 | lfdirstate.write() |
|
249 | lfdirstate.write() | |
249 |
|
250 | |||
250 | if not listunknown: |
|
251 | if not listunknown: | |
251 | result[4] = [] |
|
252 | result[4] = [] | |
252 | if not listignored: |
|
253 | if not listignored: | |
253 | result[5] = [] |
|
254 | result[5] = [] | |
254 | if not listclean: |
|
255 | if not listclean: | |
255 | result[6] = [] |
|
256 | result[6] = [] | |
256 | self.lfstatus = True |
|
257 | self.lfstatus = True | |
257 | return result |
|
258 | return result | |
258 |
|
259 | |||
259 | # As part of committing, copy all of the largefiles into the |
|
260 | # As part of committing, copy all of the largefiles into the | |
260 | # cache. |
|
261 | # cache. | |
261 | def commitctx(self, *args, **kwargs): |
|
262 | def commitctx(self, *args, **kwargs): | |
262 | node = super(lfilesrepo, self).commitctx(*args, **kwargs) |
|
263 | node = super(lfilesrepo, self).commitctx(*args, **kwargs) | |
263 | lfutil.copyalltostore(self, node) |
|
264 | lfutil.copyalltostore(self, node) | |
264 | return node |
|
265 | return node | |
265 |
|
266 | |||
266 | # Before commit, largefile standins have not had their |
|
267 | # Before commit, largefile standins have not had their | |
267 | # contents updated to reflect the hash of their largefile. |
|
268 | # contents updated to reflect the hash of their largefile. | |
268 | # Do that here. |
|
269 | # Do that here. | |
269 | def commit(self, text="", user=None, date=None, match=None, |
|
270 | def commit(self, text="", user=None, date=None, match=None, | |
270 | force=False, editor=False, extra={}): |
|
271 | force=False, editor=False, extra={}): | |
271 | orig = super(lfilesrepo, self).commit |
|
272 | orig = super(lfilesrepo, self).commit | |
272 |
|
273 | |||
273 | wlock = self.wlock() |
|
274 | wlock = self.wlock() | |
274 | try: |
|
275 | try: | |
275 | # Case 0: Rebase or Transplant |
|
276 | # Case 0: Rebase or Transplant | |
276 | # We have to take the time to pull down the new largefiles now. |
|
277 | # We have to take the time to pull down the new largefiles now. | |
277 | # Otherwise, any largefiles that were modified in the |
|
278 | # Otherwise, any largefiles that were modified in the | |
278 | # destination changesets get overwritten, either by the rebase |
|
279 | # destination changesets get overwritten, either by the rebase | |
279 | # or in the first commit after the rebase or transplant. |
|
280 | # or in the first commit after the rebase or transplant. | |
280 | # updatelfiles will update the dirstate to mark any pulled |
|
281 | # updatelfiles will update the dirstate to mark any pulled | |
281 | # largefiles as modified |
|
282 | # largefiles as modified | |
282 | if getattr(self, "_isrebasing", False) or \ |
|
283 | if getattr(self, "_isrebasing", False) or \ | |
283 | getattr(self, "_istransplanting", False): |
|
284 | getattr(self, "_istransplanting", False): | |
284 | lfcommands.updatelfiles(self.ui, self, filelist=None, |
|
285 | lfcommands.updatelfiles(self.ui, self, filelist=None, | |
285 | printmessage=False) |
|
286 | printmessage=False) | |
286 | result = orig(text=text, user=user, date=date, match=match, |
|
287 | result = orig(text=text, user=user, date=date, match=match, | |
287 | force=force, editor=editor, extra=extra) |
|
288 | force=force, editor=editor, extra=extra) | |
288 | return result |
|
289 | return result | |
289 | # Case 1: user calls commit with no specific files or |
|
290 | # Case 1: user calls commit with no specific files or | |
290 | # include/exclude patterns: refresh and commit all files that |
|
291 | # include/exclude patterns: refresh and commit all files that | |
291 | # are "dirty". |
|
292 | # are "dirty". | |
292 | if ((match is None) or |
|
293 | if ((match is None) or | |
293 | (not match.anypats() and not match.files())): |
|
294 | (not match.anypats() and not match.files())): | |
294 | # Spend a bit of time here to get a list of files we know |
|
295 | # Spend a bit of time here to get a list of files we know | |
295 | # are modified so we can compare only against those. |
|
296 | # are modified so we can compare only against those. | |
296 | # It can cost a lot of time (several seconds) |
|
297 | # It can cost a lot of time (several seconds) | |
297 | # otherwise to update all standins if the largefiles are |
|
298 | # otherwise to update all standins if the largefiles are | |
298 | # large. |
|
299 | # large. | |
299 | lfdirstate = lfutil.openlfdirstate(ui, self) |
|
300 | lfdirstate = lfutil.openlfdirstate(ui, self) | |
300 | dirtymatch = match_.always(self.root, self.getcwd()) |
|
301 | dirtymatch = match_.always(self.root, self.getcwd()) | |
301 | s = lfdirstate.status(dirtymatch, [], False, False, False) |
|
302 | s = lfdirstate.status(dirtymatch, [], False, False, False) | |
302 | (unsure, modified, added, removed, _missing, _unknown, |
|
303 | (unsure, modified, added, removed, _missing, _unknown, | |
303 | _ignored, _clean) = s |
|
304 | _ignored, _clean) = s | |
304 | modifiedfiles = unsure + modified + added + removed |
|
305 | modifiedfiles = unsure + modified + added + removed | |
305 | lfiles = lfutil.listlfiles(self) |
|
306 | lfiles = lfutil.listlfiles(self) | |
306 | # this only loops through largefiles that exist (not |
|
307 | # this only loops through largefiles that exist (not | |
307 | # removed/renamed) |
|
308 | # removed/renamed) | |
308 | for lfile in lfiles: |
|
309 | for lfile in lfiles: | |
309 | if lfile in modifiedfiles: |
|
310 | if lfile in modifiedfiles: | |
310 | if os.path.exists( |
|
311 | if os.path.exists( | |
311 | self.wjoin(lfutil.standin(lfile))): |
|
312 | self.wjoin(lfutil.standin(lfile))): | |
312 | # this handles the case where a rebase is being |
|
313 | # this handles the case where a rebase is being | |
313 | # performed and the working copy is not updated |
|
314 | # performed and the working copy is not updated | |
314 | # yet. |
|
315 | # yet. | |
315 | if os.path.exists(self.wjoin(lfile)): |
|
316 | if os.path.exists(self.wjoin(lfile)): | |
316 | lfutil.updatestandin(self, |
|
317 | lfutil.updatestandin(self, | |
317 | lfutil.standin(lfile)) |
|
318 | lfutil.standin(lfile)) | |
318 | lfdirstate.normal(lfile) |
|
319 | lfdirstate.normal(lfile) | |
319 |
|
320 | |||
320 | result = orig(text=text, user=user, date=date, match=match, |
|
321 | result = orig(text=text, user=user, date=date, match=match, | |
321 | force=force, editor=editor, extra=extra) |
|
322 | force=force, editor=editor, extra=extra) | |
322 |
|
323 | |||
323 | if result is not None: |
|
324 | if result is not None: | |
324 | for lfile in lfdirstate: |
|
325 | for lfile in lfdirstate: | |
325 | if lfile in modifiedfiles: |
|
326 | if lfile in modifiedfiles: | |
326 | if (not os.path.exists(self.wjoin( |
|
327 | if (not os.path.exists(self.wjoin( | |
327 | lfutil.standin(lfile)))) or \ |
|
328 | lfutil.standin(lfile)))) or \ | |
328 | (not os.path.exists(self.wjoin(lfile))): |
|
329 | (not os.path.exists(self.wjoin(lfile))): | |
329 | lfdirstate.drop(lfile) |
|
330 | lfdirstate.drop(lfile) | |
330 |
|
331 | |||
331 | # This needs to be after commit; otherwise precommit hooks |
|
332 | # This needs to be after commit; otherwise precommit hooks | |
332 | # get the wrong status |
|
333 | # get the wrong status | |
333 | lfdirstate.write() |
|
334 | lfdirstate.write() | |
334 | return result |
|
335 | return result | |
335 |
|
336 | |||
336 | lfiles = lfutil.listlfiles(self) |
|
337 | lfiles = lfutil.listlfiles(self) | |
337 | match._files = self._subdirlfs(match.files(), lfiles) |
|
338 | match._files = self._subdirlfs(match.files(), lfiles) | |
338 |
|
339 | |||
339 | # Case 2: user calls commit with specified patterns: refresh |
|
340 | # Case 2: user calls commit with specified patterns: refresh | |
340 | # any matching big files. |
|
341 | # any matching big files. | |
341 | smatcher = lfutil.composestandinmatcher(self, match) |
|
342 | smatcher = lfutil.composestandinmatcher(self, match) | |
342 | standins = self.dirstate.walk(smatcher, [], False, False) |
|
343 | standins = self.dirstate.walk(smatcher, [], False, False) | |
343 |
|
344 | |||
344 | # No matching big files: get out of the way and pass control to |
|
345 | # No matching big files: get out of the way and pass control to | |
345 | # the usual commit() method. |
|
346 | # the usual commit() method. | |
346 | if not standins: |
|
347 | if not standins: | |
347 | return orig(text=text, user=user, date=date, match=match, |
|
348 | return orig(text=text, user=user, date=date, match=match, | |
348 | force=force, editor=editor, extra=extra) |
|
349 | force=force, editor=editor, extra=extra) | |
349 |
|
350 | |||
350 | # Refresh all matching big files. It's possible that the |
|
351 | # Refresh all matching big files. It's possible that the | |
351 | # commit will end up failing, in which case the big files will |
|
352 | # commit will end up failing, in which case the big files will | |
352 | # stay refreshed. No harm done: the user modified them and |
|
353 | # stay refreshed. No harm done: the user modified them and | |
353 | # asked to commit them, so sooner or later we're going to |
|
354 | # asked to commit them, so sooner or later we're going to | |
354 | # refresh the standins. Might as well leave them refreshed. |
|
355 | # refresh the standins. Might as well leave them refreshed. | |
355 | lfdirstate = lfutil.openlfdirstate(ui, self) |
|
356 | lfdirstate = lfutil.openlfdirstate(ui, self) | |
356 | for standin in standins: |
|
357 | for standin in standins: | |
357 | lfile = lfutil.splitstandin(standin) |
|
358 | lfile = lfutil.splitstandin(standin) | |
358 | if lfdirstate[lfile] != 'r': |
|
359 | if lfdirstate[lfile] != 'r': | |
359 | lfutil.updatestandin(self, standin) |
|
360 | lfutil.updatestandin(self, standin) | |
360 | lfdirstate.normal(lfile) |
|
361 | lfdirstate.normal(lfile) | |
361 | else: |
|
362 | else: | |
362 | lfdirstate.drop(lfile) |
|
363 | lfdirstate.drop(lfile) | |
363 |
|
364 | |||
364 | # Cook up a new matcher that only matches regular files or |
|
365 | # Cook up a new matcher that only matches regular files or | |
365 | # standins corresponding to the big files requested by the |
|
366 | # standins corresponding to the big files requested by the | |
366 | # user. Have to modify _files to prevent commit() from |
|
367 | # user. Have to modify _files to prevent commit() from | |
367 | # complaining "not tracked" for big files. |
|
368 | # complaining "not tracked" for big files. | |
368 | match = copy.copy(match) |
|
369 | match = copy.copy(match) | |
369 | origmatchfn = match.matchfn |
|
370 | origmatchfn = match.matchfn | |
370 |
|
371 | |||
371 | # Check both the list of largefiles and the list of |
|
372 | # Check both the list of largefiles and the list of | |
372 | # standins because if a largefile was removed, it |
|
373 | # standins because if a largefile was removed, it | |
373 | # won't be in the list of largefiles at this point |
|
374 | # won't be in the list of largefiles at this point | |
374 | match._files += sorted(standins) |
|
375 | match._files += sorted(standins) | |
375 |
|
376 | |||
376 | actualfiles = [] |
|
377 | actualfiles = [] | |
377 | for f in match._files: |
|
378 | for f in match._files: | |
378 | fstandin = lfutil.standin(f) |
|
379 | fstandin = lfutil.standin(f) | |
379 |
|
380 | |||
380 | # ignore known largefiles and standins |
|
381 | # ignore known largefiles and standins | |
381 | if f in lfiles or fstandin in standins: |
|
382 | if f in lfiles or fstandin in standins: | |
382 | continue |
|
383 | continue | |
383 |
|
384 | |||
384 | # append directory separator to avoid collisions |
|
385 | # append directory separator to avoid collisions | |
385 | if not fstandin.endswith(os.sep): |
|
386 | if not fstandin.endswith(os.sep): | |
386 | fstandin += os.sep |
|
387 | fstandin += os.sep | |
387 |
|
388 | |||
388 | actualfiles.append(f) |
|
389 | actualfiles.append(f) | |
389 | match._files = actualfiles |
|
390 | match._files = actualfiles | |
390 |
|
391 | |||
391 | def matchfn(f): |
|
392 | def matchfn(f): | |
392 | if origmatchfn(f): |
|
393 | if origmatchfn(f): | |
393 | return f not in lfiles |
|
394 | return f not in lfiles | |
394 | else: |
|
395 | else: | |
395 | return f in standins |
|
396 | return f in standins | |
396 |
|
397 | |||
397 | match.matchfn = matchfn |
|
398 | match.matchfn = matchfn | |
398 | result = orig(text=text, user=user, date=date, match=match, |
|
399 | result = orig(text=text, user=user, date=date, match=match, | |
399 | force=force, editor=editor, extra=extra) |
|
400 | force=force, editor=editor, extra=extra) | |
400 | # This needs to be after commit; otherwise precommit hooks |
|
401 | # This needs to be after commit; otherwise precommit hooks | |
401 | # get the wrong status |
|
402 | # get the wrong status | |
402 | lfdirstate.write() |
|
403 | lfdirstate.write() | |
403 | return result |
|
404 | return result | |
404 | finally: |
|
405 | finally: | |
405 | wlock.release() |
|
406 | wlock.release() | |
406 |
|
407 | |||
407 | def push(self, remote, force=False, revs=None, newbranch=False): |
|
408 | def push(self, remote, force=False, revs=None, newbranch=False): | |
408 | outgoing = discovery.findcommonoutgoing(repo, remote.peer(), |
|
409 | outgoing = discovery.findcommonoutgoing(repo, remote.peer(), | |
409 | force=force) |
|
410 | force=force) | |
410 | if outgoing.missing: |
|
411 | if outgoing.missing: | |
411 | toupload = set() |
|
412 | toupload = set() | |
412 | o = self.changelog.nodesbetween(outgoing.missing, revs)[0] |
|
413 | o = self.changelog.nodesbetween(outgoing.missing, revs)[0] | |
413 | for n in o: |
|
414 | for n in o: | |
414 | parents = [p for p in self.changelog.parents(n) |
|
415 | parents = [p for p in self.changelog.parents(n) | |
415 | if p != node_.nullid] |
|
416 | if p != node_.nullid] | |
416 | ctx = self[n] |
|
417 | ctx = self[n] | |
417 | files = set(ctx.files()) |
|
418 | files = set(ctx.files()) | |
418 | if len(parents) == 2: |
|
419 | if len(parents) == 2: | |
419 | mc = ctx.manifest() |
|
420 | mc = ctx.manifest() | |
420 | mp1 = ctx.parents()[0].manifest() |
|
421 | mp1 = ctx.parents()[0].manifest() | |
421 | mp2 = ctx.parents()[1].manifest() |
|
422 | mp2 = ctx.parents()[1].manifest() | |
422 | for f in mp1: |
|
423 | for f in mp1: | |
423 | if f not in mc: |
|
424 | if f not in mc: | |
424 | files.add(f) |
|
425 | files.add(f) | |
425 | for f in mp2: |
|
426 | for f in mp2: | |
426 | if f not in mc: |
|
427 | if f not in mc: | |
427 | files.add(f) |
|
428 | files.add(f) | |
428 | for f in mc: |
|
429 | for f in mc: | |
429 | if mc[f] != mp1.get(f, None) or mc[f] != mp2.get(f, |
|
430 | if mc[f] != mp1.get(f, None) or mc[f] != mp2.get(f, | |
430 | None): |
|
431 | None): | |
431 | files.add(f) |
|
432 | files.add(f) | |
432 |
|
433 | |||
433 | toupload = toupload.union( |
|
434 | toupload = toupload.union( | |
434 | set([ctx[f].data().strip() |
|
435 | set([ctx[f].data().strip() | |
435 | for f in files |
|
436 | for f in files | |
436 | if lfutil.isstandin(f) and f in ctx])) |
|
437 | if lfutil.isstandin(f) and f in ctx])) | |
437 | lfcommands.uploadlfiles(ui, self, remote, toupload) |
|
438 | lfcommands.uploadlfiles(ui, self, remote, toupload) | |
438 | return super(lfilesrepo, self).push(remote, force, revs, |
|
439 | return super(lfilesrepo, self).push(remote, force, revs, | |
439 | newbranch) |
|
440 | newbranch) | |
440 |
|
441 | |||
441 | def _subdirlfs(self, files, lfiles): |
|
442 | def _subdirlfs(self, files, lfiles): | |
442 | ''' |
|
443 | ''' | |
443 | Adjust matched file list |
|
444 | Adjust matched file list | |
444 | If we pass a directory to commit whose only commitable files |
|
445 | If we pass a directory to commit whose only commitable files | |
445 | are largefiles, the core commit code aborts before finding |
|
446 | are largefiles, the core commit code aborts before finding | |
446 | the largefiles. |
|
447 | the largefiles. | |
447 | So we do the following: |
|
448 | So we do the following: | |
448 | For directories that only have largefiles as matches, |
|
449 | For directories that only have largefiles as matches, | |
449 | we explicitly add the largefiles to the match list and remove |
|
450 | we explicitly add the largefiles to the match list and remove | |
450 | the directory. |
|
451 | the directory. | |
451 | In other cases, we leave the match list unmodified. |
|
452 | In other cases, we leave the match list unmodified. | |
452 | ''' |
|
453 | ''' | |
453 | actualfiles = [] |
|
454 | actualfiles = [] | |
454 | dirs = [] |
|
455 | dirs = [] | |
455 | regulars = [] |
|
456 | regulars = [] | |
456 |
|
457 | |||
457 | for f in files: |
|
458 | for f in files: | |
458 | if lfutil.isstandin(f + '/'): |
|
459 | if lfutil.isstandin(f + '/'): | |
459 | raise util.Abort( |
|
460 | raise util.Abort( | |
460 | _('file "%s" is a largefile standin') % f, |
|
461 | _('file "%s" is a largefile standin') % f, | |
461 | hint=('commit the largefile itself instead')) |
|
462 | hint=('commit the largefile itself instead')) | |
462 | # Scan directories |
|
463 | # Scan directories | |
463 | if os.path.isdir(self.wjoin(f)): |
|
464 | if os.path.isdir(self.wjoin(f)): | |
464 | dirs.append(f) |
|
465 | dirs.append(f) | |
465 | else: |
|
466 | else: | |
466 | regulars.append(f) |
|
467 | regulars.append(f) | |
467 |
|
468 | |||
468 | for f in dirs: |
|
469 | for f in dirs: | |
469 | matcheddir = False |
|
470 | matcheddir = False | |
470 | d = self.dirstate.normalize(f) + '/' |
|
471 | d = self.dirstate.normalize(f) + '/' | |
471 | # Check for matched normal files |
|
472 | # Check for matched normal files | |
472 | for mf in regulars: |
|
473 | for mf in regulars: | |
473 | if self.dirstate.normalize(mf).startswith(d): |
|
474 | if self.dirstate.normalize(mf).startswith(d): | |
474 | actualfiles.append(f) |
|
475 | actualfiles.append(f) | |
475 | matcheddir = True |
|
476 | matcheddir = True | |
476 | break |
|
477 | break | |
477 | if not matcheddir: |
|
478 | if not matcheddir: | |
478 | # If no normal match, manually append |
|
479 | # If no normal match, manually append | |
479 | # any matching largefiles |
|
480 | # any matching largefiles | |
480 | for lf in lfiles: |
|
481 | for lf in lfiles: | |
481 | if self.dirstate.normalize(lf).startswith(d): |
|
482 | if self.dirstate.normalize(lf).startswith(d): | |
482 | actualfiles.append(lf) |
|
483 | actualfiles.append(lf) | |
483 | if not matcheddir: |
|
484 | if not matcheddir: | |
484 | actualfiles.append(lfutil.standin(f)) |
|
485 | actualfiles.append(lfutil.standin(f)) | |
485 | matcheddir = True |
|
486 | matcheddir = True | |
486 | # Nothing in dir, so readd it |
|
487 | # Nothing in dir, so readd it | |
487 | # and let commit reject it |
|
488 | # and let commit reject it | |
488 | if not matcheddir: |
|
489 | if not matcheddir: | |
489 | actualfiles.append(f) |
|
490 | actualfiles.append(f) | |
490 |
|
491 | |||
491 | # Always add normal files |
|
492 | # Always add normal files | |
492 | actualfiles += regulars |
|
493 | actualfiles += regulars | |
493 | return actualfiles |
|
494 | return actualfiles | |
494 |
|
495 | |||
495 | repo.__class__ = lfilesrepo |
|
496 | repo.__class__ = lfilesrepo | |
496 |
|
497 | |||
497 | def checkrequireslfiles(ui, repo, **kwargs): |
|
498 | def checkrequireslfiles(ui, repo, **kwargs): | |
498 | if 'largefiles' not in repo.requirements and util.any( |
|
499 | if 'largefiles' not in repo.requirements and util.any( | |
499 | lfutil.shortname+'/' in f[0] for f in repo.store.datafiles()): |
|
500 | lfutil.shortname+'/' in f[0] for f in repo.store.datafiles()): | |
500 | repo.requirements.add('largefiles') |
|
501 | repo.requirements.add('largefiles') | |
501 | repo._writerequirements() |
|
502 | repo._writerequirements() | |
502 |
|
503 | |||
503 | ui.setconfig('hooks', 'changegroup.lfiles', checkrequireslfiles) |
|
504 | ui.setconfig('hooks', 'changegroup.lfiles', checkrequireslfiles) | |
504 | ui.setconfig('hooks', 'commit.lfiles', checkrequireslfiles) |
|
505 | ui.setconfig('hooks', 'commit.lfiles', checkrequireslfiles) |
@@ -1,2147 +1,2175 b'' | |||||
1 | $ USERCACHE="$TESTTMP/cache"; export USERCACHE |
|
1 | $ USERCACHE="$TESTTMP/cache"; export USERCACHE | |
2 | $ mkdir "${USERCACHE}" |
|
2 | $ mkdir "${USERCACHE}" | |
3 | $ cat >> $HGRCPATH <<EOF |
|
3 | $ cat >> $HGRCPATH <<EOF | |
4 | > [extensions] |
|
4 | > [extensions] | |
5 | > largefiles= |
|
5 | > largefiles= | |
6 | > purge= |
|
6 | > purge= | |
7 | > rebase= |
|
7 | > rebase= | |
8 | > transplant= |
|
8 | > transplant= | |
9 | > [phases] |
|
9 | > [phases] | |
10 | > publish=False |
|
10 | > publish=False | |
11 | > [largefiles] |
|
11 | > [largefiles] | |
12 | > minsize=2 |
|
12 | > minsize=2 | |
13 | > patterns=glob:**.dat |
|
13 | > patterns=glob:**.dat | |
14 | > usercache=${USERCACHE} |
|
14 | > usercache=${USERCACHE} | |
15 | > [hooks] |
|
15 | > [hooks] | |
16 | > precommit=sh -c "echo \\"Invoking status precommit hook\\"; hg status" |
|
16 | > precommit=sh -c "echo \\"Invoking status precommit hook\\"; hg status" | |
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. |
|
20 | files. | |
21 | Test status and dirstate of largefiles and that summary output is correct. |
|
21 | Test status and dirstate of largefiles and that summary output is correct. | |
22 |
|
22 | |||
23 | $ hg init a |
|
23 | $ hg init a | |
24 | $ cd a |
|
24 | $ cd a | |
25 | $ mkdir sub |
|
25 | $ mkdir sub | |
26 | $ echo normal1 > normal1 |
|
26 | $ echo normal1 > normal1 | |
27 | $ echo normal2 > sub/normal2 |
|
27 | $ echo normal2 > sub/normal2 | |
28 | $ echo large1 > large1 |
|
28 | $ echo large1 > large1 | |
29 | $ echo large2 > sub/large2 |
|
29 | $ echo large2 > sub/large2 | |
30 | $ hg add normal1 sub/normal2 |
|
30 | $ hg add normal1 sub/normal2 | |
31 | $ hg add --large large1 sub/large2 |
|
31 | $ hg add --large large1 sub/large2 | |
32 | $ hg commit -m "add files" |
|
32 | $ hg commit -m "add files" | |
33 | Invoking status precommit hook |
|
33 | Invoking status precommit hook | |
34 | A large1 |
|
34 | A large1 | |
35 | A normal1 |
|
35 | A normal1 | |
36 | A sub/large2 |
|
36 | A sub/large2 | |
37 | A sub/normal2 |
|
37 | A sub/normal2 | |
38 | $ touch large1 sub/large2 |
|
38 | $ touch large1 sub/large2 | |
39 | $ sleep 1 |
|
39 | $ sleep 1 | |
40 | $ hg st |
|
40 | $ hg st | |
41 | $ hg debugstate --nodates |
|
41 | $ hg debugstate --nodates | |
42 | n 644 41 .hglf/large1 |
|
42 | n 644 41 .hglf/large1 | |
43 | n 644 41 .hglf/sub/large2 |
|
43 | n 644 41 .hglf/sub/large2 | |
44 | n 644 8 normal1 |
|
44 | n 644 8 normal1 | |
45 | n 644 8 sub/normal2 |
|
45 | n 644 8 sub/normal2 | |
46 | $ hg debugstate --large |
|
46 | $ hg debugstate --large | |
47 | n 644 7 large1 |
|
47 | n 644 7 large1 | |
48 | n 644 7 sub/large2 |
|
48 | n 644 7 sub/large2 | |
49 | $ echo normal11 > normal1 |
|
49 | $ echo normal11 > normal1 | |
50 | $ echo normal22 > sub/normal2 |
|
50 | $ echo normal22 > sub/normal2 | |
51 | $ echo large11 > large1 |
|
51 | $ echo large11 > large1 | |
52 | $ echo large22 > sub/large2 |
|
52 | $ echo large22 > sub/large2 | |
53 | $ hg commit -m "edit files" |
|
53 | $ hg commit -m "edit files" | |
54 | Invoking status precommit hook |
|
54 | Invoking status precommit hook | |
55 | M large1 |
|
55 | M large1 | |
56 | M normal1 |
|
56 | M normal1 | |
57 | M sub/large2 |
|
57 | M sub/large2 | |
58 | M sub/normal2 |
|
58 | M sub/normal2 | |
59 | $ hg sum --large |
|
59 | $ hg sum --large | |
60 | parent: 1:ce8896473775 tip |
|
60 | parent: 1:ce8896473775 tip | |
61 | edit files |
|
61 | edit files | |
62 | branch: default |
|
62 | branch: default | |
63 | commit: (clean) |
|
63 | commit: (clean) | |
64 | update: (current) |
|
64 | update: (current) | |
65 | largefiles: (no remote repo) |
|
65 | largefiles: (no remote repo) | |
66 |
|
66 | |||
67 | Commit preserved largefile contents. |
|
67 | Commit preserved largefile contents. | |
68 |
|
68 | |||
69 | $ cat normal1 |
|
69 | $ cat normal1 | |
70 | normal11 |
|
70 | normal11 | |
71 | $ cat large1 |
|
71 | $ cat large1 | |
72 | large11 |
|
72 | large11 | |
73 | $ cat sub/normal2 |
|
73 | $ cat sub/normal2 | |
74 | normal22 |
|
74 | normal22 | |
75 | $ cat sub/large2 |
|
75 | $ cat sub/large2 | |
76 | large22 |
|
76 | large22 | |
77 |
|
77 | |||
78 | Test status, subdir and unknown files |
|
78 | Test status, subdir and unknown files | |
79 |
|
79 | |||
80 | $ echo unknown > sub/unknown |
|
80 | $ echo unknown > sub/unknown | |
81 | $ hg st --all |
|
81 | $ hg st --all | |
82 | ? sub/unknown |
|
82 | ? sub/unknown | |
83 | C large1 |
|
83 | C large1 | |
84 | C normal1 |
|
84 | C normal1 | |
85 | C sub/large2 |
|
85 | C sub/large2 | |
86 | C sub/normal2 |
|
86 | C sub/normal2 | |
87 | $ hg st --all sub |
|
87 | $ hg st --all sub | |
88 | ? sub/unknown |
|
88 | ? sub/unknown | |
89 | C sub/large2 |
|
89 | C sub/large2 | |
90 | C sub/normal2 |
|
90 | C sub/normal2 | |
91 | $ rm sub/unknown |
|
91 | $ rm sub/unknown | |
92 |
|
92 | |||
93 | Test messages and exit codes for remove warning cases |
|
93 | Test messages and exit codes for remove warning cases | |
94 |
|
94 | |||
95 | $ hg remove -A large1 |
|
95 | $ hg remove -A large1 | |
96 | not removing large1: file still exists |
|
96 | not removing large1: file still exists | |
97 | [1] |
|
97 | [1] | |
98 | $ echo 'modified' > large1 |
|
98 | $ echo 'modified' > large1 | |
99 | $ hg remove large1 |
|
99 | $ hg remove large1 | |
100 | not removing large1: file is modified (use -f to force removal) |
|
100 | not removing large1: file is modified (use -f to force removal) | |
101 | [1] |
|
101 | [1] | |
102 | $ echo 'new' > normalnew |
|
102 | $ echo 'new' > normalnew | |
103 | $ hg add normalnew |
|
103 | $ hg add normalnew | |
104 | $ echo 'new' > largenew |
|
104 | $ echo 'new' > largenew | |
105 | $ hg add --large normalnew |
|
105 | $ hg add --large normalnew | |
106 | normalnew already tracked! |
|
106 | normalnew already tracked! | |
107 | $ hg remove normalnew largenew |
|
107 | $ hg remove normalnew largenew | |
108 | not removing largenew: file is untracked |
|
108 | not removing largenew: file is untracked | |
109 | not removing normalnew: file has been marked for add (use forget to undo) |
|
109 | not removing normalnew: file has been marked for add (use forget to undo) | |
110 | [1] |
|
110 | [1] | |
111 | $ rm normalnew largenew |
|
111 | $ rm normalnew largenew | |
112 | $ hg up -Cq |
|
112 | $ hg up -Cq | |
113 |
|
113 | |||
114 | Remove both largefiles and normal files. |
|
114 | Remove both largefiles and normal files. | |
115 |
|
115 | |||
116 | $ hg remove normal1 large1 |
|
116 | $ hg remove normal1 large1 | |
117 | $ hg status large1 |
|
117 | $ hg status large1 | |
118 | R large1 |
|
118 | R large1 | |
119 | $ hg commit -m "remove files" |
|
119 | $ hg commit -m "remove files" | |
120 | Invoking status precommit hook |
|
120 | Invoking status precommit hook | |
121 | R large1 |
|
121 | R large1 | |
122 | R normal1 |
|
122 | R normal1 | |
123 | $ ls |
|
123 | $ ls | |
124 | sub |
|
124 | sub | |
125 | $ echo "testlargefile" > large1-test |
|
125 | $ echo "testlargefile" > large1-test | |
126 | $ hg add --large large1-test |
|
126 | $ hg add --large large1-test | |
127 | $ hg st |
|
127 | $ hg st | |
128 | A large1-test |
|
128 | A large1-test | |
129 | $ hg rm large1-test |
|
129 | $ hg rm large1-test | |
130 | not removing large1-test: file has been marked for add (use forget to undo) |
|
130 | not removing large1-test: file has been marked for add (use forget to undo) | |
131 | [1] |
|
131 | [1] | |
132 | $ hg st |
|
132 | $ hg st | |
133 | A large1-test |
|
133 | A large1-test | |
134 | $ hg forget large1-test |
|
134 | $ hg forget large1-test | |
135 | $ hg st |
|
135 | $ hg st | |
136 | ? large1-test |
|
136 | ? large1-test | |
137 | $ hg remove large1-test |
|
137 | $ hg remove large1-test | |
138 | not removing large1-test: file is untracked |
|
138 | not removing large1-test: file is untracked | |
139 | [1] |
|
139 | [1] | |
140 | $ hg forget large1-test |
|
140 | $ hg forget large1-test | |
141 | not removing large1-test: file is already untracked |
|
141 | not removing large1-test: file is already untracked | |
142 | [1] |
|
142 | [1] | |
143 | $ rm large1-test |
|
143 | $ rm large1-test | |
144 |
|
144 | |||
145 | Copy both largefiles and normal files (testing that status output is correct). |
|
145 | Copy both largefiles and normal files (testing that status output is correct). | |
146 |
|
146 | |||
147 | $ hg cp sub/normal2 normal1 |
|
147 | $ hg cp sub/normal2 normal1 | |
148 | $ hg cp sub/large2 large1 |
|
148 | $ hg cp sub/large2 large1 | |
149 | $ hg commit -m "copy files" |
|
149 | $ hg commit -m "copy files" | |
150 | Invoking status precommit hook |
|
150 | Invoking status precommit hook | |
151 | A large1 |
|
151 | A large1 | |
152 | A normal1 |
|
152 | A normal1 | |
153 | $ cat normal1 |
|
153 | $ cat normal1 | |
154 | normal22 |
|
154 | normal22 | |
155 | $ cat large1 |
|
155 | $ cat large1 | |
156 | large22 |
|
156 | large22 | |
157 |
|
157 | |||
158 | Test moving largefiles and verify that normal files are also unaffected. |
|
158 | Test moving largefiles and verify that normal files are also unaffected. | |
159 |
|
159 | |||
160 | $ hg mv normal1 normal3 |
|
160 | $ hg mv normal1 normal3 | |
161 | $ hg mv large1 large3 |
|
161 | $ hg mv large1 large3 | |
162 | $ hg mv sub/normal2 sub/normal4 |
|
162 | $ hg mv sub/normal2 sub/normal4 | |
163 | $ hg mv sub/large2 sub/large4 |
|
163 | $ hg mv sub/large2 sub/large4 | |
164 | $ hg commit -m "move files" |
|
164 | $ hg commit -m "move files" | |
165 | Invoking status precommit hook |
|
165 | Invoking status precommit hook | |
166 | A large3 |
|
166 | A large3 | |
167 | A normal3 |
|
167 | A normal3 | |
168 | A sub/large4 |
|
168 | A sub/large4 | |
169 | A sub/normal4 |
|
169 | A sub/normal4 | |
170 | R large1 |
|
170 | R large1 | |
171 | R normal1 |
|
171 | R normal1 | |
172 | R sub/large2 |
|
172 | R sub/large2 | |
173 | R sub/normal2 |
|
173 | R sub/normal2 | |
174 | $ cat normal3 |
|
174 | $ cat normal3 | |
175 | normal22 |
|
175 | normal22 | |
176 | $ cat large3 |
|
176 | $ cat large3 | |
177 | large22 |
|
177 | large22 | |
178 | $ cat sub/normal4 |
|
178 | $ cat sub/normal4 | |
179 | normal22 |
|
179 | normal22 | |
180 | $ cat sub/large4 |
|
180 | $ cat sub/large4 | |
181 | large22 |
|
181 | large22 | |
182 |
|
182 | |||
|
183 | Test repo method wrapping detection | |||
|
184 | ||||
|
185 | $ cat > $TESTTMP/wrapping1.py <<EOF | |||
|
186 | > from hgext import largefiles | |||
|
187 | > def reposetup(ui, repo): | |||
|
188 | > class derived(repo.__class__): | |||
|
189 | > def push(self, *args, **kwargs): | |||
|
190 | > return super(derived, self).push(*args, **kwargs) | |||
|
191 | > repo.__class__ = derived | |||
|
192 | > largefiles.reposetup(ui, repo) | |||
|
193 | > uisetup = largefiles.uisetup | |||
|
194 | > EOF | |||
|
195 | $ hg --config extensions.largefiles=$TESTTMP/wrapping1.py status | |||
|
196 | largefiles: repo method 'push' appears to have already been wrapped by another extension: largefiles may behave incorrectly | |||
|
197 | ||||
|
198 | $ cat > $TESTTMP/wrapping2.py <<EOF | |||
|
199 | > from hgext import largefiles | |||
|
200 | > def reposetup(ui, repo): | |||
|
201 | > orgpush = repo.push | |||
|
202 | > def push(*args, **kwargs): | |||
|
203 | > return orgpush(*args, **kwargs) | |||
|
204 | > repo.push = push | |||
|
205 | > largefiles.reposetup(ui, repo) | |||
|
206 | > uisetup = largefiles.uisetup | |||
|
207 | > EOF | |||
|
208 | $ hg --config extensions.largefiles=$TESTTMP/wrapping2.py status | |||
|
209 | largefiles: repo method 'push' appears to have already been wrapped by another extension: largefiles may behave incorrectly | |||
|
210 | ||||
183 | Test copies and moves from a directory other than root (issue3516) |
|
211 | Test copies and moves from a directory other than root (issue3516) | |
184 |
|
212 | |||
185 | $ cd .. |
|
213 | $ cd .. | |
186 | $ hg init lf_cpmv |
|
214 | $ hg init lf_cpmv | |
187 | $ cd lf_cpmv |
|
215 | $ cd lf_cpmv | |
188 | $ mkdir dira |
|
216 | $ mkdir dira | |
189 | $ mkdir dira/dirb |
|
217 | $ mkdir dira/dirb | |
190 | $ touch dira/dirb/largefile |
|
218 | $ touch dira/dirb/largefile | |
191 | $ hg add --large dira/dirb/largefile |
|
219 | $ hg add --large dira/dirb/largefile | |
192 | $ hg commit -m "added" |
|
220 | $ hg commit -m "added" | |
193 | Invoking status precommit hook |
|
221 | Invoking status precommit hook | |
194 | A dira/dirb/largefile |
|
222 | A dira/dirb/largefile | |
195 | $ cd dira |
|
223 | $ cd dira | |
196 | $ hg cp dirb/largefile foo/largefile |
|
224 | $ hg cp dirb/largefile foo/largefile | |
197 | $ hg ci -m "deep copy" |
|
225 | $ hg ci -m "deep copy" | |
198 | Invoking status precommit hook |
|
226 | Invoking status precommit hook | |
199 | A dira/foo/largefile |
|
227 | A dira/foo/largefile | |
200 | $ find . | sort |
|
228 | $ find . | sort | |
201 | . |
|
229 | . | |
202 | ./dirb |
|
230 | ./dirb | |
203 | ./dirb/largefile |
|
231 | ./dirb/largefile | |
204 | ./foo |
|
232 | ./foo | |
205 | ./foo/largefile |
|
233 | ./foo/largefile | |
206 | $ hg mv foo/largefile baz/largefile |
|
234 | $ hg mv foo/largefile baz/largefile | |
207 | $ hg ci -m "moved" |
|
235 | $ hg ci -m "moved" | |
208 | Invoking status precommit hook |
|
236 | Invoking status precommit hook | |
209 | A dira/baz/largefile |
|
237 | A dira/baz/largefile | |
210 | R dira/foo/largefile |
|
238 | R dira/foo/largefile | |
211 | $ find . | sort |
|
239 | $ find . | sort | |
212 | . |
|
240 | . | |
213 | ./baz |
|
241 | ./baz | |
214 | ./baz/largefile |
|
242 | ./baz/largefile | |
215 | ./dirb |
|
243 | ./dirb | |
216 | ./dirb/largefile |
|
244 | ./dirb/largefile | |
217 | ./foo |
|
245 | ./foo | |
218 | $ cd ../../a |
|
246 | $ cd ../../a | |
219 |
|
247 | |||
220 |
|
|
248 | #if serve | |
221 | Test display of largefiles in hgweb |
|
249 | Test display of largefiles in hgweb | |
222 |
|
250 | |||
223 | $ hg serve -d -p $HGPORT --pid-file ../hg.pid |
|
251 | $ hg serve -d -p $HGPORT --pid-file ../hg.pid | |
224 | $ cat ../hg.pid >> $DAEMON_PIDS |
|
252 | $ cat ../hg.pid >> $DAEMON_PIDS | |
225 |
$ "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT |
|
253 | $ "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT 'file/tip/?style=raw' | |
226 | 200 Script output follows |
|
254 | 200 Script output follows | |
227 |
|
|
255 | ||
228 |
|
|
256 | ||
229 | drwxr-xr-x sub |
|
257 | drwxr-xr-x sub | |
230 | -rw-r--r-- 41 large3 |
|
258 | -rw-r--r-- 41 large3 | |
231 | -rw-r--r-- 9 normal3 |
|
259 | -rw-r--r-- 9 normal3 | |
232 |
|
|
260 | ||
233 |
|
|
261 | ||
234 |
$ "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT |
|
262 | $ "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT 'file/tip/sub/?style=raw' | |
235 | 200 Script output follows |
|
263 | 200 Script output follows | |
236 |
|
|
264 | ||
237 |
|
|
265 | ||
238 | -rw-r--r-- 41 large4 |
|
266 | -rw-r--r-- 41 large4 | |
239 | -rw-r--r-- 9 normal4 |
|
267 | -rw-r--r-- 9 normal4 | |
240 |
|
|
268 | ||
241 |
|
|
269 | ||
242 | $ "$TESTDIR/killdaemons.py" $DAEMON_PIDS |
|
270 | $ "$TESTDIR/killdaemons.py" $DAEMON_PIDS | |
243 |
|
|
271 | #endif | |
244 |
|
|
272 | ||
245 | Test archiving the various revisions. These hit corner cases known with |
|
273 | Test archiving the various revisions. These hit corner cases known with | |
246 | archiving. |
|
274 | archiving. | |
247 |
|
275 | |||
248 | $ hg archive -r 0 ../archive0 |
|
276 | $ hg archive -r 0 ../archive0 | |
249 | $ hg archive -r 1 ../archive1 |
|
277 | $ hg archive -r 1 ../archive1 | |
250 | $ hg archive -r 2 ../archive2 |
|
278 | $ hg archive -r 2 ../archive2 | |
251 | $ hg archive -r 3 ../archive3 |
|
279 | $ hg archive -r 3 ../archive3 | |
252 | $ hg archive -r 4 ../archive4 |
|
280 | $ hg archive -r 4 ../archive4 | |
253 | $ cd ../archive0 |
|
281 | $ cd ../archive0 | |
254 | $ cat normal1 |
|
282 | $ cat normal1 | |
255 | normal1 |
|
283 | normal1 | |
256 | $ cat large1 |
|
284 | $ cat large1 | |
257 | large1 |
|
285 | large1 | |
258 | $ cat sub/normal2 |
|
286 | $ cat sub/normal2 | |
259 | normal2 |
|
287 | normal2 | |
260 | $ cat sub/large2 |
|
288 | $ cat sub/large2 | |
261 | large2 |
|
289 | large2 | |
262 | $ cd ../archive1 |
|
290 | $ cd ../archive1 | |
263 | $ cat normal1 |
|
291 | $ cat normal1 | |
264 | normal11 |
|
292 | normal11 | |
265 | $ cat large1 |
|
293 | $ cat large1 | |
266 | large11 |
|
294 | large11 | |
267 | $ cat sub/normal2 |
|
295 | $ cat sub/normal2 | |
268 | normal22 |
|
296 | normal22 | |
269 | $ cat sub/large2 |
|
297 | $ cat sub/large2 | |
270 | large22 |
|
298 | large22 | |
271 | $ cd ../archive2 |
|
299 | $ cd ../archive2 | |
272 | $ ls |
|
300 | $ ls | |
273 | sub |
|
301 | sub | |
274 | $ cat sub/normal2 |
|
302 | $ cat sub/normal2 | |
275 | normal22 |
|
303 | normal22 | |
276 | $ cat sub/large2 |
|
304 | $ cat sub/large2 | |
277 | large22 |
|
305 | large22 | |
278 | $ cd ../archive3 |
|
306 | $ cd ../archive3 | |
279 | $ cat normal1 |
|
307 | $ cat normal1 | |
280 | normal22 |
|
308 | normal22 | |
281 | $ cat large1 |
|
309 | $ cat large1 | |
282 | large22 |
|
310 | large22 | |
283 | $ cat sub/normal2 |
|
311 | $ cat sub/normal2 | |
284 | normal22 |
|
312 | normal22 | |
285 | $ cat sub/large2 |
|
313 | $ cat sub/large2 | |
286 | large22 |
|
314 | large22 | |
287 | $ cd ../archive4 |
|
315 | $ cd ../archive4 | |
288 | $ cat normal3 |
|
316 | $ cat normal3 | |
289 | normal22 |
|
317 | normal22 | |
290 | $ cat large3 |
|
318 | $ cat large3 | |
291 | large22 |
|
319 | large22 | |
292 | $ cat sub/normal4 |
|
320 | $ cat sub/normal4 | |
293 | normal22 |
|
321 | normal22 | |
294 | $ cat sub/large4 |
|
322 | $ cat sub/large4 | |
295 | large22 |
|
323 | large22 | |
296 |
|
324 | |||
297 | Commit corner case: specify files to commit. |
|
325 | Commit corner case: specify files to commit. | |
298 |
|
326 | |||
299 | $ cd ../a |
|
327 | $ cd ../a | |
300 | $ echo normal3 > normal3 |
|
328 | $ echo normal3 > normal3 | |
301 | $ echo large3 > large3 |
|
329 | $ echo large3 > large3 | |
302 | $ echo normal4 > sub/normal4 |
|
330 | $ echo normal4 > sub/normal4 | |
303 | $ echo large4 > sub/large4 |
|
331 | $ echo large4 > sub/large4 | |
304 | $ hg commit normal3 large3 sub/normal4 sub/large4 -m "edit files again" |
|
332 | $ hg commit normal3 large3 sub/normal4 sub/large4 -m "edit files again" | |
305 | Invoking status precommit hook |
|
333 | Invoking status precommit hook | |
306 | M large3 |
|
334 | M large3 | |
307 | M normal3 |
|
335 | M normal3 | |
308 | M sub/large4 |
|
336 | M sub/large4 | |
309 | M sub/normal4 |
|
337 | M sub/normal4 | |
310 | $ cat normal3 |
|
338 | $ cat normal3 | |
311 | normal3 |
|
339 | normal3 | |
312 | $ cat large3 |
|
340 | $ cat large3 | |
313 | large3 |
|
341 | large3 | |
314 | $ cat sub/normal4 |
|
342 | $ cat sub/normal4 | |
315 | normal4 |
|
343 | normal4 | |
316 | $ cat sub/large4 |
|
344 | $ cat sub/large4 | |
317 | large4 |
|
345 | large4 | |
318 |
|
346 | |||
319 | One more commit corner case: commit from a subdirectory. |
|
347 | One more commit corner case: commit from a subdirectory. | |
320 |
|
348 | |||
321 | $ cd ../a |
|
349 | $ cd ../a | |
322 | $ echo normal33 > normal3 |
|
350 | $ echo normal33 > normal3 | |
323 | $ echo large33 > large3 |
|
351 | $ echo large33 > large3 | |
324 | $ echo normal44 > sub/normal4 |
|
352 | $ echo normal44 > sub/normal4 | |
325 | $ echo large44 > sub/large4 |
|
353 | $ echo large44 > sub/large4 | |
326 | $ cd sub |
|
354 | $ cd sub | |
327 | $ hg commit -m "edit files yet again" |
|
355 | $ hg commit -m "edit files yet again" | |
328 | Invoking status precommit hook |
|
356 | Invoking status precommit hook | |
329 | M large3 |
|
357 | M large3 | |
330 | M normal3 |
|
358 | M normal3 | |
331 | M sub/large4 |
|
359 | M sub/large4 | |
332 | M sub/normal4 |
|
360 | M sub/normal4 | |
333 | $ cat ../normal3 |
|
361 | $ cat ../normal3 | |
334 | normal33 |
|
362 | normal33 | |
335 | $ cat ../large3 |
|
363 | $ cat ../large3 | |
336 | large33 |
|
364 | large33 | |
337 | $ cat normal4 |
|
365 | $ cat normal4 | |
338 | normal44 |
|
366 | normal44 | |
339 | $ cat large4 |
|
367 | $ cat large4 | |
340 | large44 |
|
368 | large44 | |
341 |
|
369 | |||
342 | Committing standins is not allowed. |
|
370 | Committing standins is not allowed. | |
343 |
|
371 | |||
344 | $ cd .. |
|
372 | $ cd .. | |
345 | $ echo large3 > large3 |
|
373 | $ echo large3 > large3 | |
346 | $ hg commit .hglf/large3 -m "try to commit standin" |
|
374 | $ hg commit .hglf/large3 -m "try to commit standin" | |
347 | abort: file ".hglf/large3" is a largefile standin |
|
375 | abort: file ".hglf/large3" is a largefile standin | |
348 | (commit the largefile itself instead) |
|
376 | (commit the largefile itself instead) | |
349 | [255] |
|
377 | [255] | |
350 |
|
378 | |||
351 | Corner cases for adding largefiles. |
|
379 | Corner cases for adding largefiles. | |
352 |
|
380 | |||
353 | $ echo large5 > large5 |
|
381 | $ echo large5 > large5 | |
354 | $ hg add --large large5 |
|
382 | $ hg add --large large5 | |
355 | $ hg add --large large5 |
|
383 | $ hg add --large large5 | |
356 | large5 already a largefile |
|
384 | large5 already a largefile | |
357 | $ mkdir sub2 |
|
385 | $ mkdir sub2 | |
358 | $ echo large6 > sub2/large6 |
|
386 | $ echo large6 > sub2/large6 | |
359 | $ echo large7 > sub2/large7 |
|
387 | $ echo large7 > sub2/large7 | |
360 | $ hg add --large sub2 |
|
388 | $ hg add --large sub2 | |
361 | adding sub2/large6 as a largefile (glob) |
|
389 | adding sub2/large6 as a largefile (glob) | |
362 | adding sub2/large7 as a largefile (glob) |
|
390 | adding sub2/large7 as a largefile (glob) | |
363 | $ hg st |
|
391 | $ hg st | |
364 | M large3 |
|
392 | M large3 | |
365 | A large5 |
|
393 | A large5 | |
366 | A sub2/large6 |
|
394 | A sub2/large6 | |
367 | A sub2/large7 |
|
395 | A sub2/large7 | |
368 |
|
396 | |||
369 | Committing directories containing only largefiles. |
|
397 | Committing directories containing only largefiles. | |
370 |
|
398 | |||
371 | $ mkdir -p z/y/x/m |
|
399 | $ mkdir -p z/y/x/m | |
372 | $ touch z/y/x/m/large1 |
|
400 | $ touch z/y/x/m/large1 | |
373 | $ touch z/y/x/large2 |
|
401 | $ touch z/y/x/large2 | |
374 | $ hg add --large z/y/x/m/large1 z/y/x/large2 |
|
402 | $ hg add --large z/y/x/m/large1 z/y/x/large2 | |
375 | $ hg commit -m "Subdir with directory only containing largefiles" z |
|
403 | $ hg commit -m "Subdir with directory only containing largefiles" z | |
376 | Invoking status precommit hook |
|
404 | Invoking status precommit hook | |
377 | M large3 |
|
405 | M large3 | |
378 | A large5 |
|
406 | A large5 | |
379 | A sub2/large6 |
|
407 | A sub2/large6 | |
380 | A sub2/large7 |
|
408 | A sub2/large7 | |
381 | A z/y/x/large2 |
|
409 | A z/y/x/large2 | |
382 | A z/y/x/m/large1 |
|
410 | A z/y/x/m/large1 | |
383 | $ hg rollback --quiet |
|
411 | $ hg rollback --quiet | |
384 | $ touch z/y/x/m/normal |
|
412 | $ touch z/y/x/m/normal | |
385 | $ hg add z/y/x/m/normal |
|
413 | $ hg add z/y/x/m/normal | |
386 | $ hg commit -m "Subdir with mixed contents" z |
|
414 | $ hg commit -m "Subdir with mixed contents" z | |
387 | Invoking status precommit hook |
|
415 | Invoking status precommit hook | |
388 | M large3 |
|
416 | M large3 | |
389 | A large5 |
|
417 | A large5 | |
390 | A sub2/large6 |
|
418 | A sub2/large6 | |
391 | A sub2/large7 |
|
419 | A sub2/large7 | |
392 | A z/y/x/large2 |
|
420 | A z/y/x/large2 | |
393 | A z/y/x/m/large1 |
|
421 | A z/y/x/m/large1 | |
394 | A z/y/x/m/normal |
|
422 | A z/y/x/m/normal | |
395 | $ hg st |
|
423 | $ hg st | |
396 | M large3 |
|
424 | M large3 | |
397 | A large5 |
|
425 | A large5 | |
398 | A sub2/large6 |
|
426 | A sub2/large6 | |
399 | A sub2/large7 |
|
427 | A sub2/large7 | |
400 | $ hg rollback --quiet |
|
428 | $ hg rollback --quiet | |
401 | $ hg revert z/y/x/large2 z/y/x/m/large1 |
|
429 | $ hg revert z/y/x/large2 z/y/x/m/large1 | |
402 | $ rm z/y/x/large2 z/y/x/m/large1 |
|
430 | $ rm z/y/x/large2 z/y/x/m/large1 | |
403 | $ hg commit -m "Subdir with normal contents" z |
|
431 | $ hg commit -m "Subdir with normal contents" z | |
404 | Invoking status precommit hook |
|
432 | Invoking status precommit hook | |
405 | M large3 |
|
433 | M large3 | |
406 | A large5 |
|
434 | A large5 | |
407 | A sub2/large6 |
|
435 | A sub2/large6 | |
408 | A sub2/large7 |
|
436 | A sub2/large7 | |
409 | A z/y/x/m/normal |
|
437 | A z/y/x/m/normal | |
410 | $ hg st |
|
438 | $ hg st | |
411 | M large3 |
|
439 | M large3 | |
412 | A large5 |
|
440 | A large5 | |
413 | A sub2/large6 |
|
441 | A sub2/large6 | |
414 | A sub2/large7 |
|
442 | A sub2/large7 | |
415 | $ hg rollback --quiet |
|
443 | $ hg rollback --quiet | |
416 | $ hg revert --quiet z |
|
444 | $ hg revert --quiet z | |
417 | $ hg commit -m "Empty subdir" z |
|
445 | $ hg commit -m "Empty subdir" z | |
418 | abort: z: no match under directory! |
|
446 | abort: z: no match under directory! | |
419 | [255] |
|
447 | [255] | |
420 | $ rm -rf z |
|
448 | $ rm -rf z | |
421 | $ hg ci -m "standin" .hglf |
|
449 | $ hg ci -m "standin" .hglf | |
422 | abort: file ".hglf" is a largefile standin |
|
450 | abort: file ".hglf" is a largefile standin | |
423 | (commit the largefile itself instead) |
|
451 | (commit the largefile itself instead) | |
424 | [255] |
|
452 | [255] | |
425 |
|
453 | |||
426 |
|
|
454 | Test "hg status" with combination of 'file pattern' and 'directory | |
427 | pattern' for largefiles: |
|
455 | pattern' for largefiles: | |
428 |
|
456 | |||
429 | $ hg status sub2/large6 sub2 |
|
457 | $ hg status sub2/large6 sub2 | |
430 | A sub2/large6 |
|
458 | A sub2/large6 | |
431 | A sub2/large7 |
|
459 | A sub2/large7 | |
432 |
|
460 | |||
433 | Config settings (pattern **.dat, minsize 2 MB) are respected. |
|
461 | Config settings (pattern **.dat, minsize 2 MB) are respected. | |
434 |
|
462 | |||
435 | $ echo testdata > test.dat |
|
463 | $ echo testdata > test.dat | |
436 | $ dd bs=1k count=2k if=/dev/zero of=reallylarge > /dev/null 2> /dev/null |
|
464 | $ dd bs=1k count=2k if=/dev/zero of=reallylarge > /dev/null 2> /dev/null | |
437 | $ hg add |
|
465 | $ hg add | |
438 | adding reallylarge as a largefile |
|
466 | adding reallylarge as a largefile | |
439 | adding test.dat as a largefile |
|
467 | adding test.dat as a largefile | |
440 |
|
468 | |||
441 | Test that minsize and --lfsize handle float values; |
|
469 | Test that minsize and --lfsize handle float values; | |
442 | also tests that --lfsize overrides largefiles.minsize. |
|
470 | also tests that --lfsize overrides largefiles.minsize. | |
443 | (0.250 MB = 256 kB = 262144 B) |
|
471 | (0.250 MB = 256 kB = 262144 B) | |
444 |
|
472 | |||
445 | $ dd if=/dev/zero of=ratherlarge bs=1024 count=256 > /dev/null 2> /dev/null |
|
473 | $ dd if=/dev/zero of=ratherlarge bs=1024 count=256 > /dev/null 2> /dev/null | |
446 | $ dd if=/dev/zero of=medium bs=1024 count=128 > /dev/null 2> /dev/null |
|
474 | $ dd if=/dev/zero of=medium bs=1024 count=128 > /dev/null 2> /dev/null | |
447 | $ hg --config largefiles.minsize=.25 add |
|
475 | $ hg --config largefiles.minsize=.25 add | |
448 | adding ratherlarge as a largefile |
|
476 | adding ratherlarge as a largefile | |
449 | adding medium |
|
477 | adding medium | |
450 | $ hg forget medium |
|
478 | $ hg forget medium | |
451 | $ hg --config largefiles.minsize=.25 add --lfsize=.125 |
|
479 | $ hg --config largefiles.minsize=.25 add --lfsize=.125 | |
452 | adding medium as a largefile |
|
480 | adding medium as a largefile | |
453 | $ dd if=/dev/zero of=notlarge bs=1024 count=127 > /dev/null 2> /dev/null |
|
481 | $ dd if=/dev/zero of=notlarge bs=1024 count=127 > /dev/null 2> /dev/null | |
454 | $ hg --config largefiles.minsize=.25 add --lfsize=.125 |
|
482 | $ hg --config largefiles.minsize=.25 add --lfsize=.125 | |
455 | adding notlarge |
|
483 | adding notlarge | |
456 | $ hg forget notlarge |
|
484 | $ hg forget notlarge | |
457 |
|
485 | |||
458 | Test forget on largefiles. |
|
486 | Test forget on largefiles. | |
459 |
|
487 | |||
460 | $ hg forget large3 large5 test.dat reallylarge ratherlarge medium |
|
488 | $ hg forget large3 large5 test.dat reallylarge ratherlarge medium | |
461 | $ hg commit -m "add/edit more largefiles" |
|
489 | $ hg commit -m "add/edit more largefiles" | |
462 | Invoking status precommit hook |
|
490 | Invoking status precommit hook | |
463 | A sub2/large6 |
|
491 | A sub2/large6 | |
464 | A sub2/large7 |
|
492 | A sub2/large7 | |
465 | R large3 |
|
493 | R large3 | |
466 | ? large5 |
|
494 | ? large5 | |
467 | ? medium |
|
495 | ? medium | |
468 | ? notlarge |
|
496 | ? notlarge | |
469 | ? ratherlarge |
|
497 | ? ratherlarge | |
470 | ? reallylarge |
|
498 | ? reallylarge | |
471 | ? test.dat |
|
499 | ? test.dat | |
472 | $ hg st |
|
500 | $ hg st | |
473 | ? large3 |
|
501 | ? large3 | |
474 | ? large5 |
|
502 | ? large5 | |
475 | ? medium |
|
503 | ? medium | |
476 | ? notlarge |
|
504 | ? notlarge | |
477 | ? ratherlarge |
|
505 | ? ratherlarge | |
478 | ? reallylarge |
|
506 | ? reallylarge | |
479 | ? test.dat |
|
507 | ? test.dat | |
480 |
|
508 | |||
481 | Purge with largefiles: verify that largefiles are still in the working |
|
509 | Purge with largefiles: verify that largefiles are still in the working | |
482 | dir after a purge. |
|
510 | dir after a purge. | |
483 |
|
511 | |||
484 | $ hg purge --all |
|
512 | $ hg purge --all | |
485 | $ cat sub/large4 |
|
513 | $ cat sub/large4 | |
486 | large44 |
|
514 | large44 | |
487 | $ cat sub2/large6 |
|
515 | $ cat sub2/large6 | |
488 | large6 |
|
516 | large6 | |
489 | $ cat sub2/large7 |
|
517 | $ cat sub2/large7 | |
490 | large7 |
|
518 | large7 | |
491 |
|
519 | |||
492 | Test addremove: verify that files that should be added as largfiles are added as |
|
520 | Test addremove: verify that files that should be added as largfiles are added as | |
493 | such and that already-existing largfiles are not added as normal files by |
|
521 | such and that already-existing largfiles are not added as normal files by | |
494 | accident. |
|
522 | accident. | |
495 |
|
523 | |||
496 | $ rm normal3 |
|
524 | $ rm normal3 | |
497 | $ rm sub/large4 |
|
525 | $ rm sub/large4 | |
498 | $ echo "testing addremove with patterns" > testaddremove.dat |
|
526 | $ echo "testing addremove with patterns" > testaddremove.dat | |
499 | $ echo "normaladdremove" > normaladdremove |
|
527 | $ echo "normaladdremove" > normaladdremove | |
500 | $ hg addremove |
|
528 | $ hg addremove | |
501 | removing sub/large4 |
|
529 | removing sub/large4 | |
502 | adding testaddremove.dat as a largefile |
|
530 | adding testaddremove.dat as a largefile | |
503 | removing normal3 |
|
531 | removing normal3 | |
504 | adding normaladdremove |
|
532 | adding normaladdremove | |
505 |
|
533 | |||
506 | Test addremove with -R |
|
534 | Test addremove with -R | |
507 |
|
535 | |||
508 | $ hg up -C |
|
536 | $ hg up -C | |
509 | getting changed largefiles |
|
537 | getting changed largefiles | |
510 | 1 largefiles updated, 0 removed |
|
538 | 1 largefiles updated, 0 removed | |
511 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
539 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
512 | $ rm normal3 |
|
540 | $ rm normal3 | |
513 | $ rm sub/large4 |
|
541 | $ rm sub/large4 | |
514 | $ echo "testing addremove with patterns" > testaddremove.dat |
|
542 | $ echo "testing addremove with patterns" > testaddremove.dat | |
515 | $ echo "normaladdremove" > normaladdremove |
|
543 | $ echo "normaladdremove" > normaladdremove | |
516 | $ cd .. |
|
544 | $ cd .. | |
517 | $ hg -R a addremove |
|
545 | $ hg -R a addremove | |
518 | removing sub/large4 |
|
546 | removing sub/large4 | |
519 | adding a/testaddremove.dat as a largefile (glob) |
|
547 | adding a/testaddremove.dat as a largefile (glob) | |
520 | removing normal3 |
|
548 | removing normal3 | |
521 | adding normaladdremove |
|
549 | adding normaladdremove | |
522 | $ cd a |
|
550 | $ cd a | |
523 |
|
551 | |||
524 | Test 3364 |
|
552 | Test 3364 | |
525 | $ hg clone . ../addrm |
|
553 | $ hg clone . ../addrm | |
526 | updating to branch default |
|
554 | updating to branch default | |
527 | getting changed largefiles |
|
555 | getting changed largefiles | |
528 | 3 largefiles updated, 0 removed |
|
556 | 3 largefiles updated, 0 removed | |
529 | 5 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
557 | 5 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
530 | $ cd ../addrm |
|
558 | $ cd ../addrm | |
531 | $ cat >> .hg/hgrc <<EOF |
|
559 | $ cat >> .hg/hgrc <<EOF | |
532 | > [hooks] |
|
560 | > [hooks] | |
533 | > post-commit.stat=sh -c "echo \\"Invoking status postcommit hook\\"; hg status -A" |
|
561 | > post-commit.stat=sh -c "echo \\"Invoking status postcommit hook\\"; hg status -A" | |
534 | > EOF |
|
562 | > EOF | |
535 | $ touch foo |
|
563 | $ touch foo | |
536 | $ hg add --large foo |
|
564 | $ hg add --large foo | |
537 | $ hg ci -m "add foo" |
|
565 | $ hg ci -m "add foo" | |
538 | Invoking status precommit hook |
|
566 | Invoking status precommit hook | |
539 | A foo |
|
567 | A foo | |
540 | Invoking status postcommit hook |
|
568 | Invoking status postcommit hook | |
541 | C foo |
|
569 | C foo | |
542 | C normal3 |
|
570 | C normal3 | |
543 | C sub/large4 |
|
571 | C sub/large4 | |
544 | C sub/normal4 |
|
572 | C sub/normal4 | |
545 | C sub2/large6 |
|
573 | C sub2/large6 | |
546 | C sub2/large7 |
|
574 | C sub2/large7 | |
547 | $ rm foo |
|
575 | $ rm foo | |
548 | $ hg st |
|
576 | $ hg st | |
549 | ! foo |
|
577 | ! foo | |
550 | hmm.. no precommit invoked, but there is a postcommit?? |
|
578 | hmm.. no precommit invoked, but there is a postcommit?? | |
551 | $ hg ci -m "will not checkin" |
|
579 | $ hg ci -m "will not checkin" | |
552 | nothing changed |
|
580 | nothing changed | |
553 | Invoking status postcommit hook |
|
581 | Invoking status postcommit hook | |
554 | ! foo |
|
582 | ! foo | |
555 | C normal3 |
|
583 | C normal3 | |
556 | C sub/large4 |
|
584 | C sub/large4 | |
557 | C sub/normal4 |
|
585 | C sub/normal4 | |
558 | C sub2/large6 |
|
586 | C sub2/large6 | |
559 | C sub2/large7 |
|
587 | C sub2/large7 | |
560 | [1] |
|
588 | [1] | |
561 | $ hg addremove |
|
589 | $ hg addremove | |
562 | removing foo |
|
590 | removing foo | |
563 | $ hg st |
|
591 | $ hg st | |
564 | R foo |
|
592 | R foo | |
565 | $ hg ci -m "used to say nothing changed" |
|
593 | $ hg ci -m "used to say nothing changed" | |
566 | Invoking status precommit hook |
|
594 | Invoking status precommit hook | |
567 | R foo |
|
595 | R foo | |
568 | Invoking status postcommit hook |
|
596 | Invoking status postcommit hook | |
569 | C normal3 |
|
597 | C normal3 | |
570 | C sub/large4 |
|
598 | C sub/large4 | |
571 | C sub/normal4 |
|
599 | C sub/normal4 | |
572 | C sub2/large6 |
|
600 | C sub2/large6 | |
573 | C sub2/large7 |
|
601 | C sub2/large7 | |
574 | $ hg st |
|
602 | $ hg st | |
575 |
|
603 | |||
576 | Test 3507 (both normal files and largefiles were a problem) |
|
604 | Test 3507 (both normal files and largefiles were a problem) | |
577 |
|
605 | |||
578 | $ touch normal |
|
606 | $ touch normal | |
579 | $ touch large |
|
607 | $ touch large | |
580 | $ hg add normal |
|
608 | $ hg add normal | |
581 | $ hg add --large large |
|
609 | $ hg add --large large | |
582 | $ hg ci -m "added" |
|
610 | $ hg ci -m "added" | |
583 | Invoking status precommit hook |
|
611 | Invoking status precommit hook | |
584 | A large |
|
612 | A large | |
585 | A normal |
|
613 | A normal | |
586 | Invoking status postcommit hook |
|
614 | Invoking status postcommit hook | |
587 | C large |
|
615 | C large | |
588 | C normal |
|
616 | C normal | |
589 | C normal3 |
|
617 | C normal3 | |
590 | C sub/large4 |
|
618 | C sub/large4 | |
591 | C sub/normal4 |
|
619 | C sub/normal4 | |
592 | C sub2/large6 |
|
620 | C sub2/large6 | |
593 | C sub2/large7 |
|
621 | C sub2/large7 | |
594 | $ hg remove normal |
|
622 | $ hg remove normal | |
595 | $ hg addremove --traceback |
|
623 | $ hg addremove --traceback | |
596 | $ hg ci -m "addremoved normal" |
|
624 | $ hg ci -m "addremoved normal" | |
597 | Invoking status precommit hook |
|
625 | Invoking status precommit hook | |
598 | R normal |
|
626 | R normal | |
599 | Invoking status postcommit hook |
|
627 | Invoking status postcommit hook | |
600 | C large |
|
628 | C large | |
601 | C normal3 |
|
629 | C normal3 | |
602 | C sub/large4 |
|
630 | C sub/large4 | |
603 | C sub/normal4 |
|
631 | C sub/normal4 | |
604 | C sub2/large6 |
|
632 | C sub2/large6 | |
605 | C sub2/large7 |
|
633 | C sub2/large7 | |
606 | $ hg up -C '.^' |
|
634 | $ hg up -C '.^' | |
607 | getting changed largefiles |
|
635 | getting changed largefiles | |
608 | 0 largefiles updated, 0 removed |
|
636 | 0 largefiles updated, 0 removed | |
609 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
637 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
610 | $ hg remove large |
|
638 | $ hg remove large | |
611 | $ hg addremove --traceback |
|
639 | $ hg addremove --traceback | |
612 | $ hg ci -m "removed large" |
|
640 | $ hg ci -m "removed large" | |
613 | Invoking status precommit hook |
|
641 | Invoking status precommit hook | |
614 | R large |
|
642 | R large | |
615 | created new head |
|
643 | created new head | |
616 | Invoking status postcommit hook |
|
644 | Invoking status postcommit hook | |
617 | C normal |
|
645 | C normal | |
618 | C normal3 |
|
646 | C normal3 | |
619 | C sub/large4 |
|
647 | C sub/large4 | |
620 | C sub/normal4 |
|
648 | C sub/normal4 | |
621 | C sub2/large6 |
|
649 | C sub2/large6 | |
622 | C sub2/large7 |
|
650 | C sub2/large7 | |
623 |
|
651 | |||
624 | Test commit -A (issue 3542) |
|
652 | Test commit -A (issue 3542) | |
625 | $ echo large8 > large8 |
|
653 | $ echo large8 > large8 | |
626 | $ hg add --large large8 |
|
654 | $ hg add --large large8 | |
627 | $ hg ci -Am 'this used to add large8 as normal and commit both' |
|
655 | $ hg ci -Am 'this used to add large8 as normal and commit both' | |
628 | Invoking status precommit hook |
|
656 | Invoking status precommit hook | |
629 | A large8 |
|
657 | A large8 | |
630 | Invoking status postcommit hook |
|
658 | Invoking status postcommit hook | |
631 | C large8 |
|
659 | C large8 | |
632 | C normal |
|
660 | C normal | |
633 | C normal3 |
|
661 | C normal3 | |
634 | C sub/large4 |
|
662 | C sub/large4 | |
635 | C sub/normal4 |
|
663 | C sub/normal4 | |
636 | C sub2/large6 |
|
664 | C sub2/large6 | |
637 | C sub2/large7 |
|
665 | C sub2/large7 | |
638 | $ rm large8 |
|
666 | $ rm large8 | |
639 | $ hg ci -Am 'this used to not notice the rm' |
|
667 | $ hg ci -Am 'this used to not notice the rm' | |
640 | removing large8 |
|
668 | removing large8 | |
641 | Invoking status precommit hook |
|
669 | Invoking status precommit hook | |
642 | R large8 |
|
670 | R large8 | |
643 | Invoking status postcommit hook |
|
671 | Invoking status postcommit hook | |
644 | C normal |
|
672 | C normal | |
645 | C normal3 |
|
673 | C normal3 | |
646 | C sub/large4 |
|
674 | C sub/large4 | |
647 | C sub/normal4 |
|
675 | C sub/normal4 | |
648 | C sub2/large6 |
|
676 | C sub2/large6 | |
649 | C sub2/large7 |
|
677 | C sub2/large7 | |
650 |
|
678 | |||
651 | Test that a standin can't be added as a large file |
|
679 | Test that a standin can't be added as a large file | |
652 |
|
680 | |||
653 | $ touch large |
|
681 | $ touch large | |
654 | $ hg add --large large |
|
682 | $ hg add --large large | |
655 | $ hg ci -m "add" |
|
683 | $ hg ci -m "add" | |
656 | Invoking status precommit hook |
|
684 | Invoking status precommit hook | |
657 | A large |
|
685 | A large | |
658 | Invoking status postcommit hook |
|
686 | Invoking status postcommit hook | |
659 | C large |
|
687 | C large | |
660 | C normal |
|
688 | C normal | |
661 | C normal3 |
|
689 | C normal3 | |
662 | C sub/large4 |
|
690 | C sub/large4 | |
663 | C sub/normal4 |
|
691 | C sub/normal4 | |
664 | C sub2/large6 |
|
692 | C sub2/large6 | |
665 | C sub2/large7 |
|
693 | C sub2/large7 | |
666 | $ hg remove large |
|
694 | $ hg remove large | |
667 | $ touch large |
|
695 | $ touch large | |
668 | $ hg addremove --config largefiles.patterns=**large --traceback |
|
696 | $ hg addremove --config largefiles.patterns=**large --traceback | |
669 | adding large as a largefile |
|
697 | adding large as a largefile | |
670 |
|
698 | |||
671 | Test that outgoing --large works (with revsets too) |
|
699 | Test that outgoing --large works (with revsets too) | |
672 | $ hg outgoing --rev '.^' --large |
|
700 | $ hg outgoing --rev '.^' --large | |
673 | comparing with $TESTTMP/a (glob) |
|
701 | comparing with $TESTTMP/a (glob) | |
674 | searching for changes |
|
702 | searching for changes | |
675 | changeset: 8:c02fd3b77ec4 |
|
703 | changeset: 8:c02fd3b77ec4 | |
676 | user: test |
|
704 | user: test | |
677 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
705 | date: Thu Jan 01 00:00:00 1970 +0000 | |
678 | summary: add foo |
|
706 | summary: add foo | |
679 |
|
707 | |||
680 | changeset: 9:289dd08c9bbb |
|
708 | changeset: 9:289dd08c9bbb | |
681 | user: test |
|
709 | user: test | |
682 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
710 | date: Thu Jan 01 00:00:00 1970 +0000 | |
683 | summary: used to say nothing changed |
|
711 | summary: used to say nothing changed | |
684 |
|
712 | |||
685 | changeset: 10:34f23ac6ac12 |
|
713 | changeset: 10:34f23ac6ac12 | |
686 | user: test |
|
714 | user: test | |
687 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
715 | date: Thu Jan 01 00:00:00 1970 +0000 | |
688 | summary: added |
|
716 | summary: added | |
689 |
|
717 | |||
690 | changeset: 12:710c1b2f523c |
|
718 | changeset: 12:710c1b2f523c | |
691 | parent: 10:34f23ac6ac12 |
|
719 | parent: 10:34f23ac6ac12 | |
692 | user: test |
|
720 | user: test | |
693 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
721 | date: Thu Jan 01 00:00:00 1970 +0000 | |
694 | summary: removed large |
|
722 | summary: removed large | |
695 |
|
723 | |||
696 | changeset: 13:0a3e75774479 |
|
724 | changeset: 13:0a3e75774479 | |
697 | user: test |
|
725 | user: test | |
698 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
726 | date: Thu Jan 01 00:00:00 1970 +0000 | |
699 | summary: this used to add large8 as normal and commit both |
|
727 | summary: this used to add large8 as normal and commit both | |
700 |
|
728 | |||
701 | changeset: 14:84f3d378175c |
|
729 | changeset: 14:84f3d378175c | |
702 | user: test |
|
730 | user: test | |
703 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
731 | date: Thu Jan 01 00:00:00 1970 +0000 | |
704 | summary: this used to not notice the rm |
|
732 | summary: this used to not notice the rm | |
705 |
|
733 | |||
706 | searching for changes |
|
734 | searching for changes | |
707 | largefiles to upload: |
|
735 | largefiles to upload: | |
708 | foo |
|
736 | foo | |
709 | large |
|
737 | large | |
710 | large8 |
|
738 | large8 | |
711 |
|
739 | |||
712 | $ cd ../a |
|
740 | $ cd ../a | |
713 |
|
741 | |||
714 | Clone a largefiles repo. |
|
742 | Clone a largefiles repo. | |
715 |
|
743 | |||
716 | $ hg clone . ../b |
|
744 | $ hg clone . ../b | |
717 | updating to branch default |
|
745 | updating to branch default | |
718 | getting changed largefiles |
|
746 | getting changed largefiles | |
719 | 3 largefiles updated, 0 removed |
|
747 | 3 largefiles updated, 0 removed | |
720 | 5 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
748 | 5 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
721 | $ cd ../b |
|
749 | $ cd ../b | |
722 |
$ hg log --template '{rev} |
|
750 | $ hg log --template '{rev}:{node|short} {desc|firstline}\n' | |
723 | 7:daea875e9014 add/edit more largefiles |
|
751 | 7:daea875e9014 add/edit more largefiles | |
724 | 6:4355d653f84f edit files yet again |
|
752 | 6:4355d653f84f edit files yet again | |
725 | 5:9d5af5072dbd edit files again |
|
753 | 5:9d5af5072dbd edit files again | |
726 | 4:74c02385b94c move files |
|
754 | 4:74c02385b94c move files | |
727 | 3:9e8fbc4bce62 copy files |
|
755 | 3:9e8fbc4bce62 copy files | |
728 | 2:51a0ae4d5864 remove files |
|
756 | 2:51a0ae4d5864 remove files | |
729 | 1:ce8896473775 edit files |
|
757 | 1:ce8896473775 edit files | |
730 | 0:30d30fe6a5be add files |
|
758 | 0:30d30fe6a5be add files | |
731 | $ cat normal3 |
|
759 | $ cat normal3 | |
732 | normal33 |
|
760 | normal33 | |
733 | $ cat sub/normal4 |
|
761 | $ cat sub/normal4 | |
734 | normal44 |
|
762 | normal44 | |
735 | $ cat sub/large4 |
|
763 | $ cat sub/large4 | |
736 | large44 |
|
764 | large44 | |
737 | $ cat sub2/large6 |
|
765 | $ cat sub2/large6 | |
738 | large6 |
|
766 | large6 | |
739 | $ cat sub2/large7 |
|
767 | $ cat sub2/large7 | |
740 | large7 |
|
768 | large7 | |
741 | $ cd .. |
|
769 | $ cd .. | |
742 | $ hg clone a -r 3 c |
|
770 | $ hg clone a -r 3 c | |
743 | adding changesets |
|
771 | adding changesets | |
744 | adding manifests |
|
772 | adding manifests | |
745 | adding file changes |
|
773 | adding file changes | |
746 | added 4 changesets with 10 changes to 4 files |
|
774 | added 4 changesets with 10 changes to 4 files | |
747 | updating to branch default |
|
775 | updating to branch default | |
748 | getting changed largefiles |
|
776 | getting changed largefiles | |
749 | 2 largefiles updated, 0 removed |
|
777 | 2 largefiles updated, 0 removed | |
750 | 4 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
778 | 4 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
751 | $ cd c |
|
779 | $ cd c | |
752 |
$ hg log --template '{rev} |
|
780 | $ hg log --template '{rev}:{node|short} {desc|firstline}\n' | |
753 | 3:9e8fbc4bce62 copy files |
|
781 | 3:9e8fbc4bce62 copy files | |
754 | 2:51a0ae4d5864 remove files |
|
782 | 2:51a0ae4d5864 remove files | |
755 | 1:ce8896473775 edit files |
|
783 | 1:ce8896473775 edit files | |
756 | 0:30d30fe6a5be add files |
|
784 | 0:30d30fe6a5be add files | |
757 | $ cat normal1 |
|
785 | $ cat normal1 | |
758 | normal22 |
|
786 | normal22 | |
759 | $ cat large1 |
|
787 | $ cat large1 | |
760 | large22 |
|
788 | large22 | |
761 | $ cat sub/normal2 |
|
789 | $ cat sub/normal2 | |
762 | normal22 |
|
790 | normal22 | |
763 | $ cat sub/large2 |
|
791 | $ cat sub/large2 | |
764 | large22 |
|
792 | large22 | |
765 |
|
793 | |||
766 | Old revisions of a clone have correct largefiles content (this also |
|
794 | Old revisions of a clone have correct largefiles content (this also | |
767 | tests update). |
|
795 | tests update). | |
768 |
|
796 | |||
769 | $ hg update -r 1 |
|
797 | $ hg update -r 1 | |
770 | getting changed largefiles |
|
798 | getting changed largefiles | |
771 | 1 largefiles updated, 0 removed |
|
799 | 1 largefiles updated, 0 removed | |
772 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
800 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
773 | $ cat large1 |
|
801 | $ cat large1 | |
774 | large11 |
|
802 | large11 | |
775 | $ cat sub/large2 |
|
803 | $ cat sub/large2 | |
776 | large22 |
|
804 | large22 | |
777 | $ cd .. |
|
805 | $ cd .. | |
778 |
|
806 | |||
779 | Test cloning with --all-largefiles flag |
|
807 | Test cloning with --all-largefiles flag | |
780 |
|
808 | |||
781 | $ rm "${USERCACHE}"/* |
|
809 | $ rm "${USERCACHE}"/* | |
782 | $ hg clone --all-largefiles a a-backup |
|
810 | $ hg clone --all-largefiles a a-backup | |
783 | updating to branch default |
|
811 | updating to branch default | |
784 | getting changed largefiles |
|
812 | getting changed largefiles | |
785 | 3 largefiles updated, 0 removed |
|
813 | 3 largefiles updated, 0 removed | |
786 | 5 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
814 | 5 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
787 | 8 additional largefiles cached |
|
815 | 8 additional largefiles cached | |
788 |
|
816 | |||
789 | $ rm "${USERCACHE}"/* |
|
817 | $ rm "${USERCACHE}"/* | |
790 | $ hg clone --all-largefiles -u 0 a a-clone0 |
|
818 | $ hg clone --all-largefiles -u 0 a a-clone0 | |
791 | updating to branch default |
|
819 | updating to branch default | |
792 | getting changed largefiles |
|
820 | getting changed largefiles | |
793 | 2 largefiles updated, 0 removed |
|
821 | 2 largefiles updated, 0 removed | |
794 | 4 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
822 | 4 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
795 | 9 additional largefiles cached |
|
823 | 9 additional largefiles cached | |
796 | $ hg -R a-clone0 sum |
|
824 | $ hg -R a-clone0 sum | |
797 | parent: 0:30d30fe6a5be |
|
825 | parent: 0:30d30fe6a5be | |
798 | add files |
|
826 | add files | |
799 | branch: default |
|
827 | branch: default | |
800 | commit: (clean) |
|
828 | commit: (clean) | |
801 | update: 7 new changesets (update) |
|
829 | update: 7 new changesets (update) | |
802 |
|
830 | |||
803 | $ rm "${USERCACHE}"/* |
|
831 | $ rm "${USERCACHE}"/* | |
804 | $ hg clone --all-largefiles -u 1 a a-clone1 |
|
832 | $ hg clone --all-largefiles -u 1 a a-clone1 | |
805 | updating to branch default |
|
833 | updating to branch default | |
806 | getting changed largefiles |
|
834 | getting changed largefiles | |
807 | 2 largefiles updated, 0 removed |
|
835 | 2 largefiles updated, 0 removed | |
808 | 4 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
836 | 4 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
809 | 8 additional largefiles cached |
|
837 | 8 additional largefiles cached | |
810 | $ hg -R a-clone1 verify --large --lfa --lfc |
|
838 | $ hg -R a-clone1 verify --large --lfa --lfc | |
811 | checking changesets |
|
839 | checking changesets | |
812 | checking manifests |
|
840 | checking manifests | |
813 | crosschecking files in changesets and manifests |
|
841 | crosschecking files in changesets and manifests | |
814 | checking files |
|
842 | checking files | |
815 | 10 files, 8 changesets, 24 total revisions |
|
843 | 10 files, 8 changesets, 24 total revisions | |
816 | searching 8 changesets for largefiles |
|
844 | searching 8 changesets for largefiles | |
817 | verified contents of 13 revisions of 6 largefiles |
|
845 | verified contents of 13 revisions of 6 largefiles | |
818 | $ hg -R a-clone1 sum |
|
846 | $ hg -R a-clone1 sum | |
819 | parent: 1:ce8896473775 |
|
847 | parent: 1:ce8896473775 | |
820 | edit files |
|
848 | edit files | |
821 | branch: default |
|
849 | branch: default | |
822 | commit: (clean) |
|
850 | commit: (clean) | |
823 | update: 6 new changesets (update) |
|
851 | update: 6 new changesets (update) | |
824 |
|
852 | |||
825 | $ rm "${USERCACHE}"/* |
|
853 | $ rm "${USERCACHE}"/* | |
826 | $ hg clone --all-largefiles -U a a-clone-u |
|
854 | $ hg clone --all-largefiles -U a a-clone-u | |
827 | 11 additional largefiles cached |
|
855 | 11 additional largefiles cached | |
828 | $ hg -R a-clone-u sum |
|
856 | $ hg -R a-clone-u sum | |
829 | parent: -1:000000000000 (no revision checked out) |
|
857 | parent: -1:000000000000 (no revision checked out) | |
830 | branch: default |
|
858 | branch: default | |
831 | commit: (clean) |
|
859 | commit: (clean) | |
832 | update: 8 new changesets (update) |
|
860 | update: 8 new changesets (update) | |
833 |
|
861 | |||
834 | Show computed destination directory: |
|
862 | Show computed destination directory: | |
835 |
|
863 | |||
836 | $ mkdir xyz |
|
864 | $ mkdir xyz | |
837 | $ cd xyz |
|
865 | $ cd xyz | |
838 | $ hg clone ../a |
|
866 | $ hg clone ../a | |
839 | destination directory: a |
|
867 | destination directory: a | |
840 | updating to branch default |
|
868 | updating to branch default | |
841 | getting changed largefiles |
|
869 | getting changed largefiles | |
842 | 3 largefiles updated, 0 removed |
|
870 | 3 largefiles updated, 0 removed | |
843 | 5 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
871 | 5 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
844 | $ cd .. |
|
872 | $ cd .. | |
845 |
|
873 | |||
846 | Clone URL without path: |
|
874 | Clone URL without path: | |
847 |
|
875 | |||
848 | $ hg clone file:// |
|
876 | $ hg clone file:// | |
849 | abort: repository / not found! |
|
877 | abort: repository / not found! | |
850 | [255] |
|
878 | [255] | |
851 |
|
879 | |||
852 | Ensure base clone command argument validation |
|
880 | Ensure base clone command argument validation | |
853 |
|
881 | |||
854 | $ hg clone -U -u 0 a a-clone-failure |
|
882 | $ hg clone -U -u 0 a a-clone-failure | |
855 | abort: cannot specify both --noupdate and --updaterev |
|
883 | abort: cannot specify both --noupdate and --updaterev | |
856 | [255] |
|
884 | [255] | |
857 |
|
885 | |||
858 | $ hg clone --all-largefiles a ssh://localhost/a |
|
886 | $ hg clone --all-largefiles a ssh://localhost/a | |
859 | abort: --all-largefiles is incompatible with non-local destination ssh://localhost/a |
|
887 | abort: --all-largefiles is incompatible with non-local destination ssh://localhost/a | |
860 | [255] |
|
888 | [255] | |
861 |
|
889 | |||
862 | Test pulling with --all-largefiles flag. Also test that the largefiles are |
|
890 | Test pulling with --all-largefiles flag. Also test that the largefiles are | |
863 | downloaded from 'default' instead of 'default-push' when no source is specified |
|
891 | downloaded from 'default' instead of 'default-push' when no source is specified | |
864 | (issue3584) |
|
892 | (issue3584) | |
865 |
|
893 | |||
866 | $ rm -Rf a-backup |
|
894 | $ rm -Rf a-backup | |
867 | $ hg clone -r 1 a a-backup |
|
895 | $ hg clone -r 1 a a-backup | |
868 | adding changesets |
|
896 | adding changesets | |
869 | adding manifests |
|
897 | adding manifests | |
870 | adding file changes |
|
898 | adding file changes | |
871 | added 2 changesets with 8 changes to 4 files |
|
899 | added 2 changesets with 8 changes to 4 files | |
872 | updating to branch default |
|
900 | updating to branch default | |
873 | getting changed largefiles |
|
901 | getting changed largefiles | |
874 | 2 largefiles updated, 0 removed |
|
902 | 2 largefiles updated, 0 removed | |
875 | 4 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
903 | 4 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
876 | $ rm "${USERCACHE}"/* |
|
904 | $ rm "${USERCACHE}"/* | |
877 | $ cd a-backup |
|
905 | $ cd a-backup | |
878 | $ hg pull --all-largefiles --config paths.default-push=bogus/path |
|
906 | $ hg pull --all-largefiles --config paths.default-push=bogus/path | |
879 | pulling from $TESTTMP/a (glob) |
|
907 | pulling from $TESTTMP/a (glob) | |
880 | searching for changes |
|
908 | searching for changes | |
881 | adding changesets |
|
909 | adding changesets | |
882 | adding manifests |
|
910 | adding manifests | |
883 | adding file changes |
|
911 | adding file changes | |
884 | added 6 changesets with 16 changes to 8 files |
|
912 | added 6 changesets with 16 changes to 8 files | |
885 | (run 'hg update' to get a working copy) |
|
913 | (run 'hg update' to get a working copy) | |
886 | 6 additional largefiles cached |
|
914 | 6 additional largefiles cached | |
887 | $ cd .. |
|
915 | $ cd .. | |
888 |
|
916 | |||
889 | Rebasing between two repositories does not revert largefiles to old |
|
917 | Rebasing between two repositories does not revert largefiles to old | |
890 | revisions (this was a very bad bug that took a lot of work to fix). |
|
918 | revisions (this was a very bad bug that took a lot of work to fix). | |
891 |
|
919 | |||
892 | $ hg clone a d |
|
920 | $ hg clone a d | |
893 | updating to branch default |
|
921 | updating to branch default | |
894 | getting changed largefiles |
|
922 | getting changed largefiles | |
895 | 3 largefiles updated, 0 removed |
|
923 | 3 largefiles updated, 0 removed | |
896 | 5 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
924 | 5 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
897 | $ cd b |
|
925 | $ cd b | |
898 | $ echo large4-modified > sub/large4 |
|
926 | $ echo large4-modified > sub/large4 | |
899 | $ echo normal3-modified > normal3 |
|
927 | $ echo normal3-modified > normal3 | |
900 | $ hg commit -m "modify normal file and largefile in repo b" |
|
928 | $ hg commit -m "modify normal file and largefile in repo b" | |
901 | Invoking status precommit hook |
|
929 | Invoking status precommit hook | |
902 | M normal3 |
|
930 | M normal3 | |
903 | M sub/large4 |
|
931 | M sub/large4 | |
904 | $ cd ../d |
|
932 | $ cd ../d | |
905 | $ echo large6-modified > sub2/large6 |
|
933 | $ echo large6-modified > sub2/large6 | |
906 | $ echo normal4-modified > sub/normal4 |
|
934 | $ echo normal4-modified > sub/normal4 | |
907 | $ hg commit -m "modify normal file largefile in repo d" |
|
935 | $ hg commit -m "modify normal file largefile in repo d" | |
908 | Invoking status precommit hook |
|
936 | Invoking status precommit hook | |
909 | M sub/normal4 |
|
937 | M sub/normal4 | |
910 | M sub2/large6 |
|
938 | M sub2/large6 | |
911 | $ cd .. |
|
939 | $ cd .. | |
912 | $ hg clone d e |
|
940 | $ hg clone d e | |
913 | updating to branch default |
|
941 | updating to branch default | |
914 | getting changed largefiles |
|
942 | getting changed largefiles | |
915 | 3 largefiles updated, 0 removed |
|
943 | 3 largefiles updated, 0 removed | |
916 | 5 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
944 | 5 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
917 | $ cd d |
|
945 | $ cd d | |
918 |
|
946 | |||
919 | More rebase testing, but also test that the largefiles are downloaded from |
|
947 | More rebase testing, but also test that the largefiles are downloaded from | |
920 | 'default-push' when no source is specified (issue3584). (The largefile from the |
|
948 | 'default-push' when no source is specified (issue3584). (The largefile from the | |
921 | pulled revision is however not downloaded but found in the local cache.) |
|
949 | pulled revision is however not downloaded but found in the local cache.) | |
922 | Largefiles are fetched for the new pulled revision, not for existing revisions, |
|
950 | Largefiles are fetched for the new pulled revision, not for existing revisions, | |
923 | rebased or not. |
|
951 | rebased or not. | |
924 |
|
952 | |||
925 | $ [ ! -f .hg/largefiles/e166e74c7303192238d60af5a9c4ce9bef0b7928 ] |
|
953 | $ [ ! -f .hg/largefiles/e166e74c7303192238d60af5a9c4ce9bef0b7928 ] | |
926 | $ hg pull --rebase --all-largefiles --config paths.default-push=bogus/path --config paths.default=../b |
|
954 | $ hg pull --rebase --all-largefiles --config paths.default-push=bogus/path --config paths.default=../b | |
927 | pulling from $TESTTMP/b (glob) |
|
955 | pulling from $TESTTMP/b (glob) | |
928 | searching for changes |
|
956 | searching for changes | |
929 | adding changesets |
|
957 | adding changesets | |
930 | adding manifests |
|
958 | adding manifests | |
931 | adding file changes |
|
959 | adding file changes | |
932 | added 1 changesets with 2 changes to 2 files (+1 heads) |
|
960 | added 1 changesets with 2 changes to 2 files (+1 heads) | |
933 | Invoking status precommit hook |
|
961 | Invoking status precommit hook | |
934 | M sub/normal4 |
|
962 | M sub/normal4 | |
935 | M sub2/large6 |
|
963 | M sub2/large6 | |
936 | saved backup bundle to $TESTTMP/d/.hg/strip-backup/f574fb32bb45-backup.hg (glob) |
|
964 | saved backup bundle to $TESTTMP/d/.hg/strip-backup/f574fb32bb45-backup.hg (glob) | |
937 | 0 additional largefiles cached |
|
965 | 0 additional largefiles cached | |
938 | nothing to rebase |
|
966 | nothing to rebase | |
939 | $ [ -f .hg/largefiles/e166e74c7303192238d60af5a9c4ce9bef0b7928 ] |
|
967 | $ [ -f .hg/largefiles/e166e74c7303192238d60af5a9c4ce9bef0b7928 ] | |
940 |
$ hg log --template '{rev} |
|
968 | $ hg log --template '{rev}:{node|short} {desc|firstline}\n' | |
941 | 9:598410d3eb9a modify normal file largefile in repo d |
|
969 | 9:598410d3eb9a modify normal file largefile in repo d | |
942 | 8:a381d2c8c80e modify normal file and largefile in repo b |
|
970 | 8:a381d2c8c80e modify normal file and largefile in repo b | |
943 | 7:daea875e9014 add/edit more largefiles |
|
971 | 7:daea875e9014 add/edit more largefiles | |
944 | 6:4355d653f84f edit files yet again |
|
972 | 6:4355d653f84f edit files yet again | |
945 | 5:9d5af5072dbd edit files again |
|
973 | 5:9d5af5072dbd edit files again | |
946 | 4:74c02385b94c move files |
|
974 | 4:74c02385b94c move files | |
947 | 3:9e8fbc4bce62 copy files |
|
975 | 3:9e8fbc4bce62 copy files | |
948 | 2:51a0ae4d5864 remove files |
|
976 | 2:51a0ae4d5864 remove files | |
949 | 1:ce8896473775 edit files |
|
977 | 1:ce8896473775 edit files | |
950 | 0:30d30fe6a5be add files |
|
978 | 0:30d30fe6a5be add files | |
951 | $ cat normal3 |
|
979 | $ cat normal3 | |
952 | normal3-modified |
|
980 | normal3-modified | |
953 | $ cat sub/normal4 |
|
981 | $ cat sub/normal4 | |
954 | normal4-modified |
|
982 | normal4-modified | |
955 | $ cat sub/large4 |
|
983 | $ cat sub/large4 | |
956 | large4-modified |
|
984 | large4-modified | |
957 | $ cat sub2/large6 |
|
985 | $ cat sub2/large6 | |
958 | large6-modified |
|
986 | large6-modified | |
959 | $ cat sub2/large7 |
|
987 | $ cat sub2/large7 | |
960 | large7 |
|
988 | large7 | |
961 | $ cd ../e |
|
989 | $ cd ../e | |
962 | $ hg pull ../b |
|
990 | $ hg pull ../b | |
963 | pulling from ../b |
|
991 | pulling from ../b | |
964 | searching for changes |
|
992 | searching for changes | |
965 | adding changesets |
|
993 | adding changesets | |
966 | adding manifests |
|
994 | adding manifests | |
967 | adding file changes |
|
995 | adding file changes | |
968 | added 1 changesets with 2 changes to 2 files (+1 heads) |
|
996 | added 1 changesets with 2 changes to 2 files (+1 heads) | |
969 | (run 'hg heads' to see heads, 'hg merge' to merge) |
|
997 | (run 'hg heads' to see heads, 'hg merge' to merge) | |
970 | $ hg rebase |
|
998 | $ hg rebase | |
971 | Invoking status precommit hook |
|
999 | Invoking status precommit hook | |
972 | M sub/normal4 |
|
1000 | M sub/normal4 | |
973 | M sub2/large6 |
|
1001 | M sub2/large6 | |
974 | saved backup bundle to $TESTTMP/e/.hg/strip-backup/f574fb32bb45-backup.hg (glob) |
|
1002 | saved backup bundle to $TESTTMP/e/.hg/strip-backup/f574fb32bb45-backup.hg (glob) | |
975 |
$ hg log --template '{rev} |
|
1003 | $ hg log --template '{rev}:{node|short} {desc|firstline}\n' | |
976 | 9:598410d3eb9a modify normal file largefile in repo d |
|
1004 | 9:598410d3eb9a modify normal file largefile in repo d | |
977 | 8:a381d2c8c80e modify normal file and largefile in repo b |
|
1005 | 8:a381d2c8c80e modify normal file and largefile in repo b | |
978 | 7:daea875e9014 add/edit more largefiles |
|
1006 | 7:daea875e9014 add/edit more largefiles | |
979 | 6:4355d653f84f edit files yet again |
|
1007 | 6:4355d653f84f edit files yet again | |
980 | 5:9d5af5072dbd edit files again |
|
1008 | 5:9d5af5072dbd edit files again | |
981 | 4:74c02385b94c move files |
|
1009 | 4:74c02385b94c move files | |
982 | 3:9e8fbc4bce62 copy files |
|
1010 | 3:9e8fbc4bce62 copy files | |
983 | 2:51a0ae4d5864 remove files |
|
1011 | 2:51a0ae4d5864 remove files | |
984 | 1:ce8896473775 edit files |
|
1012 | 1:ce8896473775 edit files | |
985 | 0:30d30fe6a5be add files |
|
1013 | 0:30d30fe6a5be add files | |
986 | $ cat normal3 |
|
1014 | $ cat normal3 | |
987 | normal3-modified |
|
1015 | normal3-modified | |
988 | $ cat sub/normal4 |
|
1016 | $ cat sub/normal4 | |
989 | normal4-modified |
|
1017 | normal4-modified | |
990 | $ cat sub/large4 |
|
1018 | $ cat sub/large4 | |
991 | large4-modified |
|
1019 | large4-modified | |
992 | $ cat sub2/large6 |
|
1020 | $ cat sub2/large6 | |
993 | large6-modified |
|
1021 | large6-modified | |
994 | $ cat sub2/large7 |
|
1022 | $ cat sub2/large7 | |
995 | large7 |
|
1023 | large7 | |
996 |
|
1024 | |||
997 | Log on largefiles |
|
1025 | Log on largefiles | |
998 |
|
1026 | |||
999 | - same output |
|
1027 | - same output | |
1000 |
$ hg log --template '{rev} |
|
1028 | $ hg log --template '{rev}:{node|short} {desc|firstline}\n' .hglf/sub/large4 | |
1001 | 8:a381d2c8c80e modify normal file and largefile in repo b |
|
1029 | 8:a381d2c8c80e modify normal file and largefile in repo b | |
1002 | 6:4355d653f84f edit files yet again |
|
1030 | 6:4355d653f84f edit files yet again | |
1003 | 5:9d5af5072dbd edit files again |
|
1031 | 5:9d5af5072dbd edit files again | |
1004 | 4:74c02385b94c move files |
|
1032 | 4:74c02385b94c move files | |
1005 |
$ hg log --template '{rev} |
|
1033 | $ hg log --template '{rev}:{node|short} {desc|firstline}\n' sub/large4 | |
1006 | 8:a381d2c8c80e modify normal file and largefile in repo b |
|
1034 | 8:a381d2c8c80e modify normal file and largefile in repo b | |
1007 | 6:4355d653f84f edit files yet again |
|
1035 | 6:4355d653f84f edit files yet again | |
1008 | 5:9d5af5072dbd edit files again |
|
1036 | 5:9d5af5072dbd edit files again | |
1009 | 4:74c02385b94c move files |
|
1037 | 4:74c02385b94c move files | |
1010 |
|
1038 | |||
1011 | - .hglf only matches largefiles, without .hglf it matches 9 bco sub/normal |
|
1039 | - .hglf only matches largefiles, without .hglf it matches 9 bco sub/normal | |
1012 |
$ hg log --template '{rev} |
|
1040 | $ hg log --template '{rev}:{node|short} {desc|firstline}\n' .hglf/sub | |
1013 | 8:a381d2c8c80e modify normal file and largefile in repo b |
|
1041 | 8:a381d2c8c80e modify normal file and largefile in repo b | |
1014 | 6:4355d653f84f edit files yet again |
|
1042 | 6:4355d653f84f edit files yet again | |
1015 | 5:9d5af5072dbd edit files again |
|
1043 | 5:9d5af5072dbd edit files again | |
1016 | 4:74c02385b94c move files |
|
1044 | 4:74c02385b94c move files | |
1017 | 1:ce8896473775 edit files |
|
1045 | 1:ce8896473775 edit files | |
1018 | 0:30d30fe6a5be add files |
|
1046 | 0:30d30fe6a5be add files | |
1019 |
$ hg log --template '{rev} |
|
1047 | $ hg log --template '{rev}:{node|short} {desc|firstline}\n' sub | |
1020 | 9:598410d3eb9a modify normal file largefile in repo d |
|
1048 | 9:598410d3eb9a modify normal file largefile in repo d | |
1021 | 8:a381d2c8c80e modify normal file and largefile in repo b |
|
1049 | 8:a381d2c8c80e modify normal file and largefile in repo b | |
1022 | 6:4355d653f84f edit files yet again |
|
1050 | 6:4355d653f84f edit files yet again | |
1023 | 5:9d5af5072dbd edit files again |
|
1051 | 5:9d5af5072dbd edit files again | |
1024 | 4:74c02385b94c move files |
|
1052 | 4:74c02385b94c move files | |
1025 | 1:ce8896473775 edit files |
|
1053 | 1:ce8896473775 edit files | |
1026 | 0:30d30fe6a5be add files |
|
1054 | 0:30d30fe6a5be add files | |
1027 |
|
1055 | |||
1028 | - globbing gives same result |
|
1056 | - globbing gives same result | |
1029 |
$ hg log --template '{rev} |
|
1057 | $ hg log --template '{rev}:{node|short} {desc|firstline}\n' 'glob:sub/*' | |
1030 | 9:598410d3eb9a modify normal file largefile in repo d |
|
1058 | 9:598410d3eb9a modify normal file largefile in repo d | |
1031 | 8:a381d2c8c80e modify normal file and largefile in repo b |
|
1059 | 8:a381d2c8c80e modify normal file and largefile in repo b | |
1032 | 6:4355d653f84f edit files yet again |
|
1060 | 6:4355d653f84f edit files yet again | |
1033 | 5:9d5af5072dbd edit files again |
|
1061 | 5:9d5af5072dbd edit files again | |
1034 | 4:74c02385b94c move files |
|
1062 | 4:74c02385b94c move files | |
1035 | 1:ce8896473775 edit files |
|
1063 | 1:ce8896473775 edit files | |
1036 | 0:30d30fe6a5be add files |
|
1064 | 0:30d30fe6a5be add files | |
1037 |
|
1065 | |||
1038 | Rollback on largefiles. |
|
1066 | Rollback on largefiles. | |
1039 |
|
1067 | |||
1040 | $ echo large4-modified-again > sub/large4 |
|
1068 | $ echo large4-modified-again > sub/large4 | |
1041 | $ hg commit -m "Modify large4 again" |
|
1069 | $ hg commit -m "Modify large4 again" | |
1042 | Invoking status precommit hook |
|
1070 | Invoking status precommit hook | |
1043 | M sub/large4 |
|
1071 | M sub/large4 | |
1044 | $ hg rollback |
|
1072 | $ hg rollback | |
1045 | repository tip rolled back to revision 9 (undo commit) |
|
1073 | repository tip rolled back to revision 9 (undo commit) | |
1046 | working directory now based on revision 9 |
|
1074 | working directory now based on revision 9 | |
1047 | $ hg st |
|
1075 | $ hg st | |
1048 | M sub/large4 |
|
1076 | M sub/large4 | |
1049 | $ hg log --template '{rev}:{node|short} {desc|firstline}\n' |
|
1077 | $ hg log --template '{rev}:{node|short} {desc|firstline}\n' | |
1050 | 9:598410d3eb9a modify normal file largefile in repo d |
|
1078 | 9:598410d3eb9a modify normal file largefile in repo d | |
1051 | 8:a381d2c8c80e modify normal file and largefile in repo b |
|
1079 | 8:a381d2c8c80e modify normal file and largefile in repo b | |
1052 | 7:daea875e9014 add/edit more largefiles |
|
1080 | 7:daea875e9014 add/edit more largefiles | |
1053 | 6:4355d653f84f edit files yet again |
|
1081 | 6:4355d653f84f edit files yet again | |
1054 | 5:9d5af5072dbd edit files again |
|
1082 | 5:9d5af5072dbd edit files again | |
1055 | 4:74c02385b94c move files |
|
1083 | 4:74c02385b94c move files | |
1056 | 3:9e8fbc4bce62 copy files |
|
1084 | 3:9e8fbc4bce62 copy files | |
1057 | 2:51a0ae4d5864 remove files |
|
1085 | 2:51a0ae4d5864 remove files | |
1058 | 1:ce8896473775 edit files |
|
1086 | 1:ce8896473775 edit files | |
1059 | 0:30d30fe6a5be add files |
|
1087 | 0:30d30fe6a5be add files | |
1060 | $ cat sub/large4 |
|
1088 | $ cat sub/large4 | |
1061 | large4-modified-again |
|
1089 | large4-modified-again | |
1062 |
|
1090 | |||
1063 | "update --check" refuses to update with uncommitted changes. |
|
1091 | "update --check" refuses to update with uncommitted changes. | |
1064 | $ hg update --check 8 |
|
1092 | $ hg update --check 8 | |
1065 | abort: uncommitted local changes |
|
1093 | abort: uncommitted local changes | |
1066 | [255] |
|
1094 | [255] | |
1067 |
|
1095 | |||
1068 | "update --clean" leaves correct largefiles in working copy, even when there is |
|
1096 | "update --clean" leaves correct largefiles in working copy, even when there is | |
1069 | .orig files from revert in .hglf. |
|
1097 | .orig files from revert in .hglf. | |
1070 |
|
1098 | |||
1071 | $ echo mistake > sub2/large7 |
|
1099 | $ echo mistake > sub2/large7 | |
1072 | $ hg revert sub2/large7 |
|
1100 | $ hg revert sub2/large7 | |
1073 | $ hg -q update --clean -r null |
|
1101 | $ hg -q update --clean -r null | |
1074 | $ hg update --clean |
|
1102 | $ hg update --clean | |
1075 | getting changed largefiles |
|
1103 | getting changed largefiles | |
1076 | 3 largefiles updated, 0 removed |
|
1104 | 3 largefiles updated, 0 removed | |
1077 | 5 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
1105 | 5 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
1078 | $ cat normal3 |
|
1106 | $ cat normal3 | |
1079 | normal3-modified |
|
1107 | normal3-modified | |
1080 | $ cat sub/normal4 |
|
1108 | $ cat sub/normal4 | |
1081 | normal4-modified |
|
1109 | normal4-modified | |
1082 | $ cat sub/large4 |
|
1110 | $ cat sub/large4 | |
1083 | large4-modified |
|
1111 | large4-modified | |
1084 | $ cat sub2/large6 |
|
1112 | $ cat sub2/large6 | |
1085 | large6-modified |
|
1113 | large6-modified | |
1086 | $ cat sub2/large7 |
|
1114 | $ cat sub2/large7 | |
1087 | large7 |
|
1115 | large7 | |
1088 | $ cat sub2/large7.orig |
|
1116 | $ cat sub2/large7.orig | |
1089 | mistake |
|
1117 | mistake | |
1090 | $ cat .hglf/sub2/large7.orig |
|
1118 | $ cat .hglf/sub2/large7.orig | |
1091 | 9dbfb2c79b1c40981b258c3efa1b10b03f18ad31 |
|
1119 | 9dbfb2c79b1c40981b258c3efa1b10b03f18ad31 | |
1092 |
|
1120 | |||
1093 | demonstrate misfeature: .orig file is overwritten on every update -C, |
|
1121 | demonstrate misfeature: .orig file is overwritten on every update -C, | |
1094 | also when clean: |
|
1122 | also when clean: | |
1095 | $ hg update --clean |
|
1123 | $ hg update --clean | |
1096 | getting changed largefiles |
|
1124 | getting changed largefiles | |
1097 | 0 largefiles updated, 0 removed |
|
1125 | 0 largefiles updated, 0 removed | |
1098 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
1126 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
1099 | $ cat sub2/large7.orig |
|
1127 | $ cat sub2/large7.orig | |
1100 | large7 |
|
1128 | large7 | |
1101 | $ rm sub2/large7.orig .hglf/sub2/large7.orig |
|
1129 | $ rm sub2/large7.orig .hglf/sub2/large7.orig | |
1102 |
|
1130 | |||
1103 | Now "update check" is happy. |
|
1131 | Now "update check" is happy. | |
1104 | $ hg update --check 8 |
|
1132 | $ hg update --check 8 | |
1105 | getting changed largefiles |
|
1133 | getting changed largefiles | |
1106 | 1 largefiles updated, 0 removed |
|
1134 | 1 largefiles updated, 0 removed | |
1107 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
1135 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
1108 | $ hg update --check |
|
1136 | $ hg update --check | |
1109 | getting changed largefiles |
|
1137 | getting changed largefiles | |
1110 | 1 largefiles updated, 0 removed |
|
1138 | 1 largefiles updated, 0 removed | |
1111 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
1139 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
1112 |
|
1140 | |||
1113 | Test removing empty largefiles directories on update |
|
1141 | Test removing empty largefiles directories on update | |
1114 | $ test -d sub2 && echo "sub2 exists" |
|
1142 | $ test -d sub2 && echo "sub2 exists" | |
1115 | sub2 exists |
|
1143 | sub2 exists | |
1116 | $ hg update -q null |
|
1144 | $ hg update -q null | |
1117 | $ test -d sub2 && echo "error: sub2 should not exist anymore" |
|
1145 | $ test -d sub2 && echo "error: sub2 should not exist anymore" | |
1118 | [1] |
|
1146 | [1] | |
1119 | $ hg update -q |
|
1147 | $ hg update -q | |
1120 |
|
1148 | |||
1121 | Test hg remove removes empty largefiles directories |
|
1149 | Test hg remove removes empty largefiles directories | |
1122 | $ test -d sub2 && echo "sub2 exists" |
|
1150 | $ test -d sub2 && echo "sub2 exists" | |
1123 | sub2 exists |
|
1151 | sub2 exists | |
1124 | $ hg remove sub2/* |
|
1152 | $ hg remove sub2/* | |
1125 | $ test -d sub2 && echo "error: sub2 should not exist anymore" |
|
1153 | $ test -d sub2 && echo "error: sub2 should not exist anymore" | |
1126 | [1] |
|
1154 | [1] | |
1127 | $ hg revert sub2/large6 sub2/large7 |
|
1155 | $ hg revert sub2/large6 sub2/large7 | |
1128 |
|
1156 | |||
1129 | "revert" works on largefiles (and normal files too). |
|
1157 | "revert" works on largefiles (and normal files too). | |
1130 | $ echo hack3 >> normal3 |
|
1158 | $ echo hack3 >> normal3 | |
1131 | $ echo hack4 >> sub/normal4 |
|
1159 | $ echo hack4 >> sub/normal4 | |
1132 | $ echo hack4 >> sub/large4 |
|
1160 | $ echo hack4 >> sub/large4 | |
1133 | $ rm sub2/large6 |
|
1161 | $ rm sub2/large6 | |
1134 | $ hg revert sub2/large6 |
|
1162 | $ hg revert sub2/large6 | |
1135 | $ hg rm sub2/large6 |
|
1163 | $ hg rm sub2/large6 | |
1136 | $ echo new >> sub2/large8 |
|
1164 | $ echo new >> sub2/large8 | |
1137 | $ hg add --large sub2/large8 |
|
1165 | $ hg add --large sub2/large8 | |
1138 | # XXX we don't really want to report that we're reverting the standin; |
|
1166 | # XXX we don't really want to report that we're reverting the standin; | |
1139 | # that's just an implementation detail. But I don't see an obvious fix. ;-( |
|
1167 | # that's just an implementation detail. But I don't see an obvious fix. ;-( | |
1140 | $ hg revert sub |
|
1168 | $ hg revert sub | |
1141 | reverting .hglf/sub/large4 (glob) |
|
1169 | reverting .hglf/sub/large4 (glob) | |
1142 | reverting sub/normal4 (glob) |
|
1170 | reverting sub/normal4 (glob) | |
1143 | $ hg status |
|
1171 | $ hg status | |
1144 | M normal3 |
|
1172 | M normal3 | |
1145 | A sub2/large8 |
|
1173 | A sub2/large8 | |
1146 | R sub2/large6 |
|
1174 | R sub2/large6 | |
1147 | ? sub/large4.orig |
|
1175 | ? sub/large4.orig | |
1148 | ? sub/normal4.orig |
|
1176 | ? sub/normal4.orig | |
1149 | $ cat sub/normal4 |
|
1177 | $ cat sub/normal4 | |
1150 | normal4-modified |
|
1178 | normal4-modified | |
1151 | $ cat sub/large4 |
|
1179 | $ cat sub/large4 | |
1152 | large4-modified |
|
1180 | large4-modified | |
1153 | $ hg revert -a --no-backup |
|
1181 | $ hg revert -a --no-backup | |
1154 | undeleting .hglf/sub2/large6 (glob) |
|
1182 | undeleting .hglf/sub2/large6 (glob) | |
1155 | forgetting .hglf/sub2/large8 (glob) |
|
1183 | forgetting .hglf/sub2/large8 (glob) | |
1156 | reverting normal3 |
|
1184 | reverting normal3 | |
1157 | $ hg status |
|
1185 | $ hg status | |
1158 | ? sub/large4.orig |
|
1186 | ? sub/large4.orig | |
1159 | ? sub/normal4.orig |
|
1187 | ? sub/normal4.orig | |
1160 | ? sub2/large8 |
|
1188 | ? sub2/large8 | |
1161 | $ cat normal3 |
|
1189 | $ cat normal3 | |
1162 | normal3-modified |
|
1190 | normal3-modified | |
1163 | $ cat sub2/large6 |
|
1191 | $ cat sub2/large6 | |
1164 | large6-modified |
|
1192 | large6-modified | |
1165 | $ rm sub/*.orig sub2/large8 |
|
1193 | $ rm sub/*.orig sub2/large8 | |
1166 |
|
1194 | |||
1167 | revert some files to an older revision |
|
1195 | revert some files to an older revision | |
1168 | $ hg revert --no-backup -r 8 sub2 |
|
1196 | $ hg revert --no-backup -r 8 sub2 | |
1169 | reverting .hglf/sub2/large6 (glob) |
|
1197 | reverting .hglf/sub2/large6 (glob) | |
1170 | $ cat sub2/large6 |
|
1198 | $ cat sub2/large6 | |
1171 | large6 |
|
1199 | large6 | |
1172 | $ hg revert --no-backup -C -r '.^' sub2 |
|
1200 | $ hg revert --no-backup -C -r '.^' sub2 | |
1173 | reverting .hglf/sub2/large6 (glob) |
|
1201 | reverting .hglf/sub2/large6 (glob) | |
1174 | $ hg revert --no-backup sub2 |
|
1202 | $ hg revert --no-backup sub2 | |
1175 | reverting .hglf/sub2/large6 (glob) |
|
1203 | reverting .hglf/sub2/large6 (glob) | |
1176 | $ hg status |
|
1204 | $ hg status | |
1177 |
|
1205 | |||
1178 | "verify --large" actually verifies largefiles |
|
1206 | "verify --large" actually verifies largefiles | |
1179 |
|
1207 | |||
1180 | - Where Do We Come From? What Are We? Where Are We Going? |
|
1208 | - Where Do We Come From? What Are We? Where Are We Going? | |
1181 | $ pwd |
|
1209 | $ pwd | |
1182 | $TESTTMP/e |
|
1210 | $TESTTMP/e | |
1183 | $ hg paths |
|
1211 | $ hg paths | |
1184 | default = $TESTTMP/d (glob) |
|
1212 | default = $TESTTMP/d (glob) | |
1185 |
|
1213 | |||
1186 | $ hg verify --large |
|
1214 | $ hg verify --large | |
1187 | checking changesets |
|
1215 | checking changesets | |
1188 | checking manifests |
|
1216 | checking manifests | |
1189 | crosschecking files in changesets and manifests |
|
1217 | crosschecking files in changesets and manifests | |
1190 | checking files |
|
1218 | checking files | |
1191 | 10 files, 10 changesets, 28 total revisions |
|
1219 | 10 files, 10 changesets, 28 total revisions | |
1192 | searching 1 changesets for largefiles |
|
1220 | searching 1 changesets for largefiles | |
1193 | verified existence of 3 revisions of 3 largefiles |
|
1221 | verified existence of 3 revisions of 3 largefiles | |
1194 |
|
1222 | |||
1195 | - introduce missing blob in local store repo and make sure that this is caught: |
|
1223 | - introduce missing blob in local store repo and make sure that this is caught: | |
1196 | $ mv $TESTTMP/d/.hg/largefiles/e166e74c7303192238d60af5a9c4ce9bef0b7928 . |
|
1224 | $ mv $TESTTMP/d/.hg/largefiles/e166e74c7303192238d60af5a9c4ce9bef0b7928 . | |
1197 | $ hg verify --large |
|
1225 | $ hg verify --large | |
1198 | checking changesets |
|
1226 | checking changesets | |
1199 | checking manifests |
|
1227 | checking manifests | |
1200 | crosschecking files in changesets and manifests |
|
1228 | crosschecking files in changesets and manifests | |
1201 | checking files |
|
1229 | checking files | |
1202 | 10 files, 10 changesets, 28 total revisions |
|
1230 | 10 files, 10 changesets, 28 total revisions | |
1203 | searching 1 changesets for largefiles |
|
1231 | searching 1 changesets for largefiles | |
1204 | changeset 9:598410d3eb9a: sub/large4 references missing $TESTTMP/d/.hg/largefiles/e166e74c7303192238d60af5a9c4ce9bef0b7928 (glob) |
|
1232 | changeset 9:598410d3eb9a: sub/large4 references missing $TESTTMP/d/.hg/largefiles/e166e74c7303192238d60af5a9c4ce9bef0b7928 (glob) | |
1205 | verified existence of 3 revisions of 3 largefiles |
|
1233 | verified existence of 3 revisions of 3 largefiles | |
1206 | [1] |
|
1234 | [1] | |
1207 |
|
1235 | |||
1208 | - introduce corruption and make sure that it is caught when checking content: |
|
1236 | - introduce corruption and make sure that it is caught when checking content: | |
1209 | $ echo '5 cents' > $TESTTMP/d/.hg/largefiles/e166e74c7303192238d60af5a9c4ce9bef0b7928 |
|
1237 | $ echo '5 cents' > $TESTTMP/d/.hg/largefiles/e166e74c7303192238d60af5a9c4ce9bef0b7928 | |
1210 | $ hg verify -q --large --lfc |
|
1238 | $ hg verify -q --large --lfc | |
1211 | changeset 9:598410d3eb9a: sub/large4 references corrupted $TESTTMP/d/.hg/largefiles/e166e74c7303192238d60af5a9c4ce9bef0b7928 (glob) |
|
1239 | changeset 9:598410d3eb9a: sub/large4 references corrupted $TESTTMP/d/.hg/largefiles/e166e74c7303192238d60af5a9c4ce9bef0b7928 (glob) | |
1212 | [1] |
|
1240 | [1] | |
1213 |
|
1241 | |||
1214 | - cleanup |
|
1242 | - cleanup | |
1215 | $ mv e166e74c7303192238d60af5a9c4ce9bef0b7928 $TESTTMP/d/.hg/largefiles/ |
|
1243 | $ mv e166e74c7303192238d60af5a9c4ce9bef0b7928 $TESTTMP/d/.hg/largefiles/ | |
1216 |
|
1244 | |||
1217 | - verifying all revisions will fail because we didn't clone all largefiles to d: |
|
1245 | - verifying all revisions will fail because we didn't clone all largefiles to d: | |
1218 | $ echo 'T-shirt' > $TESTTMP/d/.hg/largefiles/eb7338044dc27f9bc59b8dd5a246b065ead7a9c4 |
|
1246 | $ echo 'T-shirt' > $TESTTMP/d/.hg/largefiles/eb7338044dc27f9bc59b8dd5a246b065ead7a9c4 | |
1219 | $ hg verify -q --lfa --lfc |
|
1247 | $ hg verify -q --lfa --lfc | |
1220 | changeset 0:30d30fe6a5be: large1 references missing $TESTTMP/d/.hg/largefiles/4669e532d5b2c093a78eca010077e708a071bb64 (glob) |
|
1248 | changeset 0:30d30fe6a5be: large1 references missing $TESTTMP/d/.hg/largefiles/4669e532d5b2c093a78eca010077e708a071bb64 (glob) | |
1221 | changeset 0:30d30fe6a5be: sub/large2 references missing $TESTTMP/d/.hg/largefiles/1deebade43c8c498a3c8daddac0244dc55d1331d (glob) |
|
1249 | changeset 0:30d30fe6a5be: sub/large2 references missing $TESTTMP/d/.hg/largefiles/1deebade43c8c498a3c8daddac0244dc55d1331d (glob) | |
1222 | changeset 1:ce8896473775: large1 references missing $TESTTMP/d/.hg/largefiles/5f78770c0e77ba4287ad6ef3071c9bf9c379742f (glob) |
|
1250 | changeset 1:ce8896473775: large1 references missing $TESTTMP/d/.hg/largefiles/5f78770c0e77ba4287ad6ef3071c9bf9c379742f (glob) | |
1223 | changeset 1:ce8896473775: sub/large2 references corrupted $TESTTMP/d/.hg/largefiles/eb7338044dc27f9bc59b8dd5a246b065ead7a9c4 (glob) |
|
1251 | changeset 1:ce8896473775: sub/large2 references corrupted $TESTTMP/d/.hg/largefiles/eb7338044dc27f9bc59b8dd5a246b065ead7a9c4 (glob) | |
1224 | changeset 3:9e8fbc4bce62: large1 references corrupted $TESTTMP/d/.hg/largefiles/eb7338044dc27f9bc59b8dd5a246b065ead7a9c4 (glob) |
|
1252 | changeset 3:9e8fbc4bce62: large1 references corrupted $TESTTMP/d/.hg/largefiles/eb7338044dc27f9bc59b8dd5a246b065ead7a9c4 (glob) | |
1225 | changeset 4:74c02385b94c: large3 references corrupted $TESTTMP/d/.hg/largefiles/eb7338044dc27f9bc59b8dd5a246b065ead7a9c4 (glob) |
|
1253 | changeset 4:74c02385b94c: large3 references corrupted $TESTTMP/d/.hg/largefiles/eb7338044dc27f9bc59b8dd5a246b065ead7a9c4 (glob) | |
1226 | changeset 4:74c02385b94c: sub/large4 references corrupted $TESTTMP/d/.hg/largefiles/eb7338044dc27f9bc59b8dd5a246b065ead7a9c4 (glob) |
|
1254 | changeset 4:74c02385b94c: sub/large4 references corrupted $TESTTMP/d/.hg/largefiles/eb7338044dc27f9bc59b8dd5a246b065ead7a9c4 (glob) | |
1227 | changeset 5:9d5af5072dbd: large3 references missing $TESTTMP/d/.hg/largefiles/baaf12afde9d8d67f25dab6dced0d2bf77dba47c (glob) |
|
1255 | changeset 5:9d5af5072dbd: large3 references missing $TESTTMP/d/.hg/largefiles/baaf12afde9d8d67f25dab6dced0d2bf77dba47c (glob) | |
1228 | changeset 5:9d5af5072dbd: sub/large4 references missing $TESTTMP/d/.hg/largefiles/aeb2210d19f02886dde00dac279729a48471e2f9 (glob) |
|
1256 | changeset 5:9d5af5072dbd: sub/large4 references missing $TESTTMP/d/.hg/largefiles/aeb2210d19f02886dde00dac279729a48471e2f9 (glob) | |
1229 | changeset 6:4355d653f84f: large3 references missing $TESTTMP/d/.hg/largefiles/7838695e10da2bb75ac1156565f40a2595fa2fa0 (glob) |
|
1257 | changeset 6:4355d653f84f: large3 references missing $TESTTMP/d/.hg/largefiles/7838695e10da2bb75ac1156565f40a2595fa2fa0 (glob) | |
1230 | [1] |
|
1258 | [1] | |
1231 |
|
1259 | |||
1232 | - cleanup |
|
1260 | - cleanup | |
1233 | $ rm $TESTTMP/d/.hg/largefiles/eb7338044dc27f9bc59b8dd5a246b065ead7a9c4 |
|
1261 | $ rm $TESTTMP/d/.hg/largefiles/eb7338044dc27f9bc59b8dd5a246b065ead7a9c4 | |
1234 | $ rm -f .hglf/sub/*.orig |
|
1262 | $ rm -f .hglf/sub/*.orig | |
1235 |
|
1263 | |||
1236 | Update to revision with missing largefile - and make sure it really is missing |
|
1264 | Update to revision with missing largefile - and make sure it really is missing | |
1237 |
|
1265 | |||
1238 | $ rm ${USERCACHE}/7838695e10da2bb75ac1156565f40a2595fa2fa0 |
|
1266 | $ rm ${USERCACHE}/7838695e10da2bb75ac1156565f40a2595fa2fa0 | |
1239 | $ hg up -r 6 |
|
1267 | $ hg up -r 6 | |
1240 | getting changed largefiles |
|
1268 | getting changed largefiles | |
1241 | error getting id 7838695e10da2bb75ac1156565f40a2595fa2fa0 from url file:$TESTTMP/d for file large3: can't get file locally (glob) |
|
1269 | error getting id 7838695e10da2bb75ac1156565f40a2595fa2fa0 from url file:$TESTTMP/d for file large3: can't get file locally (glob) | |
1242 | 1 largefiles updated, 2 removed |
|
1270 | 1 largefiles updated, 2 removed | |
1243 | 4 files updated, 0 files merged, 2 files removed, 0 files unresolved |
|
1271 | 4 files updated, 0 files merged, 2 files removed, 0 files unresolved | |
1244 | $ rm normal3 |
|
1272 | $ rm normal3 | |
1245 | $ echo >> sub/normal4 |
|
1273 | $ echo >> sub/normal4 | |
1246 | $ hg ci -m 'commit with missing files' |
|
1274 | $ hg ci -m 'commit with missing files' | |
1247 | Invoking status precommit hook |
|
1275 | Invoking status precommit hook | |
1248 | M sub/normal4 |
|
1276 | M sub/normal4 | |
1249 | ! large3 |
|
1277 | ! large3 | |
1250 | ! normal3 |
|
1278 | ! normal3 | |
1251 | created new head |
|
1279 | created new head | |
1252 | $ hg st |
|
1280 | $ hg st | |
1253 | ! large3 |
|
1281 | ! large3 | |
1254 | ! normal3 |
|
1282 | ! normal3 | |
1255 | $ hg up -r. |
|
1283 | $ hg up -r. | |
1256 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
1284 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
1257 | $ hg st |
|
1285 | $ hg st | |
1258 | ! large3 |
|
1286 | ! large3 | |
1259 | ! normal3 |
|
1287 | ! normal3 | |
1260 | $ hg up -Cr. |
|
1288 | $ hg up -Cr. | |
1261 | getting changed largefiles |
|
1289 | getting changed largefiles | |
1262 | error getting id 7838695e10da2bb75ac1156565f40a2595fa2fa0 from url file:$TESTTMP/d for file large3: can't get file locally (glob) |
|
1290 | error getting id 7838695e10da2bb75ac1156565f40a2595fa2fa0 from url file:$TESTTMP/d for file large3: can't get file locally (glob) | |
1263 | 0 largefiles updated, 0 removed |
|
1291 | 0 largefiles updated, 0 removed | |
1264 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
1292 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
1265 | $ hg st |
|
1293 | $ hg st | |
1266 | ! large3 |
|
1294 | ! large3 | |
1267 | $ hg rollback |
|
1295 | $ hg rollback | |
1268 | repository tip rolled back to revision 9 (undo commit) |
|
1296 | repository tip rolled back to revision 9 (undo commit) | |
1269 | working directory now based on revision 6 |
|
1297 | working directory now based on revision 6 | |
1270 |
|
1298 | |||
1271 | Merge with revision with missing largefile - and make sure it tries to fetch it. |
|
1299 | Merge with revision with missing largefile - and make sure it tries to fetch it. | |
1272 |
|
1300 | |||
1273 | $ hg up -Cqr null |
|
1301 | $ hg up -Cqr null | |
1274 | $ echo f > f |
|
1302 | $ echo f > f | |
1275 | $ hg ci -Am branch |
|
1303 | $ hg ci -Am branch | |
1276 | adding f |
|
1304 | adding f | |
1277 | Invoking status precommit hook |
|
1305 | Invoking status precommit hook | |
1278 | A f |
|
1306 | A f | |
1279 | created new head |
|
1307 | created new head | |
1280 | $ hg merge -r 6 |
|
1308 | $ hg merge -r 6 | |
1281 | 4 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
1309 | 4 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
1282 | (branch merge, don't forget to commit) |
|
1310 | (branch merge, don't forget to commit) | |
1283 | getting changed largefiles |
|
1311 | getting changed largefiles | |
1284 | error getting id 7838695e10da2bb75ac1156565f40a2595fa2fa0 from url file:$TESTTMP/d for file large3: can't get file locally (glob) |
|
1312 | error getting id 7838695e10da2bb75ac1156565f40a2595fa2fa0 from url file:$TESTTMP/d for file large3: can't get file locally (glob) | |
1285 | 1 largefiles updated, 0 removed |
|
1313 | 1 largefiles updated, 0 removed | |
1286 |
|
1314 | |||
1287 | $ hg rollback -q |
|
1315 | $ hg rollback -q | |
1288 | $ hg up -Cq |
|
1316 | $ hg up -Cq | |
1289 |
|
1317 | |||
1290 | Pulling 0 revisions with --all-largefiles should not fetch for all revisions |
|
1318 | Pulling 0 revisions with --all-largefiles should not fetch for all revisions | |
1291 |
|
1319 | |||
1292 | $ hg pull --all-largefiles |
|
1320 | $ hg pull --all-largefiles | |
1293 | pulling from $TESTTMP/d (glob) |
|
1321 | pulling from $TESTTMP/d (glob) | |
1294 | searching for changes |
|
1322 | searching for changes | |
1295 | no changes found |
|
1323 | no changes found | |
1296 | 0 additional largefiles cached |
|
1324 | 0 additional largefiles cached | |
1297 |
|
1325 | |||
1298 | Merging does not revert to old versions of largefiles and also check |
|
1326 | Merging does not revert to old versions of largefiles and also check | |
1299 | that merging after having pulled from a non-default remote works |
|
1327 | that merging after having pulled from a non-default remote works | |
1300 | correctly. |
|
1328 | correctly. | |
1301 |
|
1329 | |||
1302 | $ cd .. |
|
1330 | $ cd .. | |
1303 | $ hg clone -r 7 e temp |
|
1331 | $ hg clone -r 7 e temp | |
1304 | adding changesets |
|
1332 | adding changesets | |
1305 | adding manifests |
|
1333 | adding manifests | |
1306 | adding file changes |
|
1334 | adding file changes | |
1307 | added 8 changesets with 24 changes to 10 files |
|
1335 | added 8 changesets with 24 changes to 10 files | |
1308 | updating to branch default |
|
1336 | updating to branch default | |
1309 | getting changed largefiles |
|
1337 | getting changed largefiles | |
1310 | 3 largefiles updated, 0 removed |
|
1338 | 3 largefiles updated, 0 removed | |
1311 | 5 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
1339 | 5 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
1312 | $ hg clone temp f |
|
1340 | $ hg clone temp f | |
1313 | updating to branch default |
|
1341 | updating to branch default | |
1314 | getting changed largefiles |
|
1342 | getting changed largefiles | |
1315 | 3 largefiles updated, 0 removed |
|
1343 | 3 largefiles updated, 0 removed | |
1316 | 5 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
1344 | 5 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
1317 | # Delete the largefiles in the largefiles system cache so that we have an |
|
1345 | # Delete the largefiles in the largefiles system cache so that we have an | |
1318 | # opportunity to test that caching after a pull works. |
|
1346 | # opportunity to test that caching after a pull works. | |
1319 | $ rm "${USERCACHE}"/* |
|
1347 | $ rm "${USERCACHE}"/* | |
1320 | $ cd f |
|
1348 | $ cd f | |
1321 | $ echo "large4-merge-test" > sub/large4 |
|
1349 | $ echo "large4-merge-test" > sub/large4 | |
1322 | $ hg commit -m "Modify large4 to test merge" |
|
1350 | $ hg commit -m "Modify large4 to test merge" | |
1323 | Invoking status precommit hook |
|
1351 | Invoking status precommit hook | |
1324 | M sub/large4 |
|
1352 | M sub/large4 | |
1325 | # Test --cache-largefiles flag |
|
1353 | # Test --cache-largefiles flag | |
1326 | $ hg pull --cache-largefiles ../e |
|
1354 | $ hg pull --cache-largefiles ../e | |
1327 | pulling from ../e |
|
1355 | pulling from ../e | |
1328 | searching for changes |
|
1356 | searching for changes | |
1329 | adding changesets |
|
1357 | adding changesets | |
1330 | adding manifests |
|
1358 | adding manifests | |
1331 | adding file changes |
|
1359 | adding file changes | |
1332 | added 2 changesets with 4 changes to 4 files (+1 heads) |
|
1360 | added 2 changesets with 4 changes to 4 files (+1 heads) | |
1333 | (run 'hg heads' to see heads, 'hg merge' to merge) |
|
1361 | (run 'hg heads' to see heads, 'hg merge' to merge) | |
1334 | caching largefiles for 1 heads |
|
1362 | caching largefiles for 1 heads | |
1335 | 2 largefiles cached |
|
1363 | 2 largefiles cached | |
1336 | $ hg merge |
|
1364 | $ hg merge | |
1337 | merging sub/large4 |
|
1365 | merging sub/large4 | |
1338 | largefile sub/large4 has a merge conflict |
|
1366 | largefile sub/large4 has a merge conflict | |
1339 | keep (l)ocal or take (o)ther? l |
|
1367 | keep (l)ocal or take (o)ther? l | |
1340 | 3 files updated, 1 files merged, 0 files removed, 0 files unresolved |
|
1368 | 3 files updated, 1 files merged, 0 files removed, 0 files unresolved | |
1341 | (branch merge, don't forget to commit) |
|
1369 | (branch merge, don't forget to commit) | |
1342 | getting changed largefiles |
|
1370 | getting changed largefiles | |
1343 | 1 largefiles updated, 0 removed |
|
1371 | 1 largefiles updated, 0 removed | |
1344 | $ hg commit -m "Merge repos e and f" |
|
1372 | $ hg commit -m "Merge repos e and f" | |
1345 | Invoking status precommit hook |
|
1373 | Invoking status precommit hook | |
1346 | M normal3 |
|
1374 | M normal3 | |
1347 | M sub/normal4 |
|
1375 | M sub/normal4 | |
1348 | M sub2/large6 |
|
1376 | M sub2/large6 | |
1349 | $ cat normal3 |
|
1377 | $ cat normal3 | |
1350 | normal3-modified |
|
1378 | normal3-modified | |
1351 | $ cat sub/normal4 |
|
1379 | $ cat sub/normal4 | |
1352 | normal4-modified |
|
1380 | normal4-modified | |
1353 | $ cat sub/large4 |
|
1381 | $ cat sub/large4 | |
1354 | large4-merge-test |
|
1382 | large4-merge-test | |
1355 | $ cat sub2/large6 |
|
1383 | $ cat sub2/large6 | |
1356 | large6-modified |
|
1384 | large6-modified | |
1357 | $ cat sub2/large7 |
|
1385 | $ cat sub2/large7 | |
1358 | large7 |
|
1386 | large7 | |
1359 |
|
1387 | |||
1360 | Test status after merging with a branch that introduces a new largefile: |
|
1388 | Test status after merging with a branch that introduces a new largefile: | |
1361 |
|
1389 | |||
1362 | $ echo large > large |
|
1390 | $ echo large > large | |
1363 | $ hg add --large large |
|
1391 | $ hg add --large large | |
1364 | $ hg commit -m 'add largefile' |
|
1392 | $ hg commit -m 'add largefile' | |
1365 | Invoking status precommit hook |
|
1393 | Invoking status precommit hook | |
1366 | A large |
|
1394 | A large | |
1367 | $ hg update -q ".^" |
|
1395 | $ hg update -q ".^" | |
1368 | $ echo change >> normal3 |
|
1396 | $ echo change >> normal3 | |
1369 | $ hg commit -m 'some change' |
|
1397 | $ hg commit -m 'some change' | |
1370 | Invoking status precommit hook |
|
1398 | Invoking status precommit hook | |
1371 | M normal3 |
|
1399 | M normal3 | |
1372 | created new head |
|
1400 | created new head | |
1373 | $ hg merge |
|
1401 | $ hg merge | |
1374 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
1402 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
1375 | (branch merge, don't forget to commit) |
|
1403 | (branch merge, don't forget to commit) | |
1376 | getting changed largefiles |
|
1404 | getting changed largefiles | |
1377 | 1 largefiles updated, 0 removed |
|
1405 | 1 largefiles updated, 0 removed | |
1378 | $ hg status |
|
1406 | $ hg status | |
1379 | M large |
|
1407 | M large | |
1380 |
|
1408 | |||
1381 | - make sure update of merge with removed largefiles fails as expected |
|
1409 | - make sure update of merge with removed largefiles fails as expected | |
1382 | $ hg rm sub2/large6 |
|
1410 | $ hg rm sub2/large6 | |
1383 | $ hg up -r. |
|
1411 | $ hg up -r. | |
1384 | abort: outstanding uncommitted merges |
|
1412 | abort: outstanding uncommitted merges | |
1385 | [255] |
|
1413 | [255] | |
1386 |
|
1414 | |||
1387 | - revert should be able to revert files introduced in a pending merge |
|
1415 | - revert should be able to revert files introduced in a pending merge | |
1388 | $ hg revert --all -r . |
|
1416 | $ hg revert --all -r . | |
1389 | removing .hglf/large (glob) |
|
1417 | removing .hglf/large (glob) | |
1390 | undeleting .hglf/sub2/large6 (glob) |
|
1418 | undeleting .hglf/sub2/large6 (glob) | |
1391 |
|
1419 | |||
1392 | Test that a normal file and a largefile with the same name and path cannot |
|
1420 | Test that a normal file and a largefile with the same name and path cannot | |
1393 | coexist. |
|
1421 | coexist. | |
1394 |
|
1422 | |||
1395 | $ rm sub2/large7 |
|
1423 | $ rm sub2/large7 | |
1396 | $ echo "largeasnormal" > sub2/large7 |
|
1424 | $ echo "largeasnormal" > sub2/large7 | |
1397 | $ hg add sub2/large7 |
|
1425 | $ hg add sub2/large7 | |
1398 | sub2/large7 already a largefile |
|
1426 | sub2/large7 already a largefile | |
1399 |
|
1427 | |||
1400 | Test that transplanting a largefile change works correctly. |
|
1428 | Test that transplanting a largefile change works correctly. | |
1401 |
|
1429 | |||
1402 | $ cd .. |
|
1430 | $ cd .. | |
1403 | $ hg clone -r 8 d g |
|
1431 | $ hg clone -r 8 d g | |
1404 | adding changesets |
|
1432 | adding changesets | |
1405 | adding manifests |
|
1433 | adding manifests | |
1406 | adding file changes |
|
1434 | adding file changes | |
1407 | added 9 changesets with 26 changes to 10 files |
|
1435 | added 9 changesets with 26 changes to 10 files | |
1408 | updating to branch default |
|
1436 | updating to branch default | |
1409 | getting changed largefiles |
|
1437 | getting changed largefiles | |
1410 | 3 largefiles updated, 0 removed |
|
1438 | 3 largefiles updated, 0 removed | |
1411 | 5 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
1439 | 5 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
1412 | $ cd g |
|
1440 | $ cd g | |
1413 | $ hg transplant -s ../d 598410d3eb9a |
|
1441 | $ hg transplant -s ../d 598410d3eb9a | |
1414 | searching for changes |
|
1442 | searching for changes | |
1415 | searching for changes |
|
1443 | searching for changes | |
1416 | adding changesets |
|
1444 | adding changesets | |
1417 | adding manifests |
|
1445 | adding manifests | |
1418 | adding file changes |
|
1446 | adding file changes | |
1419 | added 1 changesets with 2 changes to 2 files |
|
1447 | added 1 changesets with 2 changes to 2 files | |
1420 | getting changed largefiles |
|
1448 | getting changed largefiles | |
1421 | 1 largefiles updated, 0 removed |
|
1449 | 1 largefiles updated, 0 removed | |
1422 | $ hg log --template '{rev}:{node|short} {desc|firstline}\n' |
|
1450 | $ hg log --template '{rev}:{node|short} {desc|firstline}\n' | |
1423 | 9:598410d3eb9a modify normal file largefile in repo d |
|
1451 | 9:598410d3eb9a modify normal file largefile in repo d | |
1424 | 8:a381d2c8c80e modify normal file and largefile in repo b |
|
1452 | 8:a381d2c8c80e modify normal file and largefile in repo b | |
1425 | 7:daea875e9014 add/edit more largefiles |
|
1453 | 7:daea875e9014 add/edit more largefiles | |
1426 | 6:4355d653f84f edit files yet again |
|
1454 | 6:4355d653f84f edit files yet again | |
1427 | 5:9d5af5072dbd edit files again |
|
1455 | 5:9d5af5072dbd edit files again | |
1428 | 4:74c02385b94c move files |
|
1456 | 4:74c02385b94c move files | |
1429 | 3:9e8fbc4bce62 copy files |
|
1457 | 3:9e8fbc4bce62 copy files | |
1430 | 2:51a0ae4d5864 remove files |
|
1458 | 2:51a0ae4d5864 remove files | |
1431 | 1:ce8896473775 edit files |
|
1459 | 1:ce8896473775 edit files | |
1432 | 0:30d30fe6a5be add files |
|
1460 | 0:30d30fe6a5be add files | |
1433 | $ cat normal3 |
|
1461 | $ cat normal3 | |
1434 | normal3-modified |
|
1462 | normal3-modified | |
1435 | $ cat sub/normal4 |
|
1463 | $ cat sub/normal4 | |
1436 | normal4-modified |
|
1464 | normal4-modified | |
1437 | $ cat sub/large4 |
|
1465 | $ cat sub/large4 | |
1438 | large4-modified |
|
1466 | large4-modified | |
1439 | $ cat sub2/large6 |
|
1467 | $ cat sub2/large6 | |
1440 | large6-modified |
|
1468 | large6-modified | |
1441 | $ cat sub2/large7 |
|
1469 | $ cat sub2/large7 | |
1442 | large7 |
|
1470 | large7 | |
1443 |
|
1471 | |||
1444 | Cat a largefile |
|
1472 | Cat a largefile | |
1445 | $ hg cat normal3 |
|
1473 | $ hg cat normal3 | |
1446 | normal3-modified |
|
1474 | normal3-modified | |
1447 | $ hg cat sub/large4 |
|
1475 | $ hg cat sub/large4 | |
1448 | large4-modified |
|
1476 | large4-modified | |
1449 | $ rm "${USERCACHE}"/* |
|
1477 | $ rm "${USERCACHE}"/* | |
1450 | $ hg cat -r a381d2c8c80e -o cat.out sub/large4 |
|
1478 | $ hg cat -r a381d2c8c80e -o cat.out sub/large4 | |
1451 | $ cat cat.out |
|
1479 | $ cat cat.out | |
1452 | large4-modified |
|
1480 | large4-modified | |
1453 | $ rm cat.out |
|
1481 | $ rm cat.out | |
1454 | $ hg cat -r a381d2c8c80e normal3 |
|
1482 | $ hg cat -r a381d2c8c80e normal3 | |
1455 | normal3-modified |
|
1483 | normal3-modified | |
1456 | $ hg cat -r '.^' normal3 |
|
1484 | $ hg cat -r '.^' normal3 | |
1457 | normal3-modified |
|
1485 | normal3-modified | |
1458 | $ hg cat -r '.^' sub/large4 doesntexist |
|
1486 | $ hg cat -r '.^' sub/large4 doesntexist | |
1459 | large4-modified |
|
1487 | large4-modified | |
1460 | doesntexist: no such file in rev a381d2c8c80e |
|
1488 | doesntexist: no such file in rev a381d2c8c80e | |
1461 | [1] |
|
1489 | [1] | |
1462 |
|
1490 | |||
1463 | Test that renaming a largefile results in correct output for status |
|
1491 | Test that renaming a largefile results in correct output for status | |
1464 |
|
1492 | |||
1465 | $ hg rename sub/large4 large4-renamed |
|
1493 | $ hg rename sub/large4 large4-renamed | |
1466 | $ hg commit -m "test rename output" |
|
1494 | $ hg commit -m "test rename output" | |
1467 | Invoking status precommit hook |
|
1495 | Invoking status precommit hook | |
1468 | A large4-renamed |
|
1496 | A large4-renamed | |
1469 | R sub/large4 |
|
1497 | R sub/large4 | |
1470 | $ cat large4-renamed |
|
1498 | $ cat large4-renamed | |
1471 | large4-modified |
|
1499 | large4-modified | |
1472 | $ cd sub2 |
|
1500 | $ cd sub2 | |
1473 | $ hg rename large6 large6-renamed |
|
1501 | $ hg rename large6 large6-renamed | |
1474 | $ hg st |
|
1502 | $ hg st | |
1475 | A sub2/large6-renamed |
|
1503 | A sub2/large6-renamed | |
1476 | R sub2/large6 |
|
1504 | R sub2/large6 | |
1477 | $ cd .. |
|
1505 | $ cd .. | |
1478 |
|
1506 | |||
1479 | Test --normal flag |
|
1507 | Test --normal flag | |
1480 |
|
1508 | |||
1481 | $ dd if=/dev/zero bs=2k count=11k > new-largefile 2> /dev/null |
|
1509 | $ dd if=/dev/zero bs=2k count=11k > new-largefile 2> /dev/null | |
1482 | $ hg add --normal --large new-largefile |
|
1510 | $ hg add --normal --large new-largefile | |
1483 | abort: --normal cannot be used with --large |
|
1511 | abort: --normal cannot be used with --large | |
1484 | [255] |
|
1512 | [255] | |
1485 | $ hg add --normal new-largefile |
|
1513 | $ hg add --normal new-largefile | |
1486 | new-largefile: up to 69 MB of RAM may be required to manage this file |
|
1514 | new-largefile: up to 69 MB of RAM may be required to manage this file | |
1487 | (use 'hg revert new-largefile' to cancel the pending addition) |
|
1515 | (use 'hg revert new-largefile' to cancel the pending addition) | |
1488 | $ cd .. |
|
1516 | $ cd .. | |
1489 |
|
1517 | |||
1490 | #if serve |
|
1518 | #if serve | |
1491 | vanilla clients not locked out from largefiles servers on vanilla repos |
|
1519 | vanilla clients not locked out from largefiles servers on vanilla repos | |
1492 | $ mkdir r1 |
|
1520 | $ mkdir r1 | |
1493 | $ cd r1 |
|
1521 | $ cd r1 | |
1494 | $ hg init |
|
1522 | $ hg init | |
1495 | $ echo c1 > f1 |
|
1523 | $ echo c1 > f1 | |
1496 | $ hg add f1 |
|
1524 | $ hg add f1 | |
1497 | $ hg commit -m "m1" |
|
1525 | $ hg commit -m "m1" | |
1498 | Invoking status precommit hook |
|
1526 | Invoking status precommit hook | |
1499 | A f1 |
|
1527 | A f1 | |
1500 | $ cd .. |
|
1528 | $ cd .. | |
1501 | $ hg serve -R r1 -d -p $HGPORT --pid-file hg.pid |
|
1529 | $ hg serve -R r1 -d -p $HGPORT --pid-file hg.pid | |
1502 | $ cat hg.pid >> $DAEMON_PIDS |
|
1530 | $ cat hg.pid >> $DAEMON_PIDS | |
1503 | $ hg --config extensions.largefiles=! clone http://localhost:$HGPORT r2 |
|
1531 | $ hg --config extensions.largefiles=! clone http://localhost:$HGPORT r2 | |
1504 | requesting all changes |
|
1532 | requesting all changes | |
1505 | adding changesets |
|
1533 | adding changesets | |
1506 | adding manifests |
|
1534 | adding manifests | |
1507 | adding file changes |
|
1535 | adding file changes | |
1508 | added 1 changesets with 1 changes to 1 files |
|
1536 | added 1 changesets with 1 changes to 1 files | |
1509 | updating to branch default |
|
1537 | updating to branch default | |
1510 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
1538 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
1511 |
|
1539 | |||
1512 | largefiles clients still work with vanilla servers |
|
1540 | largefiles clients still work with vanilla servers | |
1513 | $ hg --config extensions.largefiles=! serve -R r1 -d -p $HGPORT1 --pid-file hg.pid |
|
1541 | $ hg --config extensions.largefiles=! serve -R r1 -d -p $HGPORT1 --pid-file hg.pid | |
1514 | $ cat hg.pid >> $DAEMON_PIDS |
|
1542 | $ cat hg.pid >> $DAEMON_PIDS | |
1515 | $ hg clone http://localhost:$HGPORT1 r3 |
|
1543 | $ hg clone http://localhost:$HGPORT1 r3 | |
1516 | requesting all changes |
|
1544 | requesting all changes | |
1517 | adding changesets |
|
1545 | adding changesets | |
1518 | adding manifests |
|
1546 | adding manifests | |
1519 | adding file changes |
|
1547 | adding file changes | |
1520 | added 1 changesets with 1 changes to 1 files |
|
1548 | added 1 changesets with 1 changes to 1 files | |
1521 | updating to branch default |
|
1549 | updating to branch default | |
1522 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
1550 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
1523 | #endif |
|
1551 | #endif | |
1524 |
|
1552 | |||
1525 |
|
1553 | |||
1526 | vanilla clients locked out from largefiles http repos |
|
1554 | vanilla clients locked out from largefiles http repos | |
1527 | $ mkdir r4 |
|
1555 | $ mkdir r4 | |
1528 | $ cd r4 |
|
1556 | $ cd r4 | |
1529 | $ hg init |
|
1557 | $ hg init | |
1530 | $ echo c1 > f1 |
|
1558 | $ echo c1 > f1 | |
1531 | $ hg add --large f1 |
|
1559 | $ hg add --large f1 | |
1532 | $ hg commit -m "m1" |
|
1560 | $ hg commit -m "m1" | |
1533 | Invoking status precommit hook |
|
1561 | Invoking status precommit hook | |
1534 | A f1 |
|
1562 | A f1 | |
1535 | $ cd .. |
|
1563 | $ cd .. | |
1536 |
|
1564 | |||
1537 | largefiles can be pushed locally (issue3583) |
|
1565 | largefiles can be pushed locally (issue3583) | |
1538 | $ hg init dest |
|
1566 | $ hg init dest | |
1539 | $ cd r4 |
|
1567 | $ cd r4 | |
1540 | $ hg outgoing ../dest |
|
1568 | $ hg outgoing ../dest | |
1541 | comparing with ../dest |
|
1569 | comparing with ../dest | |
1542 | searching for changes |
|
1570 | searching for changes | |
1543 | changeset: 0:639881c12b4c |
|
1571 | changeset: 0:639881c12b4c | |
1544 | tag: tip |
|
1572 | tag: tip | |
1545 | user: test |
|
1573 | user: test | |
1546 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
1574 | date: Thu Jan 01 00:00:00 1970 +0000 | |
1547 | summary: m1 |
|
1575 | summary: m1 | |
1548 |
|
1576 | |||
1549 | $ hg push ../dest |
|
1577 | $ hg push ../dest | |
1550 | pushing to ../dest |
|
1578 | pushing to ../dest | |
1551 | searching for changes |
|
1579 | searching for changes | |
1552 | searching for changes |
|
1580 | searching for changes | |
1553 | adding changesets |
|
1581 | adding changesets | |
1554 | adding manifests |
|
1582 | adding manifests | |
1555 | adding file changes |
|
1583 | adding file changes | |
1556 | added 1 changesets with 1 changes to 1 files |
|
1584 | added 1 changesets with 1 changes to 1 files | |
1557 |
|
1585 | |||
1558 | exit code with nothing outgoing (issue3611) |
|
1586 | exit code with nothing outgoing (issue3611) | |
1559 | $ hg outgoing ../dest |
|
1587 | $ hg outgoing ../dest | |
1560 | comparing with ../dest |
|
1588 | comparing with ../dest | |
1561 | searching for changes |
|
1589 | searching for changes | |
1562 | no changes found |
|
1590 | no changes found | |
1563 | [1] |
|
1591 | [1] | |
1564 | $ cd .. |
|
1592 | $ cd .. | |
1565 |
|
1593 | |||
1566 | #if serve |
|
1594 | #if serve | |
1567 | $ hg serve -R r4 -d -p $HGPORT2 --pid-file hg.pid |
|
1595 | $ hg serve -R r4 -d -p $HGPORT2 --pid-file hg.pid | |
1568 | $ cat hg.pid >> $DAEMON_PIDS |
|
1596 | $ cat hg.pid >> $DAEMON_PIDS | |
1569 | $ hg --config extensions.largefiles=! clone http://localhost:$HGPORT2 r5 |
|
1597 | $ hg --config extensions.largefiles=! clone http://localhost:$HGPORT2 r5 | |
1570 | abort: remote error: |
|
1598 | abort: remote error: | |
1571 |
|
1599 | |||
1572 | This repository uses the largefiles extension. |
|
1600 | This repository uses the largefiles extension. | |
1573 |
|
1601 | |||
1574 | Please enable it in your Mercurial config file. |
|
1602 | Please enable it in your Mercurial config file. | |
1575 | [255] |
|
1603 | [255] | |
1576 |
|
1604 | |||
1577 | used all HGPORTs, kill all daemons |
|
1605 | used all HGPORTs, kill all daemons | |
1578 | $ "$TESTDIR/killdaemons.py" $DAEMON_PIDS |
|
1606 | $ "$TESTDIR/killdaemons.py" $DAEMON_PIDS | |
1579 | #endif |
|
1607 | #endif | |
1580 |
|
1608 | |||
1581 | vanilla clients locked out from largefiles ssh repos |
|
1609 | vanilla clients locked out from largefiles ssh repos | |
1582 | $ hg --config extensions.largefiles=! clone -e "python \"$TESTDIR/dummyssh\"" ssh://user@dummy/r4 r5 |
|
1610 | $ hg --config extensions.largefiles=! clone -e "python \"$TESTDIR/dummyssh\"" ssh://user@dummy/r4 r5 | |
1583 | abort: remote error: |
|
1611 | abort: remote error: | |
1584 |
|
1612 | |||
1585 | This repository uses the largefiles extension. |
|
1613 | This repository uses the largefiles extension. | |
1586 |
|
1614 | |||
1587 | Please enable it in your Mercurial config file. |
|
1615 | Please enable it in your Mercurial config file. | |
1588 | [255] |
|
1616 | [255] | |
1589 |
|
1617 | |||
1590 | #if serve |
|
1618 | #if serve | |
1591 |
|
1619 | |||
1592 | largefiles clients refuse to push largefiles repos to vanilla servers |
|
1620 | largefiles clients refuse to push largefiles repos to vanilla servers | |
1593 | $ mkdir r6 |
|
1621 | $ mkdir r6 | |
1594 | $ cd r6 |
|
1622 | $ cd r6 | |
1595 | $ hg init |
|
1623 | $ hg init | |
1596 | $ echo c1 > f1 |
|
1624 | $ echo c1 > f1 | |
1597 | $ hg add f1 |
|
1625 | $ hg add f1 | |
1598 | $ hg commit -m "m1" |
|
1626 | $ hg commit -m "m1" | |
1599 | Invoking status precommit hook |
|
1627 | Invoking status precommit hook | |
1600 | A f1 |
|
1628 | A f1 | |
1601 | $ cat >> .hg/hgrc <<! |
|
1629 | $ cat >> .hg/hgrc <<! | |
1602 | > [web] |
|
1630 | > [web] | |
1603 | > push_ssl = false |
|
1631 | > push_ssl = false | |
1604 | > allow_push = * |
|
1632 | > allow_push = * | |
1605 | > ! |
|
1633 | > ! | |
1606 | $ cd .. |
|
1634 | $ cd .. | |
1607 | $ hg clone r6 r7 |
|
1635 | $ hg clone r6 r7 | |
1608 | updating to branch default |
|
1636 | updating to branch default | |
1609 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
1637 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
1610 | $ cd r7 |
|
1638 | $ cd r7 | |
1611 | $ echo c2 > f2 |
|
1639 | $ echo c2 > f2 | |
1612 | $ hg add --large f2 |
|
1640 | $ hg add --large f2 | |
1613 | $ hg commit -m "m2" |
|
1641 | $ hg commit -m "m2" | |
1614 | Invoking status precommit hook |
|
1642 | Invoking status precommit hook | |
1615 | A f2 |
|
1643 | A f2 | |
1616 | $ hg --config extensions.largefiles=! -R ../r6 serve -d -p $HGPORT --pid-file ../hg.pid |
|
1644 | $ hg --config extensions.largefiles=! -R ../r6 serve -d -p $HGPORT --pid-file ../hg.pid | |
1617 | $ cat ../hg.pid >> $DAEMON_PIDS |
|
1645 | $ cat ../hg.pid >> $DAEMON_PIDS | |
1618 | $ hg push http://localhost:$HGPORT |
|
1646 | $ hg push http://localhost:$HGPORT | |
1619 | pushing to http://localhost:$HGPORT/ |
|
1647 | pushing to http://localhost:$HGPORT/ | |
1620 | searching for changes |
|
1648 | searching for changes | |
1621 | abort: http://localhost:$HGPORT/ does not appear to be a largefile store |
|
1649 | abort: http://localhost:$HGPORT/ does not appear to be a largefile store | |
1622 | [255] |
|
1650 | [255] | |
1623 | $ cd .. |
|
1651 | $ cd .. | |
1624 |
|
1652 | |||
1625 | putlfile errors are shown (issue3123) |
|
1653 | putlfile errors are shown (issue3123) | |
1626 | Corrupt the cached largefile in r7 and move it out of the servers usercache |
|
1654 | Corrupt the cached largefile in r7 and move it out of the servers usercache | |
1627 | $ mv r7/.hg/largefiles/4cdac4d8b084d0b599525cf732437fb337d422a8 . |
|
1655 | $ mv r7/.hg/largefiles/4cdac4d8b084d0b599525cf732437fb337d422a8 . | |
1628 | $ echo 'client side corruption' > r7/.hg/largefiles/4cdac4d8b084d0b599525cf732437fb337d422a8 |
|
1656 | $ echo 'client side corruption' > r7/.hg/largefiles/4cdac4d8b084d0b599525cf732437fb337d422a8 | |
1629 | $ rm "$USERCACHE/4cdac4d8b084d0b599525cf732437fb337d422a8" |
|
1657 | $ rm "$USERCACHE/4cdac4d8b084d0b599525cf732437fb337d422a8" | |
1630 | $ hg init empty |
|
1658 | $ hg init empty | |
1631 | $ hg serve -R empty -d -p $HGPORT1 --pid-file hg.pid \ |
|
1659 | $ hg serve -R empty -d -p $HGPORT1 --pid-file hg.pid \ | |
1632 | > --config 'web.allow_push=*' --config web.push_ssl=False |
|
1660 | > --config 'web.allow_push=*' --config web.push_ssl=False | |
1633 | $ cat hg.pid >> $DAEMON_PIDS |
|
1661 | $ cat hg.pid >> $DAEMON_PIDS | |
1634 | $ hg push -R r7 http://localhost:$HGPORT1 |
|
1662 | $ hg push -R r7 http://localhost:$HGPORT1 | |
1635 | pushing to http://localhost:$HGPORT1/ |
|
1663 | pushing to http://localhost:$HGPORT1/ | |
1636 | searching for changes |
|
1664 | searching for changes | |
1637 | remote: largefiles: failed to put 4cdac4d8b084d0b599525cf732437fb337d422a8 into store: largefile contents do not match hash |
|
1665 | remote: largefiles: failed to put 4cdac4d8b084d0b599525cf732437fb337d422a8 into store: largefile contents do not match hash | |
1638 | abort: remotestore: could not put $TESTTMP/r7/.hg/largefiles/4cdac4d8b084d0b599525cf732437fb337d422a8 to remote store http://localhost:$HGPORT1/ (glob) |
|
1666 | abort: remotestore: could not put $TESTTMP/r7/.hg/largefiles/4cdac4d8b084d0b599525cf732437fb337d422a8 to remote store http://localhost:$HGPORT1/ (glob) | |
1639 | [255] |
|
1667 | [255] | |
1640 | $ mv 4cdac4d8b084d0b599525cf732437fb337d422a8 r7/.hg/largefiles/4cdac4d8b084d0b599525cf732437fb337d422a8 |
|
1668 | $ mv 4cdac4d8b084d0b599525cf732437fb337d422a8 r7/.hg/largefiles/4cdac4d8b084d0b599525cf732437fb337d422a8 | |
1641 | Push of file that exists on server but is corrupted - magic healing would be nice ... but too magic |
|
1669 | Push of file that exists on server but is corrupted - magic healing would be nice ... but too magic | |
1642 | $ echo "server side corruption" > empty/.hg/largefiles/4cdac4d8b084d0b599525cf732437fb337d422a8 |
|
1670 | $ echo "server side corruption" > empty/.hg/largefiles/4cdac4d8b084d0b599525cf732437fb337d422a8 | |
1643 | $ hg push -R r7 http://localhost:$HGPORT1 |
|
1671 | $ hg push -R r7 http://localhost:$HGPORT1 | |
1644 | pushing to http://localhost:$HGPORT1/ |
|
1672 | pushing to http://localhost:$HGPORT1/ | |
1645 | searching for changes |
|
1673 | searching for changes | |
1646 | searching for changes |
|
1674 | searching for changes | |
1647 | remote: adding changesets |
|
1675 | remote: adding changesets | |
1648 | remote: adding manifests |
|
1676 | remote: adding manifests | |
1649 | remote: adding file changes |
|
1677 | remote: adding file changes | |
1650 | remote: added 2 changesets with 2 changes to 2 files |
|
1678 | remote: added 2 changesets with 2 changes to 2 files | |
1651 | $ cat empty/.hg/largefiles/4cdac4d8b084d0b599525cf732437fb337d422a8 |
|
1679 | $ cat empty/.hg/largefiles/4cdac4d8b084d0b599525cf732437fb337d422a8 | |
1652 | server side corruption |
|
1680 | server side corruption | |
1653 | $ rm -rf empty |
|
1681 | $ rm -rf empty | |
1654 |
|
1682 | |||
1655 | Push a largefiles repository to a served empty repository |
|
1683 | Push a largefiles repository to a served empty repository | |
1656 | $ hg init r8 |
|
1684 | $ hg init r8 | |
1657 | $ echo c3 > r8/f1 |
|
1685 | $ echo c3 > r8/f1 | |
1658 | $ hg add --large r8/f1 -R r8 |
|
1686 | $ hg add --large r8/f1 -R r8 | |
1659 | $ hg commit -m "m1" -R r8 |
|
1687 | $ hg commit -m "m1" -R r8 | |
1660 | Invoking status precommit hook |
|
1688 | Invoking status precommit hook | |
1661 | A f1 |
|
1689 | A f1 | |
1662 | $ hg init empty |
|
1690 | $ hg init empty | |
1663 | $ hg serve -R empty -d -p $HGPORT2 --pid-file hg.pid \ |
|
1691 | $ hg serve -R empty -d -p $HGPORT2 --pid-file hg.pid \ | |
1664 | > --config 'web.allow_push=*' --config web.push_ssl=False |
|
1692 | > --config 'web.allow_push=*' --config web.push_ssl=False | |
1665 | $ cat hg.pid >> $DAEMON_PIDS |
|
1693 | $ cat hg.pid >> $DAEMON_PIDS | |
1666 | $ rm "${USERCACHE}"/* |
|
1694 | $ rm "${USERCACHE}"/* | |
1667 | $ hg push -R r8 http://localhost:$HGPORT2/#default |
|
1695 | $ hg push -R r8 http://localhost:$HGPORT2/#default | |
1668 | pushing to http://localhost:$HGPORT2/ |
|
1696 | pushing to http://localhost:$HGPORT2/ | |
1669 | searching for changes |
|
1697 | searching for changes | |
1670 | searching for changes |
|
1698 | searching for changes | |
1671 | remote: adding changesets |
|
1699 | remote: adding changesets | |
1672 | remote: adding manifests |
|
1700 | remote: adding manifests | |
1673 | remote: adding file changes |
|
1701 | remote: adding file changes | |
1674 | remote: added 1 changesets with 1 changes to 1 files |
|
1702 | remote: added 1 changesets with 1 changes to 1 files | |
1675 | $ [ -f "${USERCACHE}"/02a439e5c31c526465ab1a0ca1f431f76b827b90 ] |
|
1703 | $ [ -f "${USERCACHE}"/02a439e5c31c526465ab1a0ca1f431f76b827b90 ] | |
1676 | $ [ -f empty/.hg/largefiles/02a439e5c31c526465ab1a0ca1f431f76b827b90 ] |
|
1704 | $ [ -f empty/.hg/largefiles/02a439e5c31c526465ab1a0ca1f431f76b827b90 ] | |
1677 |
|
1705 | |||
1678 | Clone over http, no largefiles pulled on clone. |
|
1706 | Clone over http, no largefiles pulled on clone. | |
1679 |
|
1707 | |||
1680 | $ hg clone http://localhost:$HGPORT2/#default http-clone -U |
|
1708 | $ hg clone http://localhost:$HGPORT2/#default http-clone -U | |
1681 | adding changesets |
|
1709 | adding changesets | |
1682 | adding manifests |
|
1710 | adding manifests | |
1683 | adding file changes |
|
1711 | adding file changes | |
1684 | added 1 changesets with 1 changes to 1 files |
|
1712 | added 1 changesets with 1 changes to 1 files | |
1685 |
|
1713 | |||
1686 | test 'verify' with remotestore: |
|
1714 | test 'verify' with remotestore: | |
1687 |
|
1715 | |||
1688 | $ rm "${USERCACHE}"/02a439e5c31c526465ab1a0ca1f431f76b827b90 |
|
1716 | $ rm "${USERCACHE}"/02a439e5c31c526465ab1a0ca1f431f76b827b90 | |
1689 | $ mv empty/.hg/largefiles/02a439e5c31c526465ab1a0ca1f431f76b827b90 . |
|
1717 | $ mv empty/.hg/largefiles/02a439e5c31c526465ab1a0ca1f431f76b827b90 . | |
1690 | $ hg -R http-clone verify --large --lfa |
|
1718 | $ hg -R http-clone verify --large --lfa | |
1691 | checking changesets |
|
1719 | checking changesets | |
1692 | checking manifests |
|
1720 | checking manifests | |
1693 | crosschecking files in changesets and manifests |
|
1721 | crosschecking files in changesets and manifests | |
1694 | checking files |
|
1722 | checking files | |
1695 | 1 files, 1 changesets, 1 total revisions |
|
1723 | 1 files, 1 changesets, 1 total revisions | |
1696 | searching 1 changesets for largefiles |
|
1724 | searching 1 changesets for largefiles | |
1697 | changeset 0:cf03e5bb9936: f1 missing |
|
1725 | changeset 0:cf03e5bb9936: f1 missing | |
1698 | verified existence of 1 revisions of 1 largefiles |
|
1726 | verified existence of 1 revisions of 1 largefiles | |
1699 | [1] |
|
1727 | [1] | |
1700 | $ mv 02a439e5c31c526465ab1a0ca1f431f76b827b90 empty/.hg/largefiles/ |
|
1728 | $ mv 02a439e5c31c526465ab1a0ca1f431f76b827b90 empty/.hg/largefiles/ | |
1701 | $ hg -R http-clone -q verify --large --lfa |
|
1729 | $ hg -R http-clone -q verify --large --lfa | |
1702 |
|
1730 | |||
1703 | largefiles pulled on update - a largefile missing on the server: |
|
1731 | largefiles pulled on update - a largefile missing on the server: | |
1704 | $ mv empty/.hg/largefiles/02a439e5c31c526465ab1a0ca1f431f76b827b90 . |
|
1732 | $ mv empty/.hg/largefiles/02a439e5c31c526465ab1a0ca1f431f76b827b90 . | |
1705 | $ hg -R http-clone up --config largefiles.usercache=http-clone-usercache |
|
1733 | $ hg -R http-clone up --config largefiles.usercache=http-clone-usercache | |
1706 | getting changed largefiles |
|
1734 | getting changed largefiles | |
1707 | abort: remotestore: largefile 02a439e5c31c526465ab1a0ca1f431f76b827b90 is missing |
|
1735 | abort: remotestore: largefile 02a439e5c31c526465ab1a0ca1f431f76b827b90 is missing | |
1708 | [255] |
|
1736 | [255] | |
1709 | $ hg -R http-clone up -Cqr null |
|
1737 | $ hg -R http-clone up -Cqr null | |
1710 |
|
1738 | |||
1711 | largefiles pulled on update - a largefile corrupted on the server: |
|
1739 | largefiles pulled on update - a largefile corrupted on the server: | |
1712 | $ echo corruption > empty/.hg/largefiles/02a439e5c31c526465ab1a0ca1f431f76b827b90 |
|
1740 | $ echo corruption > empty/.hg/largefiles/02a439e5c31c526465ab1a0ca1f431f76b827b90 | |
1713 | $ hg -R http-clone up --config largefiles.usercache=http-clone-usercache |
|
1741 | $ hg -R http-clone up --config largefiles.usercache=http-clone-usercache | |
1714 | getting changed largefiles |
|
1742 | getting changed largefiles | |
1715 | f1: data corruption (expected 02a439e5c31c526465ab1a0ca1f431f76b827b90, got 6a7bb2556144babe3899b25e5428123735bb1e27) |
|
1743 | f1: data corruption (expected 02a439e5c31c526465ab1a0ca1f431f76b827b90, got 6a7bb2556144babe3899b25e5428123735bb1e27) | |
1716 | 0 largefiles updated, 0 removed |
|
1744 | 0 largefiles updated, 0 removed | |
1717 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
1745 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
1718 | $ hg -R http-clone st |
|
1746 | $ hg -R http-clone st | |
1719 | ! f1 |
|
1747 | ! f1 | |
1720 | $ [ ! -f http-clone/.hg/largefiles/02a439e5c31c526465ab1a0ca1f431f76b827b90 ] |
|
1748 | $ [ ! -f http-clone/.hg/largefiles/02a439e5c31c526465ab1a0ca1f431f76b827b90 ] | |
1721 | $ [ ! -f http-clone/f1 ] |
|
1749 | $ [ ! -f http-clone/f1 ] | |
1722 | $ [ ! -f http-clone-usercache ] |
|
1750 | $ [ ! -f http-clone-usercache ] | |
1723 | $ hg -R http-clone verify --large --lfc |
|
1751 | $ hg -R http-clone verify --large --lfc | |
1724 | checking changesets |
|
1752 | checking changesets | |
1725 | checking manifests |
|
1753 | checking manifests | |
1726 | crosschecking files in changesets and manifests |
|
1754 | crosschecking files in changesets and manifests | |
1727 | checking files |
|
1755 | checking files | |
1728 | 1 files, 1 changesets, 1 total revisions |
|
1756 | 1 files, 1 changesets, 1 total revisions | |
1729 | searching 1 changesets for largefiles |
|
1757 | searching 1 changesets for largefiles | |
1730 | verified contents of 1 revisions of 1 largefiles |
|
1758 | verified contents of 1 revisions of 1 largefiles | |
1731 | $ hg -R http-clone up -Cqr null |
|
1759 | $ hg -R http-clone up -Cqr null | |
1732 |
|
1760 | |||
1733 | largefiles pulled on update - no server side problems: |
|
1761 | largefiles pulled on update - no server side problems: | |
1734 | $ mv 02a439e5c31c526465ab1a0ca1f431f76b827b90 empty/.hg/largefiles/ |
|
1762 | $ mv 02a439e5c31c526465ab1a0ca1f431f76b827b90 empty/.hg/largefiles/ | |
1735 | $ hg -R http-clone --debug up --config largefiles.usercache=http-clone-usercache |
|
1763 | $ hg -R http-clone --debug up --config largefiles.usercache=http-clone-usercache | |
1736 | resolving manifests |
|
1764 | resolving manifests | |
1737 | branchmerge: False, force: False, partial: False |
|
1765 | branchmerge: False, force: False, partial: False | |
1738 | ancestor: 000000000000, local: 000000000000+, remote: cf03e5bb9936 |
|
1766 | ancestor: 000000000000, local: 000000000000+, remote: cf03e5bb9936 | |
1739 | .hglf/f1: remote created -> g |
|
1767 | .hglf/f1: remote created -> g | |
1740 | getting .hglf/f1 |
|
1768 | getting .hglf/f1 | |
1741 | updating: .hglf/f1 1/1 files (100.00%) |
|
1769 | updating: .hglf/f1 1/1 files (100.00%) | |
1742 | getting changed largefiles |
|
1770 | getting changed largefiles | |
1743 | using http://localhost:$HGPORT2/ |
|
1771 | using http://localhost:$HGPORT2/ | |
1744 | sending capabilities command |
|
1772 | sending capabilities command | |
1745 | getting largefiles: 0/1 lfile (0.00%) |
|
1773 | getting largefiles: 0/1 lfile (0.00%) | |
1746 | getting f1:02a439e5c31c526465ab1a0ca1f431f76b827b90 |
|
1774 | getting f1:02a439e5c31c526465ab1a0ca1f431f76b827b90 | |
1747 | sending batch command |
|
1775 | sending batch command | |
1748 | sending getlfile command |
|
1776 | sending getlfile command | |
1749 | found 02a439e5c31c526465ab1a0ca1f431f76b827b90 in store |
|
1777 | found 02a439e5c31c526465ab1a0ca1f431f76b827b90 in store | |
1750 | 1 largefiles updated, 0 removed |
|
1778 | 1 largefiles updated, 0 removed | |
1751 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
1779 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
1752 |
|
1780 | |||
1753 | $ ls http-clone-usercache/* |
|
1781 | $ ls http-clone-usercache/* | |
1754 | http-clone-usercache/02a439e5c31c526465ab1a0ca1f431f76b827b90 |
|
1782 | http-clone-usercache/02a439e5c31c526465ab1a0ca1f431f76b827b90 | |
1755 |
|
1783 | |||
1756 | $ rm -rf empty http-clone* |
|
1784 | $ rm -rf empty http-clone* | |
1757 |
|
1785 | |||
1758 | used all HGPORTs, kill all daemons |
|
1786 | used all HGPORTs, kill all daemons | |
1759 | $ "$TESTDIR/killdaemons.py" $DAEMON_PIDS |
|
1787 | $ "$TESTDIR/killdaemons.py" $DAEMON_PIDS | |
1760 |
|
1788 | |||
1761 | #endif |
|
1789 | #endif | |
1762 |
|
1790 | |||
1763 |
|
1791 | |||
1764 | #if unix-permissions |
|
1792 | #if unix-permissions | |
1765 |
|
1793 | |||
1766 | Clone a local repository owned by another user |
|
1794 | Clone a local repository owned by another user | |
1767 | We have to simulate that here by setting $HOME and removing write permissions |
|
1795 | We have to simulate that here by setting $HOME and removing write permissions | |
1768 | $ ORIGHOME="$HOME" |
|
1796 | $ ORIGHOME="$HOME" | |
1769 | $ mkdir alice |
|
1797 | $ mkdir alice | |
1770 | $ HOME="`pwd`/alice" |
|
1798 | $ HOME="`pwd`/alice" | |
1771 | $ cd alice |
|
1799 | $ cd alice | |
1772 | $ hg init pubrepo |
|
1800 | $ hg init pubrepo | |
1773 | $ cd pubrepo |
|
1801 | $ cd pubrepo | |
1774 | $ dd if=/dev/zero bs=1k count=11k > a-large-file 2> /dev/null |
|
1802 | $ dd if=/dev/zero bs=1k count=11k > a-large-file 2> /dev/null | |
1775 | $ hg add --large a-large-file |
|
1803 | $ hg add --large a-large-file | |
1776 | $ hg commit -m "Add a large file" |
|
1804 | $ hg commit -m "Add a large file" | |
1777 | Invoking status precommit hook |
|
1805 | Invoking status precommit hook | |
1778 | A a-large-file |
|
1806 | A a-large-file | |
1779 | $ cd .. |
|
1807 | $ cd .. | |
1780 | $ chmod -R a-w pubrepo |
|
1808 | $ chmod -R a-w pubrepo | |
1781 | $ cd .. |
|
1809 | $ cd .. | |
1782 | $ mkdir bob |
|
1810 | $ mkdir bob | |
1783 | $ HOME="`pwd`/bob" |
|
1811 | $ HOME="`pwd`/bob" | |
1784 | $ cd bob |
|
1812 | $ cd bob | |
1785 | $ hg clone --pull ../alice/pubrepo pubrepo |
|
1813 | $ hg clone --pull ../alice/pubrepo pubrepo | |
1786 | requesting all changes |
|
1814 | requesting all changes | |
1787 | adding changesets |
|
1815 | adding changesets | |
1788 | adding manifests |
|
1816 | adding manifests | |
1789 | adding file changes |
|
1817 | adding file changes | |
1790 | added 1 changesets with 1 changes to 1 files |
|
1818 | added 1 changesets with 1 changes to 1 files | |
1791 | updating to branch default |
|
1819 | updating to branch default | |
1792 | getting changed largefiles |
|
1820 | getting changed largefiles | |
1793 | 1 largefiles updated, 0 removed |
|
1821 | 1 largefiles updated, 0 removed | |
1794 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
1822 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
1795 | $ cd .. |
|
1823 | $ cd .. | |
1796 | $ chmod -R u+w alice/pubrepo |
|
1824 | $ chmod -R u+w alice/pubrepo | |
1797 | $ HOME="$ORIGHOME" |
|
1825 | $ HOME="$ORIGHOME" | |
1798 |
|
1826 | |||
1799 | #endif |
|
1827 | #endif | |
1800 |
|
1828 | |||
1801 | #if symlink |
|
1829 | #if symlink | |
1802 |
|
1830 | |||
1803 | Symlink to a large largefile should behave the same as a symlink to a normal file |
|
1831 | Symlink to a large largefile should behave the same as a symlink to a normal file | |
1804 | $ hg init largesymlink |
|
1832 | $ hg init largesymlink | |
1805 | $ cd largesymlink |
|
1833 | $ cd largesymlink | |
1806 | $ dd if=/dev/zero bs=1k count=10k of=largefile 2>/dev/null |
|
1834 | $ dd if=/dev/zero bs=1k count=10k of=largefile 2>/dev/null | |
1807 | $ hg add --large largefile |
|
1835 | $ hg add --large largefile | |
1808 | $ hg commit -m "commit a large file" |
|
1836 | $ hg commit -m "commit a large file" | |
1809 | Invoking status precommit hook |
|
1837 | Invoking status precommit hook | |
1810 | A largefile |
|
1838 | A largefile | |
1811 | $ ln -s largefile largelink |
|
1839 | $ ln -s largefile largelink | |
1812 | $ hg add largelink |
|
1840 | $ hg add largelink | |
1813 | $ hg commit -m "commit a large symlink" |
|
1841 | $ hg commit -m "commit a large symlink" | |
1814 | Invoking status precommit hook |
|
1842 | Invoking status precommit hook | |
1815 | A largelink |
|
1843 | A largelink | |
1816 | $ rm -f largelink |
|
1844 | $ rm -f largelink | |
1817 | $ hg up >/dev/null |
|
1845 | $ hg up >/dev/null | |
1818 | $ test -f largelink |
|
1846 | $ test -f largelink | |
1819 | [1] |
|
1847 | [1] | |
1820 | $ test -L largelink |
|
1848 | $ test -L largelink | |
1821 | [1] |
|
1849 | [1] | |
1822 | $ rm -f largelink # make next part of the test independent of the previous |
|
1850 | $ rm -f largelink # make next part of the test independent of the previous | |
1823 | $ hg up -C >/dev/null |
|
1851 | $ hg up -C >/dev/null | |
1824 | $ test -f largelink |
|
1852 | $ test -f largelink | |
1825 | $ test -L largelink |
|
1853 | $ test -L largelink | |
1826 | $ cd .. |
|
1854 | $ cd .. | |
1827 |
|
1855 | |||
1828 | #endif |
|
1856 | #endif | |
1829 |
|
1857 | |||
1830 | test for pattern matching on 'hg status': |
|
1858 | test for pattern matching on 'hg status': | |
1831 | to boost performance, largefiles checks whether specified patterns are |
|
1859 | to boost performance, largefiles checks whether specified patterns are | |
1832 | related to largefiles in working directory (NOT to STANDIN) or not. |
|
1860 | related to largefiles in working directory (NOT to STANDIN) or not. | |
1833 |
|
1861 | |||
1834 | $ hg init statusmatch |
|
1862 | $ hg init statusmatch | |
1835 | $ cd statusmatch |
|
1863 | $ cd statusmatch | |
1836 |
|
1864 | |||
1837 | $ mkdir -p a/b/c/d |
|
1865 | $ mkdir -p a/b/c/d | |
1838 | $ echo normal > a/b/c/d/e.normal.txt |
|
1866 | $ echo normal > a/b/c/d/e.normal.txt | |
1839 | $ hg add a/b/c/d/e.normal.txt |
|
1867 | $ hg add a/b/c/d/e.normal.txt | |
1840 | $ echo large > a/b/c/d/e.large.txt |
|
1868 | $ echo large > a/b/c/d/e.large.txt | |
1841 | $ hg add --large a/b/c/d/e.large.txt |
|
1869 | $ hg add --large a/b/c/d/e.large.txt | |
1842 | $ mkdir -p a/b/c/x |
|
1870 | $ mkdir -p a/b/c/x | |
1843 | $ echo normal > a/b/c/x/y.normal.txt |
|
1871 | $ echo normal > a/b/c/x/y.normal.txt | |
1844 | $ hg add a/b/c/x/y.normal.txt |
|
1872 | $ hg add a/b/c/x/y.normal.txt | |
1845 | $ hg commit -m 'add files' |
|
1873 | $ hg commit -m 'add files' | |
1846 | Invoking status precommit hook |
|
1874 | Invoking status precommit hook | |
1847 | A a/b/c/d/e.large.txt |
|
1875 | A a/b/c/d/e.large.txt | |
1848 | A a/b/c/d/e.normal.txt |
|
1876 | A a/b/c/d/e.normal.txt | |
1849 | A a/b/c/x/y.normal.txt |
|
1877 | A a/b/c/x/y.normal.txt | |
1850 |
|
1878 | |||
1851 | (1) no pattern: no performance boost |
|
1879 | (1) no pattern: no performance boost | |
1852 | $ hg status -A |
|
1880 | $ hg status -A | |
1853 | C a/b/c/d/e.large.txt |
|
1881 | C a/b/c/d/e.large.txt | |
1854 | C a/b/c/d/e.normal.txt |
|
1882 | C a/b/c/d/e.normal.txt | |
1855 | C a/b/c/x/y.normal.txt |
|
1883 | C a/b/c/x/y.normal.txt | |
1856 |
|
1884 | |||
1857 | (2) pattern not related to largefiles: performance boost |
|
1885 | (2) pattern not related to largefiles: performance boost | |
1858 | $ hg status -A a/b/c/x |
|
1886 | $ hg status -A a/b/c/x | |
1859 | C a/b/c/x/y.normal.txt |
|
1887 | C a/b/c/x/y.normal.txt | |
1860 |
|
1888 | |||
1861 | (3) pattern related to largefiles: no performance boost |
|
1889 | (3) pattern related to largefiles: no performance boost | |
1862 | $ hg status -A a/b/c/d |
|
1890 | $ hg status -A a/b/c/d | |
1863 | C a/b/c/d/e.large.txt |
|
1891 | C a/b/c/d/e.large.txt | |
1864 | C a/b/c/d/e.normal.txt |
|
1892 | C a/b/c/d/e.normal.txt | |
1865 |
|
1893 | |||
1866 | (4) pattern related to STANDIN (not to largefiles): performance boost |
|
1894 | (4) pattern related to STANDIN (not to largefiles): performance boost | |
1867 | $ hg status -A .hglf/a |
|
1895 | $ hg status -A .hglf/a | |
1868 | C .hglf/a/b/c/d/e.large.txt |
|
1896 | C .hglf/a/b/c/d/e.large.txt | |
1869 |
|
1897 | |||
1870 | (5) mixed case: no performance boost |
|
1898 | (5) mixed case: no performance boost | |
1871 | $ hg status -A a/b/c/x a/b/c/d |
|
1899 | $ hg status -A a/b/c/x a/b/c/d | |
1872 | C a/b/c/d/e.large.txt |
|
1900 | C a/b/c/d/e.large.txt | |
1873 | C a/b/c/d/e.normal.txt |
|
1901 | C a/b/c/d/e.normal.txt | |
1874 | C a/b/c/x/y.normal.txt |
|
1902 | C a/b/c/x/y.normal.txt | |
1875 |
|
1903 | |||
1876 | verify that largefiles doesn't break filesets |
|
1904 | verify that largefiles doesn't break filesets | |
1877 |
|
1905 | |||
1878 | $ hg log --rev . --exclude "set:binary()" |
|
1906 | $ hg log --rev . --exclude "set:binary()" | |
1879 | changeset: 0:41bd42f10efa |
|
1907 | changeset: 0:41bd42f10efa | |
1880 | tag: tip |
|
1908 | tag: tip | |
1881 | user: test |
|
1909 | user: test | |
1882 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
1910 | date: Thu Jan 01 00:00:00 1970 +0000 | |
1883 | summary: add files |
|
1911 | summary: add files | |
1884 |
|
1912 | |||
1885 | verify that large files in subrepos handled properly |
|
1913 | verify that large files in subrepos handled properly | |
1886 | $ hg init subrepo |
|
1914 | $ hg init subrepo | |
1887 | $ echo "subrepo = subrepo" > .hgsub |
|
1915 | $ echo "subrepo = subrepo" > .hgsub | |
1888 | $ hg add .hgsub |
|
1916 | $ hg add .hgsub | |
1889 | $ hg ci -m "add subrepo" |
|
1917 | $ hg ci -m "add subrepo" | |
1890 | Invoking status precommit hook |
|
1918 | Invoking status precommit hook | |
1891 | A .hgsub |
|
1919 | A .hgsub | |
1892 | ? .hgsubstate |
|
1920 | ? .hgsubstate | |
1893 | $ echo "rev 1" > subrepo/large.txt |
|
1921 | $ echo "rev 1" > subrepo/large.txt | |
1894 | $ hg -R subrepo add --large subrepo/large.txt |
|
1922 | $ hg -R subrepo add --large subrepo/large.txt | |
1895 | $ hg sum |
|
1923 | $ hg sum | |
1896 | parent: 1:8ee150ea2e9c tip |
|
1924 | parent: 1:8ee150ea2e9c tip | |
1897 | add subrepo |
|
1925 | add subrepo | |
1898 | branch: default |
|
1926 | branch: default | |
1899 | commit: 1 subrepos |
|
1927 | commit: 1 subrepos | |
1900 | update: (current) |
|
1928 | update: (current) | |
1901 | $ hg st |
|
1929 | $ hg st | |
1902 | $ hg st -S |
|
1930 | $ hg st -S | |
1903 | A subrepo/large.txt |
|
1931 | A subrepo/large.txt | |
1904 | $ hg ci -S -m "commit top repo" |
|
1932 | $ hg ci -S -m "commit top repo" | |
1905 | committing subrepository subrepo |
|
1933 | committing subrepository subrepo | |
1906 | Invoking status precommit hook |
|
1934 | Invoking status precommit hook | |
1907 | A large.txt |
|
1935 | A large.txt | |
1908 | Invoking status precommit hook |
|
1936 | Invoking status precommit hook | |
1909 | M .hgsubstate |
|
1937 | M .hgsubstate | |
1910 | # No differences |
|
1938 | # No differences | |
1911 | $ hg st -S |
|
1939 | $ hg st -S | |
1912 | $ hg sum |
|
1940 | $ hg sum | |
1913 | parent: 2:ce4cd0c527a6 tip |
|
1941 | parent: 2:ce4cd0c527a6 tip | |
1914 | commit top repo |
|
1942 | commit top repo | |
1915 | branch: default |
|
1943 | branch: default | |
1916 | commit: (clean) |
|
1944 | commit: (clean) | |
1917 | update: (current) |
|
1945 | update: (current) | |
1918 | $ echo "rev 2" > subrepo/large.txt |
|
1946 | $ echo "rev 2" > subrepo/large.txt | |
1919 | $ hg st -S |
|
1947 | $ hg st -S | |
1920 | M subrepo/large.txt |
|
1948 | M subrepo/large.txt | |
1921 | $ hg sum |
|
1949 | $ hg sum | |
1922 | parent: 2:ce4cd0c527a6 tip |
|
1950 | parent: 2:ce4cd0c527a6 tip | |
1923 | commit top repo |
|
1951 | commit top repo | |
1924 | branch: default |
|
1952 | branch: default | |
1925 | commit: 1 subrepos |
|
1953 | commit: 1 subrepos | |
1926 | update: (current) |
|
1954 | update: (current) | |
1927 | $ hg ci -m "this commit should fail without -S" |
|
1955 | $ hg ci -m "this commit should fail without -S" | |
1928 | abort: uncommitted changes in subrepo subrepo |
|
1956 | abort: uncommitted changes in subrepo subrepo | |
1929 | (use --subrepos for recursive commit) |
|
1957 | (use --subrepos for recursive commit) | |
1930 | [255] |
|
1958 | [255] | |
1931 |
|
1959 | |||
1932 | Add a normal file to the subrepo, then test archiving |
|
1960 | Add a normal file to the subrepo, then test archiving | |
1933 |
|
1961 | |||
1934 | $ echo 'normal file' > subrepo/normal.txt |
|
1962 | $ echo 'normal file' > subrepo/normal.txt | |
1935 | $ hg -R subrepo add subrepo/normal.txt |
|
1963 | $ hg -R subrepo add subrepo/normal.txt | |
1936 |
|
1964 | |||
1937 | Lock in subrepo, otherwise the change isn't archived |
|
1965 | Lock in subrepo, otherwise the change isn't archived | |
1938 |
|
1966 | |||
1939 | $ hg ci -S -m "add normal file to top level" |
|
1967 | $ hg ci -S -m "add normal file to top level" | |
1940 | committing subrepository subrepo |
|
1968 | committing subrepository subrepo | |
1941 | Invoking status precommit hook |
|
1969 | Invoking status precommit hook | |
1942 | M large.txt |
|
1970 | M large.txt | |
1943 | A normal.txt |
|
1971 | A normal.txt | |
1944 | Invoking status precommit hook |
|
1972 | Invoking status precommit hook | |
1945 | M .hgsubstate |
|
1973 | M .hgsubstate | |
1946 | $ hg archive -S ../lf_subrepo_archive |
|
1974 | $ hg archive -S ../lf_subrepo_archive | |
1947 | $ find ../lf_subrepo_archive | sort |
|
1975 | $ find ../lf_subrepo_archive | sort | |
1948 | ../lf_subrepo_archive |
|
1976 | ../lf_subrepo_archive | |
1949 | ../lf_subrepo_archive/.hg_archival.txt |
|
1977 | ../lf_subrepo_archive/.hg_archival.txt | |
1950 | ../lf_subrepo_archive/.hgsub |
|
1978 | ../lf_subrepo_archive/.hgsub | |
1951 | ../lf_subrepo_archive/.hgsubstate |
|
1979 | ../lf_subrepo_archive/.hgsubstate | |
1952 | ../lf_subrepo_archive/a |
|
1980 | ../lf_subrepo_archive/a | |
1953 | ../lf_subrepo_archive/a/b |
|
1981 | ../lf_subrepo_archive/a/b | |
1954 | ../lf_subrepo_archive/a/b/c |
|
1982 | ../lf_subrepo_archive/a/b/c | |
1955 | ../lf_subrepo_archive/a/b/c/d |
|
1983 | ../lf_subrepo_archive/a/b/c/d | |
1956 | ../lf_subrepo_archive/a/b/c/d/e.large.txt |
|
1984 | ../lf_subrepo_archive/a/b/c/d/e.large.txt | |
1957 | ../lf_subrepo_archive/a/b/c/d/e.normal.txt |
|
1985 | ../lf_subrepo_archive/a/b/c/d/e.normal.txt | |
1958 | ../lf_subrepo_archive/a/b/c/x |
|
1986 | ../lf_subrepo_archive/a/b/c/x | |
1959 | ../lf_subrepo_archive/a/b/c/x/y.normal.txt |
|
1987 | ../lf_subrepo_archive/a/b/c/x/y.normal.txt | |
1960 | ../lf_subrepo_archive/subrepo |
|
1988 | ../lf_subrepo_archive/subrepo | |
1961 | ../lf_subrepo_archive/subrepo/large.txt |
|
1989 | ../lf_subrepo_archive/subrepo/large.txt | |
1962 | ../lf_subrepo_archive/subrepo/normal.txt |
|
1990 | ../lf_subrepo_archive/subrepo/normal.txt | |
1963 |
|
1991 | |||
1964 | Test update with subrepos. |
|
1992 | Test update with subrepos. | |
1965 |
|
1993 | |||
1966 | $ hg update 0 |
|
1994 | $ hg update 0 | |
1967 | getting changed largefiles |
|
1995 | getting changed largefiles | |
1968 | 0 largefiles updated, 1 removed |
|
1996 | 0 largefiles updated, 1 removed | |
1969 | 0 files updated, 0 files merged, 2 files removed, 0 files unresolved |
|
1997 | 0 files updated, 0 files merged, 2 files removed, 0 files unresolved | |
1970 | $ hg status -S |
|
1998 | $ hg status -S | |
1971 | $ hg update tip |
|
1999 | $ hg update tip | |
1972 | getting changed largefiles |
|
2000 | getting changed largefiles | |
1973 | 1 largefiles updated, 0 removed |
|
2001 | 1 largefiles updated, 0 removed | |
1974 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
2002 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
1975 | $ hg status -S |
|
2003 | $ hg status -S | |
1976 | # modify a large file |
|
2004 | # modify a large file | |
1977 | $ echo "modified" > subrepo/large.txt |
|
2005 | $ echo "modified" > subrepo/large.txt | |
1978 | $ hg st -S |
|
2006 | $ hg st -S | |
1979 | M subrepo/large.txt |
|
2007 | M subrepo/large.txt | |
1980 | # update -C should revert the change. |
|
2008 | # update -C should revert the change. | |
1981 | $ hg update -C |
|
2009 | $ hg update -C | |
1982 | getting changed largefiles |
|
2010 | getting changed largefiles | |
1983 | 1 largefiles updated, 0 removed |
|
2011 | 1 largefiles updated, 0 removed | |
1984 | getting changed largefiles |
|
2012 | getting changed largefiles | |
1985 | 0 largefiles updated, 0 removed |
|
2013 | 0 largefiles updated, 0 removed | |
1986 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
2014 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
1987 | $ hg status -S |
|
2015 | $ hg status -S | |
1988 |
|
2016 | |||
1989 | Test archiving a revision that references a subrepo that is not yet |
|
2017 | Test archiving a revision that references a subrepo that is not yet | |
1990 | cloned (see test-subrepo-recursion.t): |
|
2018 | cloned (see test-subrepo-recursion.t): | |
1991 |
|
2019 | |||
1992 | $ hg clone -U . ../empty |
|
2020 | $ hg clone -U . ../empty | |
1993 | $ cd ../empty |
|
2021 | $ cd ../empty | |
1994 | $ hg archive --subrepos -r tip ../archive.tar.gz |
|
2022 | $ hg archive --subrepos -r tip ../archive.tar.gz | |
1995 | cloning subrepo subrepo from $TESTTMP/statusmatch/subrepo |
|
2023 | cloning subrepo subrepo from $TESTTMP/statusmatch/subrepo | |
1996 | $ cd .. |
|
2024 | $ cd .. | |
1997 |
|
2025 | |||
1998 | Test that addremove picks up largefiles prior to the initial commit (issue3541) |
|
2026 | Test that addremove picks up largefiles prior to the initial commit (issue3541) | |
1999 |
|
2027 | |||
2000 | $ hg init addrm2 |
|
2028 | $ hg init addrm2 | |
2001 | $ cd addrm2 |
|
2029 | $ cd addrm2 | |
2002 | $ touch large.dat |
|
2030 | $ touch large.dat | |
2003 | $ touch large2.dat |
|
2031 | $ touch large2.dat | |
2004 | $ touch normal |
|
2032 | $ touch normal | |
2005 | $ hg add --large large.dat |
|
2033 | $ hg add --large large.dat | |
2006 | $ hg addremove -v |
|
2034 | $ hg addremove -v | |
2007 | adding large2.dat as a largefile |
|
2035 | adding large2.dat as a largefile | |
2008 | adding normal |
|
2036 | adding normal | |
2009 |
|
2037 | |||
2010 | Test that forgetting all largefiles reverts to islfilesrepo() == False |
|
2038 | Test that forgetting all largefiles reverts to islfilesrepo() == False | |
2011 | (addremove will add *.dat as normal files now) |
|
2039 | (addremove will add *.dat as normal files now) | |
2012 | $ hg forget large.dat |
|
2040 | $ hg forget large.dat | |
2013 | $ hg forget large2.dat |
|
2041 | $ hg forget large2.dat | |
2014 | $ hg addremove -v |
|
2042 | $ hg addremove -v | |
2015 | adding large.dat |
|
2043 | adding large.dat | |
2016 | adding large2.dat |
|
2044 | adding large2.dat | |
2017 |
|
2045 | |||
2018 | Test commit's addremove option prior to the first commit |
|
2046 | Test commit's addremove option prior to the first commit | |
2019 | $ hg forget large.dat |
|
2047 | $ hg forget large.dat | |
2020 | $ hg forget large2.dat |
|
2048 | $ hg forget large2.dat | |
2021 | $ hg add --large large.dat |
|
2049 | $ hg add --large large.dat | |
2022 | $ hg ci -Am "commit" |
|
2050 | $ hg ci -Am "commit" | |
2023 | adding large2.dat as a largefile |
|
2051 | adding large2.dat as a largefile | |
2024 | Invoking status precommit hook |
|
2052 | Invoking status precommit hook | |
2025 | A large.dat |
|
2053 | A large.dat | |
2026 | A large2.dat |
|
2054 | A large2.dat | |
2027 | A normal |
|
2055 | A normal | |
2028 | $ find .hglf | sort |
|
2056 | $ find .hglf | sort | |
2029 | .hglf |
|
2057 | .hglf | |
2030 | .hglf/large.dat |
|
2058 | .hglf/large.dat | |
2031 | .hglf/large2.dat |
|
2059 | .hglf/large2.dat | |
2032 |
|
2060 | |||
2033 | Test actions on largefiles using relative paths from subdir |
|
2061 | Test actions on largefiles using relative paths from subdir | |
2034 |
|
2062 | |||
2035 | $ mkdir sub |
|
2063 | $ mkdir sub | |
2036 | $ cd sub |
|
2064 | $ cd sub | |
2037 | $ echo anotherlarge > anotherlarge |
|
2065 | $ echo anotherlarge > anotherlarge | |
2038 | $ hg add --large anotherlarge |
|
2066 | $ hg add --large anotherlarge | |
2039 | $ hg st |
|
2067 | $ hg st | |
2040 | A sub/anotherlarge |
|
2068 | A sub/anotherlarge | |
2041 | $ hg st anotherlarge |
|
2069 | $ hg st anotherlarge | |
2042 | A anotherlarge |
|
2070 | A anotherlarge | |
2043 | $ hg commit -m anotherlarge anotherlarge |
|
2071 | $ hg commit -m anotherlarge anotherlarge | |
2044 | Invoking status precommit hook |
|
2072 | Invoking status precommit hook | |
2045 | A sub/anotherlarge |
|
2073 | A sub/anotherlarge | |
2046 | $ hg log anotherlarge |
|
2074 | $ hg log anotherlarge | |
2047 | changeset: 1:9627a577c5e9 |
|
2075 | changeset: 1:9627a577c5e9 | |
2048 | tag: tip |
|
2076 | tag: tip | |
2049 | user: test |
|
2077 | user: test | |
2050 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
2078 | date: Thu Jan 01 00:00:00 1970 +0000 | |
2051 | summary: anotherlarge |
|
2079 | summary: anotherlarge | |
2052 |
|
2080 | |||
2053 | $ echo more >> anotherlarge |
|
2081 | $ echo more >> anotherlarge | |
2054 | $ hg st . |
|
2082 | $ hg st . | |
2055 | M anotherlarge |
|
2083 | M anotherlarge | |
2056 | $ hg cat anotherlarge |
|
2084 | $ hg cat anotherlarge | |
2057 | anotherlarge |
|
2085 | anotherlarge | |
2058 | $ hg revert anotherlarge |
|
2086 | $ hg revert anotherlarge | |
2059 | $ hg st |
|
2087 | $ hg st | |
2060 | ? sub/anotherlarge.orig |
|
2088 | ? sub/anotherlarge.orig | |
2061 | $ cd .. |
|
2089 | $ cd .. | |
2062 |
|
2090 | |||
2063 | $ cd .. |
|
2091 | $ cd .. | |
2064 |
|
2092 | |||
2065 | issue3651: summary/outgoing with largefiles shows "no remote repo" |
|
2093 | issue3651: summary/outgoing with largefiles shows "no remote repo" | |
2066 | unexpectedly |
|
2094 | unexpectedly | |
2067 |
|
2095 | |||
2068 | $ mkdir issue3651 |
|
2096 | $ mkdir issue3651 | |
2069 | $ cd issue3651 |
|
2097 | $ cd issue3651 | |
2070 |
|
2098 | |||
2071 | $ hg init src |
|
2099 | $ hg init src | |
2072 | $ echo a > src/a |
|
2100 | $ echo a > src/a | |
2073 | $ hg -R src add --large src/a |
|
2101 | $ hg -R src add --large src/a | |
2074 | $ hg -R src commit -m '#0' |
|
2102 | $ hg -R src commit -m '#0' | |
2075 | Invoking status precommit hook |
|
2103 | Invoking status precommit hook | |
2076 | A a |
|
2104 | A a | |
2077 |
|
2105 | |||
2078 | check messages when no remote repository is specified: |
|
2106 | check messages when no remote repository is specified: | |
2079 | "no remote repo" route for "hg outgoing --large" is not tested here, |
|
2107 | "no remote repo" route for "hg outgoing --large" is not tested here, | |
2080 | because it can't be reproduced easily. |
|
2108 | because it can't be reproduced easily. | |
2081 |
|
2109 | |||
2082 | $ hg init clone1 |
|
2110 | $ hg init clone1 | |
2083 | $ hg -R clone1 -q pull src |
|
2111 | $ hg -R clone1 -q pull src | |
2084 | $ hg -R clone1 -q update |
|
2112 | $ hg -R clone1 -q update | |
2085 | $ hg -R clone1 paths | grep default |
|
2113 | $ hg -R clone1 paths | grep default | |
2086 | [1] |
|
2114 | [1] | |
2087 |
|
2115 | |||
2088 | $ hg -R clone1 summary --large |
|
2116 | $ hg -R clone1 summary --large | |
2089 | parent: 0:fc0bd45326d3 tip |
|
2117 | parent: 0:fc0bd45326d3 tip | |
2090 | #0 |
|
2118 | #0 | |
2091 | branch: default |
|
2119 | branch: default | |
2092 | commit: (clean) |
|
2120 | commit: (clean) | |
2093 | update: (current) |
|
2121 | update: (current) | |
2094 | largefiles: (no remote repo) |
|
2122 | largefiles: (no remote repo) | |
2095 |
|
2123 | |||
2096 | check messages when there is no files to upload: |
|
2124 | check messages when there is no files to upload: | |
2097 |
|
2125 | |||
2098 | $ hg -q clone src clone2 |
|
2126 | $ hg -q clone src clone2 | |
2099 | $ hg -R clone2 paths | grep default |
|
2127 | $ hg -R clone2 paths | grep default | |
2100 | default = $TESTTMP/issue3651/src (glob) |
|
2128 | default = $TESTTMP/issue3651/src (glob) | |
2101 |
|
2129 | |||
2102 | $ hg -R clone2 summary --large |
|
2130 | $ hg -R clone2 summary --large | |
2103 | parent: 0:fc0bd45326d3 tip |
|
2131 | parent: 0:fc0bd45326d3 tip | |
2104 | #0 |
|
2132 | #0 | |
2105 | branch: default |
|
2133 | branch: default | |
2106 | commit: (clean) |
|
2134 | commit: (clean) | |
2107 | update: (current) |
|
2135 | update: (current) | |
2108 | searching for changes |
|
2136 | searching for changes | |
2109 | largefiles: (no files to upload) |
|
2137 | largefiles: (no files to upload) | |
2110 | $ hg -R clone2 outgoing --large |
|
2138 | $ hg -R clone2 outgoing --large | |
2111 | comparing with $TESTTMP/issue3651/src (glob) |
|
2139 | comparing with $TESTTMP/issue3651/src (glob) | |
2112 | searching for changes |
|
2140 | searching for changes | |
2113 | no changes found |
|
2141 | no changes found | |
2114 | searching for changes |
|
2142 | searching for changes | |
2115 | largefiles: no files to upload |
|
2143 | largefiles: no files to upload | |
2116 | [1] |
|
2144 | [1] | |
2117 |
|
2145 | |||
2118 | check messages when there are files to upload: |
|
2146 | check messages when there are files to upload: | |
2119 |
|
2147 | |||
2120 | $ echo b > clone2/b |
|
2148 | $ echo b > clone2/b | |
2121 | $ hg -R clone2 add --large clone2/b |
|
2149 | $ hg -R clone2 add --large clone2/b | |
2122 | $ hg -R clone2 commit -m '#1' |
|
2150 | $ hg -R clone2 commit -m '#1' | |
2123 | Invoking status precommit hook |
|
2151 | Invoking status precommit hook | |
2124 | A b |
|
2152 | A b | |
2125 | $ hg -R clone2 summary --large |
|
2153 | $ hg -R clone2 summary --large | |
2126 | parent: 1:1acbe71ce432 tip |
|
2154 | parent: 1:1acbe71ce432 tip | |
2127 | #1 |
|
2155 | #1 | |
2128 | branch: default |
|
2156 | branch: default | |
2129 | commit: (clean) |
|
2157 | commit: (clean) | |
2130 | update: (current) |
|
2158 | update: (current) | |
2131 | searching for changes |
|
2159 | searching for changes | |
2132 | largefiles: 1 to upload |
|
2160 | largefiles: 1 to upload | |
2133 | $ hg -R clone2 outgoing --large |
|
2161 | $ hg -R clone2 outgoing --large | |
2134 | comparing with $TESTTMP/issue3651/src (glob) |
|
2162 | comparing with $TESTTMP/issue3651/src (glob) | |
2135 | searching for changes |
|
2163 | searching for changes | |
2136 | changeset: 1:1acbe71ce432 |
|
2164 | changeset: 1:1acbe71ce432 | |
2137 | tag: tip |
|
2165 | tag: tip | |
2138 | user: test |
|
2166 | user: test | |
2139 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
2167 | date: Thu Jan 01 00:00:00 1970 +0000 | |
2140 | summary: #1 |
|
2168 | summary: #1 | |
2141 |
|
2169 | |||
2142 | searching for changes |
|
2170 | searching for changes | |
2143 | largefiles to upload: |
|
2171 | largefiles to upload: | |
2144 | b |
|
2172 | b | |
2145 |
|
2173 | |||
2146 |
|
2174 | |||
2147 | $ cd .. |
|
2175 | $ cd .. |
General Comments 0
You need to be logged in to leave comments.
Login now