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