Show More
@@ -1,1317 +1,1323 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 | '''Overridden Mercurial commands and functions for the largefiles extension''' |
|
9 | '''Overridden Mercurial commands and functions for the largefiles extension''' | |
10 |
|
10 | |||
11 | import os |
|
11 | import os | |
12 | import copy |
|
12 | import copy | |
13 |
|
13 | |||
14 | from mercurial import hg, util, cmdutil, scmutil, match as match_, \ |
|
14 | from mercurial import hg, util, cmdutil, scmutil, match as match_, \ | |
15 | archival, pathutil, revset |
|
15 | archival, pathutil, revset | |
16 | from mercurial.i18n import _ |
|
16 | from mercurial.i18n import _ | |
17 | from mercurial.node import hex |
|
17 | from mercurial.node import hex | |
18 |
|
18 | |||
19 | import lfutil |
|
19 | import lfutil | |
20 | import lfcommands |
|
20 | import lfcommands | |
21 | import basestore |
|
21 | import basestore | |
22 |
|
22 | |||
23 | # -- Utility functions: commonly/repeatedly needed functionality --------------- |
|
23 | # -- Utility functions: commonly/repeatedly needed functionality --------------- | |
24 |
|
24 | |||
25 | def composelargefilematcher(match, manifest): |
|
25 | def composelargefilematcher(match, manifest): | |
26 | '''create a matcher that matches only the largefiles in the original |
|
26 | '''create a matcher that matches only the largefiles in the original | |
27 | matcher''' |
|
27 | matcher''' | |
28 | m = copy.copy(match) |
|
28 | m = copy.copy(match) | |
29 | lfile = lambda f: lfutil.standin(f) in manifest |
|
29 | lfile = lambda f: lfutil.standin(f) in manifest | |
30 | m._files = filter(lfile, m._files) |
|
30 | m._files = filter(lfile, m._files) | |
31 | m._fmap = set(m._files) |
|
31 | m._fmap = set(m._files) | |
32 | m._always = False |
|
32 | m._always = False | |
33 | origmatchfn = m.matchfn |
|
33 | origmatchfn = m.matchfn | |
34 | m.matchfn = lambda f: lfile(f) and origmatchfn(f) |
|
34 | m.matchfn = lambda f: lfile(f) and origmatchfn(f) | |
35 | return m |
|
35 | return m | |
36 |
|
36 | |||
37 | def composenormalfilematcher(match, manifest): |
|
37 | def composenormalfilematcher(match, manifest): | |
38 | m = copy.copy(match) |
|
38 | m = copy.copy(match) | |
39 | notlfile = lambda f: not (lfutil.isstandin(f) or lfutil.standin(f) in |
|
39 | notlfile = lambda f: not (lfutil.isstandin(f) or lfutil.standin(f) in | |
40 | manifest) |
|
40 | manifest) | |
41 | m._files = filter(notlfile, m._files) |
|
41 | m._files = filter(notlfile, m._files) | |
42 | m._fmap = set(m._files) |
|
42 | m._fmap = set(m._files) | |
43 | m._always = False |
|
43 | m._always = False | |
44 | origmatchfn = m.matchfn |
|
44 | origmatchfn = m.matchfn | |
45 | m.matchfn = lambda f: notlfile(f) and origmatchfn(f) |
|
45 | m.matchfn = lambda f: notlfile(f) and origmatchfn(f) | |
46 | return m |
|
46 | return m | |
47 |
|
47 | |||
48 | def installnormalfilesmatchfn(manifest): |
|
48 | def installnormalfilesmatchfn(manifest): | |
49 | '''installmatchfn with a matchfn that ignores all largefiles''' |
|
49 | '''installmatchfn with a matchfn that ignores all largefiles''' | |
50 | def overridematch(ctx, pats=[], opts={}, globbed=False, |
|
50 | def overridematch(ctx, pats=[], opts={}, globbed=False, | |
51 | default='relpath'): |
|
51 | default='relpath'): | |
52 | match = oldmatch(ctx, pats, opts, globbed, default) |
|
52 | match = oldmatch(ctx, pats, opts, globbed, default) | |
53 | return composenormalfilematcher(match, manifest) |
|
53 | return composenormalfilematcher(match, manifest) | |
54 | oldmatch = installmatchfn(overridematch) |
|
54 | oldmatch = installmatchfn(overridematch) | |
55 |
|
55 | |||
56 | def installmatchfn(f): |
|
56 | def installmatchfn(f): | |
57 | '''monkey patch the scmutil module with a custom match function. |
|
57 | '''monkey patch the scmutil module with a custom match function. | |
58 | Warning: it is monkey patching the _module_ on runtime! Not thread safe!''' |
|
58 | Warning: it is monkey patching the _module_ on runtime! Not thread safe!''' | |
59 | oldmatch = scmutil.match |
|
59 | oldmatch = scmutil.match | |
60 | setattr(f, 'oldmatch', oldmatch) |
|
60 | setattr(f, 'oldmatch', oldmatch) | |
61 | scmutil.match = f |
|
61 | scmutil.match = f | |
62 | return oldmatch |
|
62 | return oldmatch | |
63 |
|
63 | |||
64 | def restorematchfn(): |
|
64 | def restorematchfn(): | |
65 | '''restores scmutil.match to what it was before installmatchfn |
|
65 | '''restores scmutil.match to what it was before installmatchfn | |
66 | was called. no-op if scmutil.match is its original function. |
|
66 | was called. no-op if scmutil.match is its original function. | |
67 |
|
67 | |||
68 | Note that n calls to installmatchfn will require n calls to |
|
68 | Note that n calls to installmatchfn will require n calls to | |
69 | restore the original matchfn.''' |
|
69 | restore the original matchfn.''' | |
70 | scmutil.match = getattr(scmutil.match, 'oldmatch') |
|
70 | scmutil.match = getattr(scmutil.match, 'oldmatch') | |
71 |
|
71 | |||
72 | def installmatchandpatsfn(f): |
|
72 | def installmatchandpatsfn(f): | |
73 | oldmatchandpats = scmutil.matchandpats |
|
73 | oldmatchandpats = scmutil.matchandpats | |
74 | setattr(f, 'oldmatchandpats', oldmatchandpats) |
|
74 | setattr(f, 'oldmatchandpats', oldmatchandpats) | |
75 | scmutil.matchandpats = f |
|
75 | scmutil.matchandpats = f | |
76 | return oldmatchandpats |
|
76 | return oldmatchandpats | |
77 |
|
77 | |||
78 | def restorematchandpatsfn(): |
|
78 | def restorematchandpatsfn(): | |
79 | '''restores scmutil.matchandpats to what it was before |
|
79 | '''restores scmutil.matchandpats to what it was before | |
80 | installmatchandpatsfn was called. No-op if scmutil.matchandpats |
|
80 | installmatchandpatsfn was called. No-op if scmutil.matchandpats | |
81 | is its original function. |
|
81 | is its original function. | |
82 |
|
82 | |||
83 | Note that n calls to installmatchandpatsfn will require n calls |
|
83 | Note that n calls to installmatchandpatsfn will require n calls | |
84 | to restore the original matchfn.''' |
|
84 | to restore the original matchfn.''' | |
85 | scmutil.matchandpats = getattr(scmutil.matchandpats, 'oldmatchandpats', |
|
85 | scmutil.matchandpats = getattr(scmutil.matchandpats, 'oldmatchandpats', | |
86 | scmutil.matchandpats) |
|
86 | scmutil.matchandpats) | |
87 |
|
87 | |||
88 | def addlargefiles(ui, repo, matcher, **opts): |
|
88 | def addlargefiles(ui, repo, isaddremove, matcher, **opts): | |
89 | large = opts.pop('large', None) |
|
89 | large = opts.pop('large', None) | |
90 | lfsize = lfutil.getminsize( |
|
90 | lfsize = lfutil.getminsize( | |
91 | ui, lfutil.islfilesrepo(repo), opts.pop('lfsize', None)) |
|
91 | ui, lfutil.islfilesrepo(repo), opts.pop('lfsize', None)) | |
92 |
|
92 | |||
93 | lfmatcher = None |
|
93 | lfmatcher = None | |
94 | if lfutil.islfilesrepo(repo): |
|
94 | if lfutil.islfilesrepo(repo): | |
95 | lfpats = ui.configlist(lfutil.longname, 'patterns', default=[]) |
|
95 | lfpats = ui.configlist(lfutil.longname, 'patterns', default=[]) | |
96 | if lfpats: |
|
96 | if lfpats: | |
97 | lfmatcher = match_.match(repo.root, '', list(lfpats)) |
|
97 | lfmatcher = match_.match(repo.root, '', list(lfpats)) | |
98 |
|
98 | |||
99 | lfnames = [] |
|
99 | lfnames = [] | |
100 | m = copy.copy(matcher) |
|
100 | m = copy.copy(matcher) | |
101 | m.bad = lambda x, y: None |
|
101 | m.bad = lambda x, y: None | |
102 | wctx = repo[None] |
|
102 | wctx = repo[None] | |
103 | for f in repo.walk(m): |
|
103 | for f in repo.walk(m): | |
104 | exact = m.exact(f) |
|
104 | exact = m.exact(f) | |
105 | lfile = lfutil.standin(f) in wctx |
|
105 | lfile = lfutil.standin(f) in wctx | |
106 | nfile = f in wctx |
|
106 | nfile = f in wctx | |
107 | exists = lfile or nfile |
|
107 | exists = lfile or nfile | |
108 |
|
108 | |||
|
109 | # addremove in core gets fancy with the name, add doesn't | |||
|
110 | if isaddremove: | |||
|
111 | name = m.uipath(f) | |||
|
112 | else: | |||
|
113 | name = m.rel(f) | |||
|
114 | ||||
109 | # Don't warn the user when they attempt to add a normal tracked file. |
|
115 | # Don't warn the user when they attempt to add a normal tracked file. | |
110 | # The normal add code will do that for us. |
|
116 | # The normal add code will do that for us. | |
111 | if exact and exists: |
|
117 | if exact and exists: | |
112 | if lfile: |
|
118 | if lfile: | |
113 |
ui.warn(_('%s already a largefile\n') % |
|
119 | ui.warn(_('%s already a largefile\n') % name) | |
114 | continue |
|
120 | continue | |
115 |
|
121 | |||
116 | if (exact or not exists) and not lfutil.isstandin(f): |
|
122 | if (exact or not exists) and not lfutil.isstandin(f): | |
117 | # In case the file was removed previously, but not committed |
|
123 | # In case the file was removed previously, but not committed | |
118 | # (issue3507) |
|
124 | # (issue3507) | |
119 | if not repo.wvfs.exists(f): |
|
125 | if not repo.wvfs.exists(f): | |
120 | continue |
|
126 | continue | |
121 |
|
127 | |||
122 | abovemin = (lfsize and |
|
128 | abovemin = (lfsize and | |
123 | repo.wvfs.lstat(f).st_size >= lfsize * 1024 * 1024) |
|
129 | repo.wvfs.lstat(f).st_size >= lfsize * 1024 * 1024) | |
124 | if large or abovemin or (lfmatcher and lfmatcher(f)): |
|
130 | if large or abovemin or (lfmatcher and lfmatcher(f)): | |
125 | lfnames.append(f) |
|
131 | lfnames.append(f) | |
126 | if ui.verbose or not exact: |
|
132 | if ui.verbose or not exact: | |
127 |
ui.status(_('adding %s as a largefile\n') % m |
|
133 | ui.status(_('adding %s as a largefile\n') % name) | |
128 |
|
134 | |||
129 | bad = [] |
|
135 | bad = [] | |
130 |
|
136 | |||
131 | # Need to lock, otherwise there could be a race condition between |
|
137 | # Need to lock, otherwise there could be a race condition between | |
132 | # when standins are created and added to the repo. |
|
138 | # when standins are created and added to the repo. | |
133 | wlock = repo.wlock() |
|
139 | wlock = repo.wlock() | |
134 | try: |
|
140 | try: | |
135 | if not opts.get('dry_run'): |
|
141 | if not opts.get('dry_run'): | |
136 | standins = [] |
|
142 | standins = [] | |
137 | lfdirstate = lfutil.openlfdirstate(ui, repo) |
|
143 | lfdirstate = lfutil.openlfdirstate(ui, repo) | |
138 | for f in lfnames: |
|
144 | for f in lfnames: | |
139 | standinname = lfutil.standin(f) |
|
145 | standinname = lfutil.standin(f) | |
140 | lfutil.writestandin(repo, standinname, hash='', |
|
146 | lfutil.writestandin(repo, standinname, hash='', | |
141 | executable=lfutil.getexecutable(repo.wjoin(f))) |
|
147 | executable=lfutil.getexecutable(repo.wjoin(f))) | |
142 | standins.append(standinname) |
|
148 | standins.append(standinname) | |
143 | if lfdirstate[f] == 'r': |
|
149 | if lfdirstate[f] == 'r': | |
144 | lfdirstate.normallookup(f) |
|
150 | lfdirstate.normallookup(f) | |
145 | else: |
|
151 | else: | |
146 | lfdirstate.add(f) |
|
152 | lfdirstate.add(f) | |
147 | lfdirstate.write() |
|
153 | lfdirstate.write() | |
148 | bad += [lfutil.splitstandin(f) |
|
154 | bad += [lfutil.splitstandin(f) | |
149 | for f in repo[None].add(standins) |
|
155 | for f in repo[None].add(standins) | |
150 | if f in m.files()] |
|
156 | if f in m.files()] | |
151 | finally: |
|
157 | finally: | |
152 | wlock.release() |
|
158 | wlock.release() | |
153 | return bad |
|
159 | return bad | |
154 |
|
160 | |||
155 | def removelargefiles(ui, repo, isaddremove, matcher, **opts): |
|
161 | def removelargefiles(ui, repo, isaddremove, matcher, **opts): | |
156 | after = opts.get('after') |
|
162 | after = opts.get('after') | |
157 | m = composelargefilematcher(matcher, repo[None].manifest()) |
|
163 | m = composelargefilematcher(matcher, repo[None].manifest()) | |
158 | try: |
|
164 | try: | |
159 | repo.lfstatus = True |
|
165 | repo.lfstatus = True | |
160 | s = repo.status(match=m, clean=not isaddremove) |
|
166 | s = repo.status(match=m, clean=not isaddremove) | |
161 | finally: |
|
167 | finally: | |
162 | repo.lfstatus = False |
|
168 | repo.lfstatus = False | |
163 | manifest = repo[None].manifest() |
|
169 | manifest = repo[None].manifest() | |
164 | modified, added, deleted, clean = [[f for f in list |
|
170 | modified, added, deleted, clean = [[f for f in list | |
165 | if lfutil.standin(f) in manifest] |
|
171 | if lfutil.standin(f) in manifest] | |
166 | for list in (s.modified, s.added, |
|
172 | for list in (s.modified, s.added, | |
167 | s.deleted, s.clean)] |
|
173 | s.deleted, s.clean)] | |
168 |
|
174 | |||
169 | def warn(files, msg): |
|
175 | def warn(files, msg): | |
170 | for f in files: |
|
176 | for f in files: | |
171 | ui.warn(msg % m.rel(f)) |
|
177 | ui.warn(msg % m.rel(f)) | |
172 | return int(len(files) > 0) |
|
178 | return int(len(files) > 0) | |
173 |
|
179 | |||
174 | result = 0 |
|
180 | result = 0 | |
175 |
|
181 | |||
176 | if after: |
|
182 | if after: | |
177 | remove = deleted |
|
183 | remove = deleted | |
178 | result = warn(modified + added + clean, |
|
184 | result = warn(modified + added + clean, | |
179 | _('not removing %s: file still exists\n')) |
|
185 | _('not removing %s: file still exists\n')) | |
180 | else: |
|
186 | else: | |
181 | remove = deleted + clean |
|
187 | remove = deleted + clean | |
182 | result = warn(modified, _('not removing %s: file is modified (use -f' |
|
188 | result = warn(modified, _('not removing %s: file is modified (use -f' | |
183 | ' to force removal)\n')) |
|
189 | ' to force removal)\n')) | |
184 | result = warn(added, _('not removing %s: file has been marked for add' |
|
190 | result = warn(added, _('not removing %s: file has been marked for add' | |
185 | ' (use forget to undo)\n')) or result |
|
191 | ' (use forget to undo)\n')) or result | |
186 |
|
192 | |||
187 | # Need to lock because standin files are deleted then removed from the |
|
193 | # Need to lock because standin files are deleted then removed from the | |
188 | # repository and we could race in-between. |
|
194 | # repository and we could race in-between. | |
189 | wlock = repo.wlock() |
|
195 | wlock = repo.wlock() | |
190 | try: |
|
196 | try: | |
191 | lfdirstate = lfutil.openlfdirstate(ui, repo) |
|
197 | lfdirstate = lfutil.openlfdirstate(ui, repo) | |
192 | for f in sorted(remove): |
|
198 | for f in sorted(remove): | |
193 | if ui.verbose or not m.exact(f): |
|
199 | if ui.verbose or not m.exact(f): | |
194 | # addremove in core gets fancy with the name, remove doesn't |
|
200 | # addremove in core gets fancy with the name, remove doesn't | |
195 | if isaddremove: |
|
201 | if isaddremove: | |
196 | name = m.uipath(f) |
|
202 | name = m.uipath(f) | |
197 | else: |
|
203 | else: | |
198 | name = m.rel(f) |
|
204 | name = m.rel(f) | |
199 | ui.status(_('removing %s\n') % name) |
|
205 | ui.status(_('removing %s\n') % name) | |
200 |
|
206 | |||
201 | if not opts.get('dry_run'): |
|
207 | if not opts.get('dry_run'): | |
202 | if not after: |
|
208 | if not after: | |
203 | util.unlinkpath(repo.wjoin(f), ignoremissing=True) |
|
209 | util.unlinkpath(repo.wjoin(f), ignoremissing=True) | |
204 |
|
210 | |||
205 | if opts.get('dry_run'): |
|
211 | if opts.get('dry_run'): | |
206 | return result |
|
212 | return result | |
207 |
|
213 | |||
208 | remove = [lfutil.standin(f) for f in remove] |
|
214 | remove = [lfutil.standin(f) for f in remove] | |
209 | # If this is being called by addremove, let the original addremove |
|
215 | # If this is being called by addremove, let the original addremove | |
210 | # function handle this. |
|
216 | # function handle this. | |
211 | if not isaddremove: |
|
217 | if not isaddremove: | |
212 | for f in remove: |
|
218 | for f in remove: | |
213 | util.unlinkpath(repo.wjoin(f), ignoremissing=True) |
|
219 | util.unlinkpath(repo.wjoin(f), ignoremissing=True) | |
214 | repo[None].forget(remove) |
|
220 | repo[None].forget(remove) | |
215 |
|
221 | |||
216 | for f in remove: |
|
222 | for f in remove: | |
217 | lfutil.synclfdirstate(repo, lfdirstate, lfutil.splitstandin(f), |
|
223 | lfutil.synclfdirstate(repo, lfdirstate, lfutil.splitstandin(f), | |
218 | False) |
|
224 | False) | |
219 |
|
225 | |||
220 | lfdirstate.write() |
|
226 | lfdirstate.write() | |
221 | finally: |
|
227 | finally: | |
222 | wlock.release() |
|
228 | wlock.release() | |
223 |
|
229 | |||
224 | return result |
|
230 | return result | |
225 |
|
231 | |||
226 | # For overriding mercurial.hgweb.webcommands so that largefiles will |
|
232 | # For overriding mercurial.hgweb.webcommands so that largefiles will | |
227 | # appear at their right place in the manifests. |
|
233 | # appear at their right place in the manifests. | |
228 | def decodepath(orig, path): |
|
234 | def decodepath(orig, path): | |
229 | return lfutil.splitstandin(path) or path |
|
235 | return lfutil.splitstandin(path) or path | |
230 |
|
236 | |||
231 | # -- Wrappers: modify existing commands -------------------------------- |
|
237 | # -- Wrappers: modify existing commands -------------------------------- | |
232 |
|
238 | |||
233 | # Add works by going through the files that the user wanted to add and |
|
239 | # Add works by going through the files that the user wanted to add and | |
234 | # checking if they should be added as largefiles. Then it makes a new |
|
240 | # checking if they should be added as largefiles. Then it makes a new | |
235 | # matcher which matches only the normal files and runs the original |
|
241 | # matcher which matches only the normal files and runs the original | |
236 | # version of add. |
|
242 | # version of add. | |
237 | def overrideadd(orig, ui, repo, *pats, **opts): |
|
243 | def overrideadd(orig, ui, repo, *pats, **opts): | |
238 | normal = opts.pop('normal') |
|
244 | normal = opts.pop('normal') | |
239 | if normal: |
|
245 | if normal: | |
240 | if opts.get('large'): |
|
246 | if opts.get('large'): | |
241 | raise util.Abort(_('--normal cannot be used with --large')) |
|
247 | raise util.Abort(_('--normal cannot be used with --large')) | |
242 | return orig(ui, repo, *pats, **opts) |
|
248 | return orig(ui, repo, *pats, **opts) | |
243 | matcher = scmutil.match(repo[None], pats, opts) |
|
249 | matcher = scmutil.match(repo[None], pats, opts) | |
244 | bad = addlargefiles(ui, repo, matcher, **opts) |
|
250 | bad = addlargefiles(ui, repo, False, matcher, **opts) | |
245 | installnormalfilesmatchfn(repo[None].manifest()) |
|
251 | installnormalfilesmatchfn(repo[None].manifest()) | |
246 | result = orig(ui, repo, *pats, **opts) |
|
252 | result = orig(ui, repo, *pats, **opts) | |
247 | restorematchfn() |
|
253 | restorematchfn() | |
248 |
|
254 | |||
249 | return (result == 1 or bad) and 1 or 0 |
|
255 | return (result == 1 or bad) and 1 or 0 | |
250 |
|
256 | |||
251 | def overrideremove(orig, ui, repo, *pats, **opts): |
|
257 | def overrideremove(orig, ui, repo, *pats, **opts): | |
252 | installnormalfilesmatchfn(repo[None].manifest()) |
|
258 | installnormalfilesmatchfn(repo[None].manifest()) | |
253 | result = orig(ui, repo, *pats, **opts) |
|
259 | result = orig(ui, repo, *pats, **opts) | |
254 | restorematchfn() |
|
260 | restorematchfn() | |
255 | matcher = scmutil.match(repo[None], pats, opts) |
|
261 | matcher = scmutil.match(repo[None], pats, opts) | |
256 | return removelargefiles(ui, repo, False, matcher, **opts) or result |
|
262 | return removelargefiles(ui, repo, False, matcher, **opts) or result | |
257 |
|
263 | |||
258 | def overridestatusfn(orig, repo, rev2, **opts): |
|
264 | def overridestatusfn(orig, repo, rev2, **opts): | |
259 | try: |
|
265 | try: | |
260 | repo._repo.lfstatus = True |
|
266 | repo._repo.lfstatus = True | |
261 | return orig(repo, rev2, **opts) |
|
267 | return orig(repo, rev2, **opts) | |
262 | finally: |
|
268 | finally: | |
263 | repo._repo.lfstatus = False |
|
269 | repo._repo.lfstatus = False | |
264 |
|
270 | |||
265 | def overridestatus(orig, ui, repo, *pats, **opts): |
|
271 | def overridestatus(orig, ui, repo, *pats, **opts): | |
266 | try: |
|
272 | try: | |
267 | repo.lfstatus = True |
|
273 | repo.lfstatus = True | |
268 | return orig(ui, repo, *pats, **opts) |
|
274 | return orig(ui, repo, *pats, **opts) | |
269 | finally: |
|
275 | finally: | |
270 | repo.lfstatus = False |
|
276 | repo.lfstatus = False | |
271 |
|
277 | |||
272 | def overridedirty(orig, repo, ignoreupdate=False): |
|
278 | def overridedirty(orig, repo, ignoreupdate=False): | |
273 | try: |
|
279 | try: | |
274 | repo._repo.lfstatus = True |
|
280 | repo._repo.lfstatus = True | |
275 | return orig(repo, ignoreupdate) |
|
281 | return orig(repo, ignoreupdate) | |
276 | finally: |
|
282 | finally: | |
277 | repo._repo.lfstatus = False |
|
283 | repo._repo.lfstatus = False | |
278 |
|
284 | |||
279 | def overridelog(orig, ui, repo, *pats, **opts): |
|
285 | def overridelog(orig, ui, repo, *pats, **opts): | |
280 | def overridematchandpats(ctx, pats=[], opts={}, globbed=False, |
|
286 | def overridematchandpats(ctx, pats=[], opts={}, globbed=False, | |
281 | default='relpath'): |
|
287 | default='relpath'): | |
282 | """Matcher that merges root directory with .hglf, suitable for log. |
|
288 | """Matcher that merges root directory with .hglf, suitable for log. | |
283 | It is still possible to match .hglf directly. |
|
289 | It is still possible to match .hglf directly. | |
284 | For any listed files run log on the standin too. |
|
290 | For any listed files run log on the standin too. | |
285 | matchfn tries both the given filename and with .hglf stripped. |
|
291 | matchfn tries both the given filename and with .hglf stripped. | |
286 | """ |
|
292 | """ | |
287 | matchandpats = oldmatchandpats(ctx, pats, opts, globbed, default) |
|
293 | matchandpats = oldmatchandpats(ctx, pats, opts, globbed, default) | |
288 | m, p = copy.copy(matchandpats) |
|
294 | m, p = copy.copy(matchandpats) | |
289 |
|
295 | |||
290 | if m.always(): |
|
296 | if m.always(): | |
291 | # We want to match everything anyway, so there's no benefit trying |
|
297 | # We want to match everything anyway, so there's no benefit trying | |
292 | # to add standins. |
|
298 | # to add standins. | |
293 | return matchandpats |
|
299 | return matchandpats | |
294 |
|
300 | |||
295 | pats = set(p) |
|
301 | pats = set(p) | |
296 | # TODO: handling of patterns in both cases below |
|
302 | # TODO: handling of patterns in both cases below | |
297 | if m._cwd: |
|
303 | if m._cwd: | |
298 | if os.path.isabs(m._cwd): |
|
304 | if os.path.isabs(m._cwd): | |
299 | # TODO: handle largefile magic when invoked from other cwd |
|
305 | # TODO: handle largefile magic when invoked from other cwd | |
300 | return matchandpats |
|
306 | return matchandpats | |
301 | back = (m._cwd.count('/') + 1) * '../' |
|
307 | back = (m._cwd.count('/') + 1) * '../' | |
302 | pats.update(back + lfutil.standin(m._cwd + '/' + f) for f in p) |
|
308 | pats.update(back + lfutil.standin(m._cwd + '/' + f) for f in p) | |
303 | else: |
|
309 | else: | |
304 | pats.update(lfutil.standin(f) for f in p) |
|
310 | pats.update(lfutil.standin(f) for f in p) | |
305 |
|
311 | |||
306 | for i in range(0, len(m._files)): |
|
312 | for i in range(0, len(m._files)): | |
307 | standin = lfutil.standin(m._files[i]) |
|
313 | standin = lfutil.standin(m._files[i]) | |
308 | if standin in repo[ctx.node()]: |
|
314 | if standin in repo[ctx.node()]: | |
309 | m._files[i] = standin |
|
315 | m._files[i] = standin | |
310 | elif m._files[i] not in repo[ctx.node()]: |
|
316 | elif m._files[i] not in repo[ctx.node()]: | |
311 | m._files.append(standin) |
|
317 | m._files.append(standin) | |
312 | pats.add(standin) |
|
318 | pats.add(standin) | |
313 |
|
319 | |||
314 | m._fmap = set(m._files) |
|
320 | m._fmap = set(m._files) | |
315 | m._always = False |
|
321 | m._always = False | |
316 | origmatchfn = m.matchfn |
|
322 | origmatchfn = m.matchfn | |
317 | def lfmatchfn(f): |
|
323 | def lfmatchfn(f): | |
318 | lf = lfutil.splitstandin(f) |
|
324 | lf = lfutil.splitstandin(f) | |
319 | if lf is not None and origmatchfn(lf): |
|
325 | if lf is not None and origmatchfn(lf): | |
320 | return True |
|
326 | return True | |
321 | r = origmatchfn(f) |
|
327 | r = origmatchfn(f) | |
322 | return r |
|
328 | return r | |
323 | m.matchfn = lfmatchfn |
|
329 | m.matchfn = lfmatchfn | |
324 |
|
330 | |||
325 | return m, pats |
|
331 | return m, pats | |
326 |
|
332 | |||
327 | # For hg log --patch, the match object is used in two different senses: |
|
333 | # For hg log --patch, the match object is used in two different senses: | |
328 | # (1) to determine what revisions should be printed out, and |
|
334 | # (1) to determine what revisions should be printed out, and | |
329 | # (2) to determine what files to print out diffs for. |
|
335 | # (2) to determine what files to print out diffs for. | |
330 | # The magic matchandpats override should be used for case (1) but not for |
|
336 | # The magic matchandpats override should be used for case (1) but not for | |
331 | # case (2). |
|
337 | # case (2). | |
332 | def overridemakelogfilematcher(repo, pats, opts): |
|
338 | def overridemakelogfilematcher(repo, pats, opts): | |
333 | pctx = repo[None] |
|
339 | pctx = repo[None] | |
334 | match, pats = oldmatchandpats(pctx, pats, opts) |
|
340 | match, pats = oldmatchandpats(pctx, pats, opts) | |
335 | return lambda rev: match |
|
341 | return lambda rev: match | |
336 |
|
342 | |||
337 | oldmatchandpats = installmatchandpatsfn(overridematchandpats) |
|
343 | oldmatchandpats = installmatchandpatsfn(overridematchandpats) | |
338 | oldmakelogfilematcher = cmdutil._makenofollowlogfilematcher |
|
344 | oldmakelogfilematcher = cmdutil._makenofollowlogfilematcher | |
339 | setattr(cmdutil, '_makenofollowlogfilematcher', overridemakelogfilematcher) |
|
345 | setattr(cmdutil, '_makenofollowlogfilematcher', overridemakelogfilematcher) | |
340 |
|
346 | |||
341 | try: |
|
347 | try: | |
342 | return orig(ui, repo, *pats, **opts) |
|
348 | return orig(ui, repo, *pats, **opts) | |
343 | finally: |
|
349 | finally: | |
344 | restorematchandpatsfn() |
|
350 | restorematchandpatsfn() | |
345 | setattr(cmdutil, '_makenofollowlogfilematcher', oldmakelogfilematcher) |
|
351 | setattr(cmdutil, '_makenofollowlogfilematcher', oldmakelogfilematcher) | |
346 |
|
352 | |||
347 | def overrideverify(orig, ui, repo, *pats, **opts): |
|
353 | def overrideverify(orig, ui, repo, *pats, **opts): | |
348 | large = opts.pop('large', False) |
|
354 | large = opts.pop('large', False) | |
349 | all = opts.pop('lfa', False) |
|
355 | all = opts.pop('lfa', False) | |
350 | contents = opts.pop('lfc', False) |
|
356 | contents = opts.pop('lfc', False) | |
351 |
|
357 | |||
352 | result = orig(ui, repo, *pats, **opts) |
|
358 | result = orig(ui, repo, *pats, **opts) | |
353 | if large or all or contents: |
|
359 | if large or all or contents: | |
354 | result = result or lfcommands.verifylfiles(ui, repo, all, contents) |
|
360 | result = result or lfcommands.verifylfiles(ui, repo, all, contents) | |
355 | return result |
|
361 | return result | |
356 |
|
362 | |||
357 | def overridedebugstate(orig, ui, repo, *pats, **opts): |
|
363 | def overridedebugstate(orig, ui, repo, *pats, **opts): | |
358 | large = opts.pop('large', False) |
|
364 | large = opts.pop('large', False) | |
359 | if large: |
|
365 | if large: | |
360 | class fakerepo(object): |
|
366 | class fakerepo(object): | |
361 | dirstate = lfutil.openlfdirstate(ui, repo) |
|
367 | dirstate = lfutil.openlfdirstate(ui, repo) | |
362 | orig(ui, fakerepo, *pats, **opts) |
|
368 | orig(ui, fakerepo, *pats, **opts) | |
363 | else: |
|
369 | else: | |
364 | orig(ui, repo, *pats, **opts) |
|
370 | orig(ui, repo, *pats, **opts) | |
365 |
|
371 | |||
366 | # Override needs to refresh standins so that update's normal merge |
|
372 | # Override needs to refresh standins so that update's normal merge | |
367 | # will go through properly. Then the other update hook (overriding repo.update) |
|
373 | # will go through properly. Then the other update hook (overriding repo.update) | |
368 | # will get the new files. Filemerge is also overridden so that the merge |
|
374 | # will get the new files. Filemerge is also overridden so that the merge | |
369 | # will merge standins correctly. |
|
375 | # will merge standins correctly. | |
370 | def overrideupdate(orig, ui, repo, *pats, **opts): |
|
376 | def overrideupdate(orig, ui, repo, *pats, **opts): | |
371 | # Need to lock between the standins getting updated and their |
|
377 | # Need to lock between the standins getting updated and their | |
372 | # largefiles getting updated |
|
378 | # largefiles getting updated | |
373 | wlock = repo.wlock() |
|
379 | wlock = repo.wlock() | |
374 | try: |
|
380 | try: | |
375 | if opts['check']: |
|
381 | if opts['check']: | |
376 | lfdirstate = lfutil.openlfdirstate(ui, repo) |
|
382 | lfdirstate = lfutil.openlfdirstate(ui, repo) | |
377 | unsure, s = lfdirstate.status( |
|
383 | unsure, s = lfdirstate.status( | |
378 | match_.always(repo.root, repo.getcwd()), |
|
384 | match_.always(repo.root, repo.getcwd()), | |
379 | [], False, False, False) |
|
385 | [], False, False, False) | |
380 |
|
386 | |||
381 | mod = len(s.modified) > 0 |
|
387 | mod = len(s.modified) > 0 | |
382 | for lfile in unsure: |
|
388 | for lfile in unsure: | |
383 | standin = lfutil.standin(lfile) |
|
389 | standin = lfutil.standin(lfile) | |
384 | if repo['.'][standin].data().strip() != \ |
|
390 | if repo['.'][standin].data().strip() != \ | |
385 | lfutil.hashfile(repo.wjoin(lfile)): |
|
391 | lfutil.hashfile(repo.wjoin(lfile)): | |
386 | mod = True |
|
392 | mod = True | |
387 | else: |
|
393 | else: | |
388 | lfdirstate.normal(lfile) |
|
394 | lfdirstate.normal(lfile) | |
389 | lfdirstate.write() |
|
395 | lfdirstate.write() | |
390 | if mod: |
|
396 | if mod: | |
391 | raise util.Abort(_('uncommitted changes')) |
|
397 | raise util.Abort(_('uncommitted changes')) | |
392 | return orig(ui, repo, *pats, **opts) |
|
398 | return orig(ui, repo, *pats, **opts) | |
393 | finally: |
|
399 | finally: | |
394 | wlock.release() |
|
400 | wlock.release() | |
395 |
|
401 | |||
396 | # Before starting the manifest merge, merge.updates will call |
|
402 | # Before starting the manifest merge, merge.updates will call | |
397 | # _checkunknownfile to check if there are any files in the merged-in |
|
403 | # _checkunknownfile to check if there are any files in the merged-in | |
398 | # changeset that collide with unknown files in the working copy. |
|
404 | # changeset that collide with unknown files in the working copy. | |
399 | # |
|
405 | # | |
400 | # The largefiles are seen as unknown, so this prevents us from merging |
|
406 | # The largefiles are seen as unknown, so this prevents us from merging | |
401 | # in a file 'foo' if we already have a largefile with the same name. |
|
407 | # in a file 'foo' if we already have a largefile with the same name. | |
402 | # |
|
408 | # | |
403 | # The overridden function filters the unknown files by removing any |
|
409 | # The overridden function filters the unknown files by removing any | |
404 | # largefiles. This makes the merge proceed and we can then handle this |
|
410 | # largefiles. This makes the merge proceed and we can then handle this | |
405 | # case further in the overridden calculateupdates function below. |
|
411 | # case further in the overridden calculateupdates function below. | |
406 | def overridecheckunknownfile(origfn, repo, wctx, mctx, f, f2=None): |
|
412 | def overridecheckunknownfile(origfn, repo, wctx, mctx, f, f2=None): | |
407 | if lfutil.standin(repo.dirstate.normalize(f)) in wctx: |
|
413 | if lfutil.standin(repo.dirstate.normalize(f)) in wctx: | |
408 | return False |
|
414 | return False | |
409 | return origfn(repo, wctx, mctx, f, f2) |
|
415 | return origfn(repo, wctx, mctx, f, f2) | |
410 |
|
416 | |||
411 | # The manifest merge handles conflicts on the manifest level. We want |
|
417 | # The manifest merge handles conflicts on the manifest level. We want | |
412 | # to handle changes in largefile-ness of files at this level too. |
|
418 | # to handle changes in largefile-ness of files at this level too. | |
413 | # |
|
419 | # | |
414 | # The strategy is to run the original calculateupdates and then process |
|
420 | # The strategy is to run the original calculateupdates and then process | |
415 | # the action list it outputs. There are two cases we need to deal with: |
|
421 | # the action list it outputs. There are two cases we need to deal with: | |
416 | # |
|
422 | # | |
417 | # 1. Normal file in p1, largefile in p2. Here the largefile is |
|
423 | # 1. Normal file in p1, largefile in p2. Here the largefile is | |
418 | # detected via its standin file, which will enter the working copy |
|
424 | # detected via its standin file, which will enter the working copy | |
419 | # with a "get" action. It is not "merge" since the standin is all |
|
425 | # with a "get" action. It is not "merge" since the standin is all | |
420 | # Mercurial is concerned with at this level -- the link to the |
|
426 | # Mercurial is concerned with at this level -- the link to the | |
421 | # existing normal file is not relevant here. |
|
427 | # existing normal file is not relevant here. | |
422 | # |
|
428 | # | |
423 | # 2. Largefile in p1, normal file in p2. Here we get a "merge" action |
|
429 | # 2. Largefile in p1, normal file in p2. Here we get a "merge" action | |
424 | # since the largefile will be present in the working copy and |
|
430 | # since the largefile will be present in the working copy and | |
425 | # different from the normal file in p2. Mercurial therefore |
|
431 | # different from the normal file in p2. Mercurial therefore | |
426 | # triggers a merge action. |
|
432 | # triggers a merge action. | |
427 | # |
|
433 | # | |
428 | # In both cases, we prompt the user and emit new actions to either |
|
434 | # In both cases, we prompt the user and emit new actions to either | |
429 | # remove the standin (if the normal file was kept) or to remove the |
|
435 | # remove the standin (if the normal file was kept) or to remove the | |
430 | # normal file and get the standin (if the largefile was kept). The |
|
436 | # normal file and get the standin (if the largefile was kept). The | |
431 | # default prompt answer is to use the largefile version since it was |
|
437 | # default prompt answer is to use the largefile version since it was | |
432 | # presumably changed on purpose. |
|
438 | # presumably changed on purpose. | |
433 | # |
|
439 | # | |
434 | # Finally, the merge.applyupdates function will then take care of |
|
440 | # Finally, the merge.applyupdates function will then take care of | |
435 | # writing the files into the working copy and lfcommands.updatelfiles |
|
441 | # writing the files into the working copy and lfcommands.updatelfiles | |
436 | # will update the largefiles. |
|
442 | # will update the largefiles. | |
437 | def overridecalculateupdates(origfn, repo, p1, p2, pas, branchmerge, force, |
|
443 | def overridecalculateupdates(origfn, repo, p1, p2, pas, branchmerge, force, | |
438 | partial, acceptremote, followcopies): |
|
444 | partial, acceptremote, followcopies): | |
439 | overwrite = force and not branchmerge |
|
445 | overwrite = force and not branchmerge | |
440 | actions, diverge, renamedelete = origfn( |
|
446 | actions, diverge, renamedelete = origfn( | |
441 | repo, p1, p2, pas, branchmerge, force, partial, acceptremote, |
|
447 | repo, p1, p2, pas, branchmerge, force, partial, acceptremote, | |
442 | followcopies) |
|
448 | followcopies) | |
443 |
|
449 | |||
444 | if overwrite: |
|
450 | if overwrite: | |
445 | return actions, diverge, renamedelete |
|
451 | return actions, diverge, renamedelete | |
446 |
|
452 | |||
447 | # Convert to dictionary with filename as key and action as value. |
|
453 | # Convert to dictionary with filename as key and action as value. | |
448 | lfiles = set() |
|
454 | lfiles = set() | |
449 | for f in actions: |
|
455 | for f in actions: | |
450 | splitstandin = f and lfutil.splitstandin(f) |
|
456 | splitstandin = f and lfutil.splitstandin(f) | |
451 | if splitstandin in p1: |
|
457 | if splitstandin in p1: | |
452 | lfiles.add(splitstandin) |
|
458 | lfiles.add(splitstandin) | |
453 | elif lfutil.standin(f) in p1: |
|
459 | elif lfutil.standin(f) in p1: | |
454 | lfiles.add(f) |
|
460 | lfiles.add(f) | |
455 |
|
461 | |||
456 | for lfile in lfiles: |
|
462 | for lfile in lfiles: | |
457 | standin = lfutil.standin(lfile) |
|
463 | standin = lfutil.standin(lfile) | |
458 | (lm, largs, lmsg) = actions.get(lfile, (None, None, None)) |
|
464 | (lm, largs, lmsg) = actions.get(lfile, (None, None, None)) | |
459 | (sm, sargs, smsg) = actions.get(standin, (None, None, None)) |
|
465 | (sm, sargs, smsg) = actions.get(standin, (None, None, None)) | |
460 | if sm in ('g', 'dc') and lm != 'r': |
|
466 | if sm in ('g', 'dc') and lm != 'r': | |
461 | # Case 1: normal file in the working copy, largefile in |
|
467 | # Case 1: normal file in the working copy, largefile in | |
462 | # the second parent |
|
468 | # the second parent | |
463 | usermsg = _('remote turned local normal file %s into a largefile\n' |
|
469 | usermsg = _('remote turned local normal file %s into a largefile\n' | |
464 | 'use (l)argefile or keep (n)ormal file?' |
|
470 | 'use (l)argefile or keep (n)ormal file?' | |
465 | '$$ &Largefile $$ &Normal file') % lfile |
|
471 | '$$ &Largefile $$ &Normal file') % lfile | |
466 | if repo.ui.promptchoice(usermsg, 0) == 0: # pick remote largefile |
|
472 | if repo.ui.promptchoice(usermsg, 0) == 0: # pick remote largefile | |
467 | actions[lfile] = ('r', None, 'replaced by standin') |
|
473 | actions[lfile] = ('r', None, 'replaced by standin') | |
468 | actions[standin] = ('g', sargs, 'replaces standin') |
|
474 | actions[standin] = ('g', sargs, 'replaces standin') | |
469 | else: # keep local normal file |
|
475 | else: # keep local normal file | |
470 | actions[lfile] = ('k', None, 'replaces standin') |
|
476 | actions[lfile] = ('k', None, 'replaces standin') | |
471 | if branchmerge: |
|
477 | if branchmerge: | |
472 | actions[standin] = ('k', None, 'replaced by non-standin') |
|
478 | actions[standin] = ('k', None, 'replaced by non-standin') | |
473 | else: |
|
479 | else: | |
474 | actions[standin] = ('r', None, 'replaced by non-standin') |
|
480 | actions[standin] = ('r', None, 'replaced by non-standin') | |
475 | elif lm in ('g', 'dc') and sm != 'r': |
|
481 | elif lm in ('g', 'dc') and sm != 'r': | |
476 | # Case 2: largefile in the working copy, normal file in |
|
482 | # Case 2: largefile in the working copy, normal file in | |
477 | # the second parent |
|
483 | # the second parent | |
478 | usermsg = _('remote turned local largefile %s into a normal file\n' |
|
484 | usermsg = _('remote turned local largefile %s into a normal file\n' | |
479 | 'keep (l)argefile or use (n)ormal file?' |
|
485 | 'keep (l)argefile or use (n)ormal file?' | |
480 | '$$ &Largefile $$ &Normal file') % lfile |
|
486 | '$$ &Largefile $$ &Normal file') % lfile | |
481 | if repo.ui.promptchoice(usermsg, 0) == 0: # keep local largefile |
|
487 | if repo.ui.promptchoice(usermsg, 0) == 0: # keep local largefile | |
482 | if branchmerge: |
|
488 | if branchmerge: | |
483 | # largefile can be restored from standin safely |
|
489 | # largefile can be restored from standin safely | |
484 | actions[lfile] = ('k', None, 'replaced by standin') |
|
490 | actions[lfile] = ('k', None, 'replaced by standin') | |
485 | actions[standin] = ('k', None, 'replaces standin') |
|
491 | actions[standin] = ('k', None, 'replaces standin') | |
486 | else: |
|
492 | else: | |
487 | # "lfile" should be marked as "removed" without |
|
493 | # "lfile" should be marked as "removed" without | |
488 | # removal of itself |
|
494 | # removal of itself | |
489 | actions[lfile] = ('lfmr', None, |
|
495 | actions[lfile] = ('lfmr', None, | |
490 | 'forget non-standin largefile') |
|
496 | 'forget non-standin largefile') | |
491 |
|
497 | |||
492 | # linear-merge should treat this largefile as 're-added' |
|
498 | # linear-merge should treat this largefile as 're-added' | |
493 | actions[standin] = ('a', None, 'keep standin') |
|
499 | actions[standin] = ('a', None, 'keep standin') | |
494 | else: # pick remote normal file |
|
500 | else: # pick remote normal file | |
495 | actions[lfile] = ('g', largs, 'replaces standin') |
|
501 | actions[lfile] = ('g', largs, 'replaces standin') | |
496 | actions[standin] = ('r', None, 'replaced by non-standin') |
|
502 | actions[standin] = ('r', None, 'replaced by non-standin') | |
497 |
|
503 | |||
498 | return actions, diverge, renamedelete |
|
504 | return actions, diverge, renamedelete | |
499 |
|
505 | |||
500 | def mergerecordupdates(orig, repo, actions, branchmerge): |
|
506 | def mergerecordupdates(orig, repo, actions, branchmerge): | |
501 | if 'lfmr' in actions: |
|
507 | if 'lfmr' in actions: | |
502 | lfdirstate = lfutil.openlfdirstate(repo.ui, repo) |
|
508 | lfdirstate = lfutil.openlfdirstate(repo.ui, repo) | |
503 | for lfile, args, msg in actions['lfmr']: |
|
509 | for lfile, args, msg in actions['lfmr']: | |
504 | # this should be executed before 'orig', to execute 'remove' |
|
510 | # this should be executed before 'orig', to execute 'remove' | |
505 | # before all other actions |
|
511 | # before all other actions | |
506 | repo.dirstate.remove(lfile) |
|
512 | repo.dirstate.remove(lfile) | |
507 | # make sure lfile doesn't get synclfdirstate'd as normal |
|
513 | # make sure lfile doesn't get synclfdirstate'd as normal | |
508 | lfdirstate.add(lfile) |
|
514 | lfdirstate.add(lfile) | |
509 | lfdirstate.write() |
|
515 | lfdirstate.write() | |
510 |
|
516 | |||
511 | return orig(repo, actions, branchmerge) |
|
517 | return orig(repo, actions, branchmerge) | |
512 |
|
518 | |||
513 |
|
519 | |||
514 | # Override filemerge to prompt the user about how they wish to merge |
|
520 | # Override filemerge to prompt the user about how they wish to merge | |
515 | # largefiles. This will handle identical edits without prompting the user. |
|
521 | # largefiles. This will handle identical edits without prompting the user. | |
516 | def overridefilemerge(origfn, repo, mynode, orig, fcd, fco, fca, labels=None): |
|
522 | def overridefilemerge(origfn, repo, mynode, orig, fcd, fco, fca, labels=None): | |
517 | if not lfutil.isstandin(orig): |
|
523 | if not lfutil.isstandin(orig): | |
518 | return origfn(repo, mynode, orig, fcd, fco, fca, labels=labels) |
|
524 | return origfn(repo, mynode, orig, fcd, fco, fca, labels=labels) | |
519 |
|
525 | |||
520 | ahash = fca.data().strip().lower() |
|
526 | ahash = fca.data().strip().lower() | |
521 | dhash = fcd.data().strip().lower() |
|
527 | dhash = fcd.data().strip().lower() | |
522 | ohash = fco.data().strip().lower() |
|
528 | ohash = fco.data().strip().lower() | |
523 | if (ohash != ahash and |
|
529 | if (ohash != ahash and | |
524 | ohash != dhash and |
|
530 | ohash != dhash and | |
525 | (dhash == ahash or |
|
531 | (dhash == ahash or | |
526 | repo.ui.promptchoice( |
|
532 | repo.ui.promptchoice( | |
527 | _('largefile %s has a merge conflict\nancestor was %s\n' |
|
533 | _('largefile %s has a merge conflict\nancestor was %s\n' | |
528 | 'keep (l)ocal %s or\ntake (o)ther %s?' |
|
534 | 'keep (l)ocal %s or\ntake (o)ther %s?' | |
529 | '$$ &Local $$ &Other') % |
|
535 | '$$ &Local $$ &Other') % | |
530 | (lfutil.splitstandin(orig), ahash, dhash, ohash), |
|
536 | (lfutil.splitstandin(orig), ahash, dhash, ohash), | |
531 | 0) == 1)): |
|
537 | 0) == 1)): | |
532 | repo.wwrite(fcd.path(), fco.data(), fco.flags()) |
|
538 | repo.wwrite(fcd.path(), fco.data(), fco.flags()) | |
533 | return 0 |
|
539 | return 0 | |
534 |
|
540 | |||
535 | # Copy first changes the matchers to match standins instead of |
|
541 | # Copy first changes the matchers to match standins instead of | |
536 | # largefiles. Then it overrides util.copyfile in that function it |
|
542 | # largefiles. Then it overrides util.copyfile in that function it | |
537 | # checks if the destination largefile already exists. It also keeps a |
|
543 | # checks if the destination largefile already exists. It also keeps a | |
538 | # list of copied files so that the largefiles can be copied and the |
|
544 | # list of copied files so that the largefiles can be copied and the | |
539 | # dirstate updated. |
|
545 | # dirstate updated. | |
540 | def overridecopy(orig, ui, repo, pats, opts, rename=False): |
|
546 | def overridecopy(orig, ui, repo, pats, opts, rename=False): | |
541 | # doesn't remove largefile on rename |
|
547 | # doesn't remove largefile on rename | |
542 | if len(pats) < 2: |
|
548 | if len(pats) < 2: | |
543 | # this isn't legal, let the original function deal with it |
|
549 | # this isn't legal, let the original function deal with it | |
544 | return orig(ui, repo, pats, opts, rename) |
|
550 | return orig(ui, repo, pats, opts, rename) | |
545 |
|
551 | |||
546 | def makestandin(relpath): |
|
552 | def makestandin(relpath): | |
547 | path = pathutil.canonpath(repo.root, repo.getcwd(), relpath) |
|
553 | path = pathutil.canonpath(repo.root, repo.getcwd(), relpath) | |
548 | return os.path.join(repo.wjoin(lfutil.standin(path))) |
|
554 | return os.path.join(repo.wjoin(lfutil.standin(path))) | |
549 |
|
555 | |||
550 | fullpats = scmutil.expandpats(pats) |
|
556 | fullpats = scmutil.expandpats(pats) | |
551 | dest = fullpats[-1] |
|
557 | dest = fullpats[-1] | |
552 |
|
558 | |||
553 | if os.path.isdir(dest): |
|
559 | if os.path.isdir(dest): | |
554 | if not os.path.isdir(makestandin(dest)): |
|
560 | if not os.path.isdir(makestandin(dest)): | |
555 | os.makedirs(makestandin(dest)) |
|
561 | os.makedirs(makestandin(dest)) | |
556 | # This could copy both lfiles and normal files in one command, |
|
562 | # This could copy both lfiles and normal files in one command, | |
557 | # but we don't want to do that. First replace their matcher to |
|
563 | # but we don't want to do that. First replace their matcher to | |
558 | # only match normal files and run it, then replace it to just |
|
564 | # only match normal files and run it, then replace it to just | |
559 | # match largefiles and run it again. |
|
565 | # match largefiles and run it again. | |
560 | nonormalfiles = False |
|
566 | nonormalfiles = False | |
561 | nolfiles = False |
|
567 | nolfiles = False | |
562 | installnormalfilesmatchfn(repo[None].manifest()) |
|
568 | installnormalfilesmatchfn(repo[None].manifest()) | |
563 | try: |
|
569 | try: | |
564 | try: |
|
570 | try: | |
565 | result = orig(ui, repo, pats, opts, rename) |
|
571 | result = orig(ui, repo, pats, opts, rename) | |
566 | except util.Abort, e: |
|
572 | except util.Abort, e: | |
567 | if str(e) != _('no files to copy'): |
|
573 | if str(e) != _('no files to copy'): | |
568 | raise e |
|
574 | raise e | |
569 | else: |
|
575 | else: | |
570 | nonormalfiles = True |
|
576 | nonormalfiles = True | |
571 | result = 0 |
|
577 | result = 0 | |
572 | finally: |
|
578 | finally: | |
573 | restorematchfn() |
|
579 | restorematchfn() | |
574 |
|
580 | |||
575 | # The first rename can cause our current working directory to be removed. |
|
581 | # The first rename can cause our current working directory to be removed. | |
576 | # In that case there is nothing left to copy/rename so just quit. |
|
582 | # In that case there is nothing left to copy/rename so just quit. | |
577 | try: |
|
583 | try: | |
578 | repo.getcwd() |
|
584 | repo.getcwd() | |
579 | except OSError: |
|
585 | except OSError: | |
580 | return result |
|
586 | return result | |
581 |
|
587 | |||
582 | try: |
|
588 | try: | |
583 | try: |
|
589 | try: | |
584 | # When we call orig below it creates the standins but we don't add |
|
590 | # When we call orig below it creates the standins but we don't add | |
585 | # them to the dir state until later so lock during that time. |
|
591 | # them to the dir state until later so lock during that time. | |
586 | wlock = repo.wlock() |
|
592 | wlock = repo.wlock() | |
587 |
|
593 | |||
588 | manifest = repo[None].manifest() |
|
594 | manifest = repo[None].manifest() | |
589 | def overridematch(ctx, pats=[], opts={}, globbed=False, |
|
595 | def overridematch(ctx, pats=[], opts={}, globbed=False, | |
590 | default='relpath'): |
|
596 | default='relpath'): | |
591 | newpats = [] |
|
597 | newpats = [] | |
592 | # The patterns were previously mangled to add the standin |
|
598 | # The patterns were previously mangled to add the standin | |
593 | # directory; we need to remove that now |
|
599 | # directory; we need to remove that now | |
594 | for pat in pats: |
|
600 | for pat in pats: | |
595 | if match_.patkind(pat) is None and lfutil.shortname in pat: |
|
601 | if match_.patkind(pat) is None and lfutil.shortname in pat: | |
596 | newpats.append(pat.replace(lfutil.shortname, '')) |
|
602 | newpats.append(pat.replace(lfutil.shortname, '')) | |
597 | else: |
|
603 | else: | |
598 | newpats.append(pat) |
|
604 | newpats.append(pat) | |
599 | match = oldmatch(ctx, newpats, opts, globbed, default) |
|
605 | match = oldmatch(ctx, newpats, opts, globbed, default) | |
600 | m = copy.copy(match) |
|
606 | m = copy.copy(match) | |
601 | lfile = lambda f: lfutil.standin(f) in manifest |
|
607 | lfile = lambda f: lfutil.standin(f) in manifest | |
602 | m._files = [lfutil.standin(f) for f in m._files if lfile(f)] |
|
608 | m._files = [lfutil.standin(f) for f in m._files if lfile(f)] | |
603 | m._fmap = set(m._files) |
|
609 | m._fmap = set(m._files) | |
604 | origmatchfn = m.matchfn |
|
610 | origmatchfn = m.matchfn | |
605 | m.matchfn = lambda f: (lfutil.isstandin(f) and |
|
611 | m.matchfn = lambda f: (lfutil.isstandin(f) and | |
606 | (f in manifest) and |
|
612 | (f in manifest) and | |
607 | origmatchfn(lfutil.splitstandin(f)) or |
|
613 | origmatchfn(lfutil.splitstandin(f)) or | |
608 | None) |
|
614 | None) | |
609 | return m |
|
615 | return m | |
610 | oldmatch = installmatchfn(overridematch) |
|
616 | oldmatch = installmatchfn(overridematch) | |
611 | listpats = [] |
|
617 | listpats = [] | |
612 | for pat in pats: |
|
618 | for pat in pats: | |
613 | if match_.patkind(pat) is not None: |
|
619 | if match_.patkind(pat) is not None: | |
614 | listpats.append(pat) |
|
620 | listpats.append(pat) | |
615 | else: |
|
621 | else: | |
616 | listpats.append(makestandin(pat)) |
|
622 | listpats.append(makestandin(pat)) | |
617 |
|
623 | |||
618 | try: |
|
624 | try: | |
619 | origcopyfile = util.copyfile |
|
625 | origcopyfile = util.copyfile | |
620 | copiedfiles = [] |
|
626 | copiedfiles = [] | |
621 | def overridecopyfile(src, dest): |
|
627 | def overridecopyfile(src, dest): | |
622 | if (lfutil.shortname in src and |
|
628 | if (lfutil.shortname in src and | |
623 | dest.startswith(repo.wjoin(lfutil.shortname))): |
|
629 | dest.startswith(repo.wjoin(lfutil.shortname))): | |
624 | destlfile = dest.replace(lfutil.shortname, '') |
|
630 | destlfile = dest.replace(lfutil.shortname, '') | |
625 | if not opts['force'] and os.path.exists(destlfile): |
|
631 | if not opts['force'] and os.path.exists(destlfile): | |
626 | raise IOError('', |
|
632 | raise IOError('', | |
627 | _('destination largefile already exists')) |
|
633 | _('destination largefile already exists')) | |
628 | copiedfiles.append((src, dest)) |
|
634 | copiedfiles.append((src, dest)) | |
629 | origcopyfile(src, dest) |
|
635 | origcopyfile(src, dest) | |
630 |
|
636 | |||
631 | util.copyfile = overridecopyfile |
|
637 | util.copyfile = overridecopyfile | |
632 | result += orig(ui, repo, listpats, opts, rename) |
|
638 | result += orig(ui, repo, listpats, opts, rename) | |
633 | finally: |
|
639 | finally: | |
634 | util.copyfile = origcopyfile |
|
640 | util.copyfile = origcopyfile | |
635 |
|
641 | |||
636 | lfdirstate = lfutil.openlfdirstate(ui, repo) |
|
642 | lfdirstate = lfutil.openlfdirstate(ui, repo) | |
637 | for (src, dest) in copiedfiles: |
|
643 | for (src, dest) in copiedfiles: | |
638 | if (lfutil.shortname in src and |
|
644 | if (lfutil.shortname in src and | |
639 | dest.startswith(repo.wjoin(lfutil.shortname))): |
|
645 | dest.startswith(repo.wjoin(lfutil.shortname))): | |
640 | srclfile = src.replace(repo.wjoin(lfutil.standin('')), '') |
|
646 | srclfile = src.replace(repo.wjoin(lfutil.standin('')), '') | |
641 | destlfile = dest.replace(repo.wjoin(lfutil.standin('')), '') |
|
647 | destlfile = dest.replace(repo.wjoin(lfutil.standin('')), '') | |
642 | destlfiledir = os.path.dirname(repo.wjoin(destlfile)) or '.' |
|
648 | destlfiledir = os.path.dirname(repo.wjoin(destlfile)) or '.' | |
643 | if not os.path.isdir(destlfiledir): |
|
649 | if not os.path.isdir(destlfiledir): | |
644 | os.makedirs(destlfiledir) |
|
650 | os.makedirs(destlfiledir) | |
645 | if rename: |
|
651 | if rename: | |
646 | os.rename(repo.wjoin(srclfile), repo.wjoin(destlfile)) |
|
652 | os.rename(repo.wjoin(srclfile), repo.wjoin(destlfile)) | |
647 |
|
653 | |||
648 | # The file is gone, but this deletes any empty parent |
|
654 | # The file is gone, but this deletes any empty parent | |
649 | # directories as a side-effect. |
|
655 | # directories as a side-effect. | |
650 | util.unlinkpath(repo.wjoin(srclfile), True) |
|
656 | util.unlinkpath(repo.wjoin(srclfile), True) | |
651 | lfdirstate.remove(srclfile) |
|
657 | lfdirstate.remove(srclfile) | |
652 | else: |
|
658 | else: | |
653 | util.copyfile(repo.wjoin(srclfile), |
|
659 | util.copyfile(repo.wjoin(srclfile), | |
654 | repo.wjoin(destlfile)) |
|
660 | repo.wjoin(destlfile)) | |
655 |
|
661 | |||
656 | lfdirstate.add(destlfile) |
|
662 | lfdirstate.add(destlfile) | |
657 | lfdirstate.write() |
|
663 | lfdirstate.write() | |
658 | except util.Abort, e: |
|
664 | except util.Abort, e: | |
659 | if str(e) != _('no files to copy'): |
|
665 | if str(e) != _('no files to copy'): | |
660 | raise e |
|
666 | raise e | |
661 | else: |
|
667 | else: | |
662 | nolfiles = True |
|
668 | nolfiles = True | |
663 | finally: |
|
669 | finally: | |
664 | restorematchfn() |
|
670 | restorematchfn() | |
665 | wlock.release() |
|
671 | wlock.release() | |
666 |
|
672 | |||
667 | if nolfiles and nonormalfiles: |
|
673 | if nolfiles and nonormalfiles: | |
668 | raise util.Abort(_('no files to copy')) |
|
674 | raise util.Abort(_('no files to copy')) | |
669 |
|
675 | |||
670 | return result |
|
676 | return result | |
671 |
|
677 | |||
672 | # When the user calls revert, we have to be careful to not revert any |
|
678 | # When the user calls revert, we have to be careful to not revert any | |
673 | # changes to other largefiles accidentally. This means we have to keep |
|
679 | # changes to other largefiles accidentally. This means we have to keep | |
674 | # track of the largefiles that are being reverted so we only pull down |
|
680 | # track of the largefiles that are being reverted so we only pull down | |
675 | # the necessary largefiles. |
|
681 | # the necessary largefiles. | |
676 | # |
|
682 | # | |
677 | # Standins are only updated (to match the hash of largefiles) before |
|
683 | # Standins are only updated (to match the hash of largefiles) before | |
678 | # commits. Update the standins then run the original revert, changing |
|
684 | # commits. Update the standins then run the original revert, changing | |
679 | # the matcher to hit standins instead of largefiles. Based on the |
|
685 | # the matcher to hit standins instead of largefiles. Based on the | |
680 | # resulting standins update the largefiles. |
|
686 | # resulting standins update the largefiles. | |
681 | def overriderevert(orig, ui, repo, *pats, **opts): |
|
687 | def overriderevert(orig, ui, repo, *pats, **opts): | |
682 | # Because we put the standins in a bad state (by updating them) |
|
688 | # Because we put the standins in a bad state (by updating them) | |
683 | # and then return them to a correct state we need to lock to |
|
689 | # and then return them to a correct state we need to lock to | |
684 | # prevent others from changing them in their incorrect state. |
|
690 | # prevent others from changing them in their incorrect state. | |
685 | wlock = repo.wlock() |
|
691 | wlock = repo.wlock() | |
686 | try: |
|
692 | try: | |
687 | lfdirstate = lfutil.openlfdirstate(ui, repo) |
|
693 | lfdirstate = lfutil.openlfdirstate(ui, repo) | |
688 | s = lfutil.lfdirstatestatus(lfdirstate, repo) |
|
694 | s = lfutil.lfdirstatestatus(lfdirstate, repo) | |
689 | lfdirstate.write() |
|
695 | lfdirstate.write() | |
690 | for lfile in s.modified: |
|
696 | for lfile in s.modified: | |
691 | lfutil.updatestandin(repo, lfutil.standin(lfile)) |
|
697 | lfutil.updatestandin(repo, lfutil.standin(lfile)) | |
692 | for lfile in s.deleted: |
|
698 | for lfile in s.deleted: | |
693 | if (os.path.exists(repo.wjoin(lfutil.standin(lfile)))): |
|
699 | if (os.path.exists(repo.wjoin(lfutil.standin(lfile)))): | |
694 | os.unlink(repo.wjoin(lfutil.standin(lfile))) |
|
700 | os.unlink(repo.wjoin(lfutil.standin(lfile))) | |
695 |
|
701 | |||
696 | oldstandins = lfutil.getstandinsstate(repo) |
|
702 | oldstandins = lfutil.getstandinsstate(repo) | |
697 |
|
703 | |||
698 | def overridematch(ctx, pats=[], opts={}, globbed=False, |
|
704 | def overridematch(ctx, pats=[], opts={}, globbed=False, | |
699 | default='relpath'): |
|
705 | default='relpath'): | |
700 | match = oldmatch(ctx, pats, opts, globbed, default) |
|
706 | match = oldmatch(ctx, pats, opts, globbed, default) | |
701 | m = copy.copy(match) |
|
707 | m = copy.copy(match) | |
702 | def tostandin(f): |
|
708 | def tostandin(f): | |
703 | if lfutil.standin(f) in ctx: |
|
709 | if lfutil.standin(f) in ctx: | |
704 | return lfutil.standin(f) |
|
710 | return lfutil.standin(f) | |
705 | elif lfutil.standin(f) in repo[None]: |
|
711 | elif lfutil.standin(f) in repo[None]: | |
706 | return None |
|
712 | return None | |
707 | return f |
|
713 | return f | |
708 | m._files = [tostandin(f) for f in m._files] |
|
714 | m._files = [tostandin(f) for f in m._files] | |
709 | m._files = [f for f in m._files if f is not None] |
|
715 | m._files = [f for f in m._files if f is not None] | |
710 | m._fmap = set(m._files) |
|
716 | m._fmap = set(m._files) | |
711 | origmatchfn = m.matchfn |
|
717 | origmatchfn = m.matchfn | |
712 | def matchfn(f): |
|
718 | def matchfn(f): | |
713 | if lfutil.isstandin(f): |
|
719 | if lfutil.isstandin(f): | |
714 | return (origmatchfn(lfutil.splitstandin(f)) and |
|
720 | return (origmatchfn(lfutil.splitstandin(f)) and | |
715 | (f in repo[None] or f in ctx)) |
|
721 | (f in repo[None] or f in ctx)) | |
716 | return origmatchfn(f) |
|
722 | return origmatchfn(f) | |
717 | m.matchfn = matchfn |
|
723 | m.matchfn = matchfn | |
718 | return m |
|
724 | return m | |
719 | oldmatch = installmatchfn(overridematch) |
|
725 | oldmatch = installmatchfn(overridematch) | |
720 | try: |
|
726 | try: | |
721 | orig(ui, repo, *pats, **opts) |
|
727 | orig(ui, repo, *pats, **opts) | |
722 | finally: |
|
728 | finally: | |
723 | restorematchfn() |
|
729 | restorematchfn() | |
724 |
|
730 | |||
725 | newstandins = lfutil.getstandinsstate(repo) |
|
731 | newstandins = lfutil.getstandinsstate(repo) | |
726 | filelist = lfutil.getlfilestoupdate(oldstandins, newstandins) |
|
732 | filelist = lfutil.getlfilestoupdate(oldstandins, newstandins) | |
727 | # lfdirstate should be 'normallookup'-ed for updated files, |
|
733 | # lfdirstate should be 'normallookup'-ed for updated files, | |
728 | # because reverting doesn't touch dirstate for 'normal' files |
|
734 | # because reverting doesn't touch dirstate for 'normal' files | |
729 | # when target revision is explicitly specified: in such case, |
|
735 | # when target revision is explicitly specified: in such case, | |
730 | # 'n' and valid timestamp in dirstate doesn't ensure 'clean' |
|
736 | # 'n' and valid timestamp in dirstate doesn't ensure 'clean' | |
731 | # of target (standin) file. |
|
737 | # of target (standin) file. | |
732 | lfcommands.updatelfiles(ui, repo, filelist, printmessage=False, |
|
738 | lfcommands.updatelfiles(ui, repo, filelist, printmessage=False, | |
733 | normallookup=True) |
|
739 | normallookup=True) | |
734 |
|
740 | |||
735 | finally: |
|
741 | finally: | |
736 | wlock.release() |
|
742 | wlock.release() | |
737 |
|
743 | |||
738 | # after pulling changesets, we need to take some extra care to get |
|
744 | # after pulling changesets, we need to take some extra care to get | |
739 | # largefiles updated remotely |
|
745 | # largefiles updated remotely | |
740 | def overridepull(orig, ui, repo, source=None, **opts): |
|
746 | def overridepull(orig, ui, repo, source=None, **opts): | |
741 | revsprepull = len(repo) |
|
747 | revsprepull = len(repo) | |
742 | if not source: |
|
748 | if not source: | |
743 | source = 'default' |
|
749 | source = 'default' | |
744 | repo.lfpullsource = source |
|
750 | repo.lfpullsource = source | |
745 | result = orig(ui, repo, source, **opts) |
|
751 | result = orig(ui, repo, source, **opts) | |
746 | revspostpull = len(repo) |
|
752 | revspostpull = len(repo) | |
747 | lfrevs = opts.get('lfrev', []) |
|
753 | lfrevs = opts.get('lfrev', []) | |
748 | if opts.get('all_largefiles'): |
|
754 | if opts.get('all_largefiles'): | |
749 | lfrevs.append('pulled()') |
|
755 | lfrevs.append('pulled()') | |
750 | if lfrevs and revspostpull > revsprepull: |
|
756 | if lfrevs and revspostpull > revsprepull: | |
751 | numcached = 0 |
|
757 | numcached = 0 | |
752 | repo.firstpulled = revsprepull # for pulled() revset expression |
|
758 | repo.firstpulled = revsprepull # for pulled() revset expression | |
753 | try: |
|
759 | try: | |
754 | for rev in scmutil.revrange(repo, lfrevs): |
|
760 | for rev in scmutil.revrange(repo, lfrevs): | |
755 | ui.note(_('pulling largefiles for revision %s\n') % rev) |
|
761 | ui.note(_('pulling largefiles for revision %s\n') % rev) | |
756 | (cached, missing) = lfcommands.cachelfiles(ui, repo, rev) |
|
762 | (cached, missing) = lfcommands.cachelfiles(ui, repo, rev) | |
757 | numcached += len(cached) |
|
763 | numcached += len(cached) | |
758 | finally: |
|
764 | finally: | |
759 | del repo.firstpulled |
|
765 | del repo.firstpulled | |
760 | ui.status(_("%d largefiles cached\n") % numcached) |
|
766 | ui.status(_("%d largefiles cached\n") % numcached) | |
761 | return result |
|
767 | return result | |
762 |
|
768 | |||
763 | def pulledrevsetsymbol(repo, subset, x): |
|
769 | def pulledrevsetsymbol(repo, subset, x): | |
764 | """``pulled()`` |
|
770 | """``pulled()`` | |
765 | Changesets that just has been pulled. |
|
771 | Changesets that just has been pulled. | |
766 |
|
772 | |||
767 | Only available with largefiles from pull --lfrev expressions. |
|
773 | Only available with largefiles from pull --lfrev expressions. | |
768 |
|
774 | |||
769 | .. container:: verbose |
|
775 | .. container:: verbose | |
770 |
|
776 | |||
771 | Some examples: |
|
777 | Some examples: | |
772 |
|
778 | |||
773 | - pull largefiles for all new changesets:: |
|
779 | - pull largefiles for all new changesets:: | |
774 |
|
780 | |||
775 | hg pull -lfrev "pulled()" |
|
781 | hg pull -lfrev "pulled()" | |
776 |
|
782 | |||
777 | - pull largefiles for all new branch heads:: |
|
783 | - pull largefiles for all new branch heads:: | |
778 |
|
784 | |||
779 | hg pull -lfrev "head(pulled()) and not closed()" |
|
785 | hg pull -lfrev "head(pulled()) and not closed()" | |
780 |
|
786 | |||
781 | """ |
|
787 | """ | |
782 |
|
788 | |||
783 | try: |
|
789 | try: | |
784 | firstpulled = repo.firstpulled |
|
790 | firstpulled = repo.firstpulled | |
785 | except AttributeError: |
|
791 | except AttributeError: | |
786 | raise util.Abort(_("pulled() only available in --lfrev")) |
|
792 | raise util.Abort(_("pulled() only available in --lfrev")) | |
787 | return revset.baseset([r for r in subset if r >= firstpulled]) |
|
793 | return revset.baseset([r for r in subset if r >= firstpulled]) | |
788 |
|
794 | |||
789 | def overrideclone(orig, ui, source, dest=None, **opts): |
|
795 | def overrideclone(orig, ui, source, dest=None, **opts): | |
790 | d = dest |
|
796 | d = dest | |
791 | if d is None: |
|
797 | if d is None: | |
792 | d = hg.defaultdest(source) |
|
798 | d = hg.defaultdest(source) | |
793 | if opts.get('all_largefiles') and not hg.islocal(d): |
|
799 | if opts.get('all_largefiles') and not hg.islocal(d): | |
794 | raise util.Abort(_( |
|
800 | raise util.Abort(_( | |
795 | '--all-largefiles is incompatible with non-local destination %s') % |
|
801 | '--all-largefiles is incompatible with non-local destination %s') % | |
796 | d) |
|
802 | d) | |
797 |
|
803 | |||
798 | return orig(ui, source, dest, **opts) |
|
804 | return orig(ui, source, dest, **opts) | |
799 |
|
805 | |||
800 | def hgclone(orig, ui, opts, *args, **kwargs): |
|
806 | def hgclone(orig, ui, opts, *args, **kwargs): | |
801 | result = orig(ui, opts, *args, **kwargs) |
|
807 | result = orig(ui, opts, *args, **kwargs) | |
802 |
|
808 | |||
803 | if result is not None: |
|
809 | if result is not None: | |
804 | sourcerepo, destrepo = result |
|
810 | sourcerepo, destrepo = result | |
805 | repo = destrepo.local() |
|
811 | repo = destrepo.local() | |
806 |
|
812 | |||
807 | # Caching is implicitly limited to 'rev' option, since the dest repo was |
|
813 | # Caching is implicitly limited to 'rev' option, since the dest repo was | |
808 | # truncated at that point. The user may expect a download count with |
|
814 | # truncated at that point. The user may expect a download count with | |
809 | # this option, so attempt whether or not this is a largefile repo. |
|
815 | # this option, so attempt whether or not this is a largefile repo. | |
810 | if opts.get('all_largefiles'): |
|
816 | if opts.get('all_largefiles'): | |
811 | success, missing = lfcommands.downloadlfiles(ui, repo, None) |
|
817 | success, missing = lfcommands.downloadlfiles(ui, repo, None) | |
812 |
|
818 | |||
813 | if missing != 0: |
|
819 | if missing != 0: | |
814 | return None |
|
820 | return None | |
815 |
|
821 | |||
816 | return result |
|
822 | return result | |
817 |
|
823 | |||
818 | def overriderebase(orig, ui, repo, **opts): |
|
824 | def overriderebase(orig, ui, repo, **opts): | |
819 | resuming = opts.get('continue') |
|
825 | resuming = opts.get('continue') | |
820 | repo._lfcommithooks.append(lfutil.automatedcommithook(resuming)) |
|
826 | repo._lfcommithooks.append(lfutil.automatedcommithook(resuming)) | |
821 | repo._lfstatuswriters.append(lambda *msg, **opts: None) |
|
827 | repo._lfstatuswriters.append(lambda *msg, **opts: None) | |
822 | try: |
|
828 | try: | |
823 | return orig(ui, repo, **opts) |
|
829 | return orig(ui, repo, **opts) | |
824 | finally: |
|
830 | finally: | |
825 | repo._lfstatuswriters.pop() |
|
831 | repo._lfstatuswriters.pop() | |
826 | repo._lfcommithooks.pop() |
|
832 | repo._lfcommithooks.pop() | |
827 |
|
833 | |||
828 | def overridearchive(orig, repo, dest, node, kind, decode=True, matchfn=None, |
|
834 | def overridearchive(orig, repo, dest, node, kind, decode=True, matchfn=None, | |
829 | prefix=None, mtime=None, subrepos=None): |
|
835 | prefix=None, mtime=None, subrepos=None): | |
830 | # No need to lock because we are only reading history and |
|
836 | # No need to lock because we are only reading history and | |
831 | # largefile caches, neither of which are modified. |
|
837 | # largefile caches, neither of which are modified. | |
832 | lfcommands.cachelfiles(repo.ui, repo, node) |
|
838 | lfcommands.cachelfiles(repo.ui, repo, node) | |
833 |
|
839 | |||
834 | if kind not in archival.archivers: |
|
840 | if kind not in archival.archivers: | |
835 | raise util.Abort(_("unknown archive type '%s'") % kind) |
|
841 | raise util.Abort(_("unknown archive type '%s'") % kind) | |
836 |
|
842 | |||
837 | ctx = repo[node] |
|
843 | ctx = repo[node] | |
838 |
|
844 | |||
839 | if kind == 'files': |
|
845 | if kind == 'files': | |
840 | if prefix: |
|
846 | if prefix: | |
841 | raise util.Abort( |
|
847 | raise util.Abort( | |
842 | _('cannot give prefix when archiving to files')) |
|
848 | _('cannot give prefix when archiving to files')) | |
843 | else: |
|
849 | else: | |
844 | prefix = archival.tidyprefix(dest, kind, prefix) |
|
850 | prefix = archival.tidyprefix(dest, kind, prefix) | |
845 |
|
851 | |||
846 | def write(name, mode, islink, getdata): |
|
852 | def write(name, mode, islink, getdata): | |
847 | if matchfn and not matchfn(name): |
|
853 | if matchfn and not matchfn(name): | |
848 | return |
|
854 | return | |
849 | data = getdata() |
|
855 | data = getdata() | |
850 | if decode: |
|
856 | if decode: | |
851 | data = repo.wwritedata(name, data) |
|
857 | data = repo.wwritedata(name, data) | |
852 | archiver.addfile(prefix + name, mode, islink, data) |
|
858 | archiver.addfile(prefix + name, mode, islink, data) | |
853 |
|
859 | |||
854 | archiver = archival.archivers[kind](dest, mtime or ctx.date()[0]) |
|
860 | archiver = archival.archivers[kind](dest, mtime or ctx.date()[0]) | |
855 |
|
861 | |||
856 | if repo.ui.configbool("ui", "archivemeta", True): |
|
862 | if repo.ui.configbool("ui", "archivemeta", True): | |
857 | def metadata(): |
|
863 | def metadata(): | |
858 | base = 'repo: %s\nnode: %s\nbranch: %s\n' % ( |
|
864 | base = 'repo: %s\nnode: %s\nbranch: %s\n' % ( | |
859 | hex(repo.changelog.node(0)), hex(node), ctx.branch()) |
|
865 | hex(repo.changelog.node(0)), hex(node), ctx.branch()) | |
860 |
|
866 | |||
861 | tags = ''.join('tag: %s\n' % t for t in ctx.tags() |
|
867 | tags = ''.join('tag: %s\n' % t for t in ctx.tags() | |
862 | if repo.tagtype(t) == 'global') |
|
868 | if repo.tagtype(t) == 'global') | |
863 | if not tags: |
|
869 | if not tags: | |
864 | repo.ui.pushbuffer() |
|
870 | repo.ui.pushbuffer() | |
865 | opts = {'template': '{latesttag}\n{latesttagdistance}', |
|
871 | opts = {'template': '{latesttag}\n{latesttagdistance}', | |
866 | 'style': '', 'patch': None, 'git': None} |
|
872 | 'style': '', 'patch': None, 'git': None} | |
867 | cmdutil.show_changeset(repo.ui, repo, opts).show(ctx) |
|
873 | cmdutil.show_changeset(repo.ui, repo, opts).show(ctx) | |
868 | ltags, dist = repo.ui.popbuffer().split('\n') |
|
874 | ltags, dist = repo.ui.popbuffer().split('\n') | |
869 | tags = ''.join('latesttag: %s\n' % t for t in ltags.split(':')) |
|
875 | tags = ''.join('latesttag: %s\n' % t for t in ltags.split(':')) | |
870 | tags += 'latesttagdistance: %s\n' % dist |
|
876 | tags += 'latesttagdistance: %s\n' % dist | |
871 |
|
877 | |||
872 | return base + tags |
|
878 | return base + tags | |
873 |
|
879 | |||
874 | write('.hg_archival.txt', 0644, False, metadata) |
|
880 | write('.hg_archival.txt', 0644, False, metadata) | |
875 |
|
881 | |||
876 | for f in ctx: |
|
882 | for f in ctx: | |
877 | ff = ctx.flags(f) |
|
883 | ff = ctx.flags(f) | |
878 | getdata = ctx[f].data |
|
884 | getdata = ctx[f].data | |
879 | if lfutil.isstandin(f): |
|
885 | if lfutil.isstandin(f): | |
880 | path = lfutil.findfile(repo, getdata().strip()) |
|
886 | path = lfutil.findfile(repo, getdata().strip()) | |
881 | if path is None: |
|
887 | if path is None: | |
882 | raise util.Abort( |
|
888 | raise util.Abort( | |
883 | _('largefile %s not found in repo store or system cache') |
|
889 | _('largefile %s not found in repo store or system cache') | |
884 | % lfutil.splitstandin(f)) |
|
890 | % lfutil.splitstandin(f)) | |
885 | f = lfutil.splitstandin(f) |
|
891 | f = lfutil.splitstandin(f) | |
886 |
|
892 | |||
887 | def getdatafn(): |
|
893 | def getdatafn(): | |
888 | fd = None |
|
894 | fd = None | |
889 | try: |
|
895 | try: | |
890 | fd = open(path, 'rb') |
|
896 | fd = open(path, 'rb') | |
891 | return fd.read() |
|
897 | return fd.read() | |
892 | finally: |
|
898 | finally: | |
893 | if fd: |
|
899 | if fd: | |
894 | fd.close() |
|
900 | fd.close() | |
895 |
|
901 | |||
896 | getdata = getdatafn |
|
902 | getdata = getdatafn | |
897 | write(f, 'x' in ff and 0755 or 0644, 'l' in ff, getdata) |
|
903 | write(f, 'x' in ff and 0755 or 0644, 'l' in ff, getdata) | |
898 |
|
904 | |||
899 | if subrepos: |
|
905 | if subrepos: | |
900 | for subpath in sorted(ctx.substate): |
|
906 | for subpath in sorted(ctx.substate): | |
901 | sub = ctx.sub(subpath) |
|
907 | sub = ctx.sub(subpath) | |
902 | submatch = match_.narrowmatcher(subpath, matchfn) |
|
908 | submatch = match_.narrowmatcher(subpath, matchfn) | |
903 | sub.archive(archiver, prefix, submatch) |
|
909 | sub.archive(archiver, prefix, submatch) | |
904 |
|
910 | |||
905 | archiver.done() |
|
911 | archiver.done() | |
906 |
|
912 | |||
907 | def hgsubrepoarchive(orig, repo, archiver, prefix, match=None): |
|
913 | def hgsubrepoarchive(orig, repo, archiver, prefix, match=None): | |
908 | repo._get(repo._state + ('hg',)) |
|
914 | repo._get(repo._state + ('hg',)) | |
909 | rev = repo._state[1] |
|
915 | rev = repo._state[1] | |
910 | ctx = repo._repo[rev] |
|
916 | ctx = repo._repo[rev] | |
911 |
|
917 | |||
912 | lfcommands.cachelfiles(repo.ui, repo._repo, ctx.node()) |
|
918 | lfcommands.cachelfiles(repo.ui, repo._repo, ctx.node()) | |
913 |
|
919 | |||
914 | def write(name, mode, islink, getdata): |
|
920 | def write(name, mode, islink, getdata): | |
915 | # At this point, the standin has been replaced with the largefile name, |
|
921 | # At this point, the standin has been replaced with the largefile name, | |
916 | # so the normal matcher works here without the lfutil variants. |
|
922 | # so the normal matcher works here without the lfutil variants. | |
917 | if match and not match(f): |
|
923 | if match and not match(f): | |
918 | return |
|
924 | return | |
919 | data = getdata() |
|
925 | data = getdata() | |
920 |
|
926 | |||
921 | archiver.addfile(prefix + repo._path + '/' + name, mode, islink, data) |
|
927 | archiver.addfile(prefix + repo._path + '/' + name, mode, islink, data) | |
922 |
|
928 | |||
923 | for f in ctx: |
|
929 | for f in ctx: | |
924 | ff = ctx.flags(f) |
|
930 | ff = ctx.flags(f) | |
925 | getdata = ctx[f].data |
|
931 | getdata = ctx[f].data | |
926 | if lfutil.isstandin(f): |
|
932 | if lfutil.isstandin(f): | |
927 | path = lfutil.findfile(repo._repo, getdata().strip()) |
|
933 | path = lfutil.findfile(repo._repo, getdata().strip()) | |
928 | if path is None: |
|
934 | if path is None: | |
929 | raise util.Abort( |
|
935 | raise util.Abort( | |
930 | _('largefile %s not found in repo store or system cache') |
|
936 | _('largefile %s not found in repo store or system cache') | |
931 | % lfutil.splitstandin(f)) |
|
937 | % lfutil.splitstandin(f)) | |
932 | f = lfutil.splitstandin(f) |
|
938 | f = lfutil.splitstandin(f) | |
933 |
|
939 | |||
934 | def getdatafn(): |
|
940 | def getdatafn(): | |
935 | fd = None |
|
941 | fd = None | |
936 | try: |
|
942 | try: | |
937 | fd = open(os.path.join(prefix, path), 'rb') |
|
943 | fd = open(os.path.join(prefix, path), 'rb') | |
938 | return fd.read() |
|
944 | return fd.read() | |
939 | finally: |
|
945 | finally: | |
940 | if fd: |
|
946 | if fd: | |
941 | fd.close() |
|
947 | fd.close() | |
942 |
|
948 | |||
943 | getdata = getdatafn |
|
949 | getdata = getdatafn | |
944 |
|
950 | |||
945 | write(f, 'x' in ff and 0755 or 0644, 'l' in ff, getdata) |
|
951 | write(f, 'x' in ff and 0755 or 0644, 'l' in ff, getdata) | |
946 |
|
952 | |||
947 | for subpath in sorted(ctx.substate): |
|
953 | for subpath in sorted(ctx.substate): | |
948 | sub = ctx.sub(subpath) |
|
954 | sub = ctx.sub(subpath) | |
949 | submatch = match_.narrowmatcher(subpath, match) |
|
955 | submatch = match_.narrowmatcher(subpath, match) | |
950 | sub.archive(archiver, os.path.join(prefix, repo._path) + '/', submatch) |
|
956 | sub.archive(archiver, os.path.join(prefix, repo._path) + '/', submatch) | |
951 |
|
957 | |||
952 | # If a largefile is modified, the change is not reflected in its |
|
958 | # If a largefile is modified, the change is not reflected in its | |
953 | # standin until a commit. cmdutil.bailifchanged() raises an exception |
|
959 | # standin until a commit. cmdutil.bailifchanged() raises an exception | |
954 | # if the repo has uncommitted changes. Wrap it to also check if |
|
960 | # if the repo has uncommitted changes. Wrap it to also check if | |
955 | # largefiles were changed. This is used by bisect, backout and fetch. |
|
961 | # largefiles were changed. This is used by bisect, backout and fetch. | |
956 | def overridebailifchanged(orig, repo): |
|
962 | def overridebailifchanged(orig, repo): | |
957 | orig(repo) |
|
963 | orig(repo) | |
958 | repo.lfstatus = True |
|
964 | repo.lfstatus = True | |
959 | s = repo.status() |
|
965 | s = repo.status() | |
960 | repo.lfstatus = False |
|
966 | repo.lfstatus = False | |
961 | if s.modified or s.added or s.removed or s.deleted: |
|
967 | if s.modified or s.added or s.removed or s.deleted: | |
962 | raise util.Abort(_('uncommitted changes')) |
|
968 | raise util.Abort(_('uncommitted changes')) | |
963 |
|
969 | |||
964 | def overrideforget(orig, ui, repo, *pats, **opts): |
|
970 | def overrideforget(orig, ui, repo, *pats, **opts): | |
965 | installnormalfilesmatchfn(repo[None].manifest()) |
|
971 | installnormalfilesmatchfn(repo[None].manifest()) | |
966 | result = orig(ui, repo, *pats, **opts) |
|
972 | result = orig(ui, repo, *pats, **opts) | |
967 | restorematchfn() |
|
973 | restorematchfn() | |
968 | m = composelargefilematcher(scmutil.match(repo[None], pats, opts), |
|
974 | m = composelargefilematcher(scmutil.match(repo[None], pats, opts), | |
969 | repo[None].manifest()) |
|
975 | repo[None].manifest()) | |
970 |
|
976 | |||
971 | try: |
|
977 | try: | |
972 | repo.lfstatus = True |
|
978 | repo.lfstatus = True | |
973 | s = repo.status(match=m, clean=True) |
|
979 | s = repo.status(match=m, clean=True) | |
974 | finally: |
|
980 | finally: | |
975 | repo.lfstatus = False |
|
981 | repo.lfstatus = False | |
976 | forget = sorted(s.modified + s.added + s.deleted + s.clean) |
|
982 | forget = sorted(s.modified + s.added + s.deleted + s.clean) | |
977 | forget = [f for f in forget if lfutil.standin(f) in repo[None].manifest()] |
|
983 | forget = [f for f in forget if lfutil.standin(f) in repo[None].manifest()] | |
978 |
|
984 | |||
979 | for f in forget: |
|
985 | for f in forget: | |
980 | if lfutil.standin(f) not in repo.dirstate and not \ |
|
986 | if lfutil.standin(f) not in repo.dirstate and not \ | |
981 | repo.wvfs.isdir(lfutil.standin(f)): |
|
987 | repo.wvfs.isdir(lfutil.standin(f)): | |
982 | ui.warn(_('not removing %s: file is already untracked\n') |
|
988 | ui.warn(_('not removing %s: file is already untracked\n') | |
983 | % m.rel(f)) |
|
989 | % m.rel(f)) | |
984 | result = 1 |
|
990 | result = 1 | |
985 |
|
991 | |||
986 | for f in forget: |
|
992 | for f in forget: | |
987 | if ui.verbose or not m.exact(f): |
|
993 | if ui.verbose or not m.exact(f): | |
988 | ui.status(_('removing %s\n') % m.rel(f)) |
|
994 | ui.status(_('removing %s\n') % m.rel(f)) | |
989 |
|
995 | |||
990 | # Need to lock because standin files are deleted then removed from the |
|
996 | # Need to lock because standin files are deleted then removed from the | |
991 | # repository and we could race in-between. |
|
997 | # repository and we could race in-between. | |
992 | wlock = repo.wlock() |
|
998 | wlock = repo.wlock() | |
993 | try: |
|
999 | try: | |
994 | lfdirstate = lfutil.openlfdirstate(ui, repo) |
|
1000 | lfdirstate = lfutil.openlfdirstate(ui, repo) | |
995 | for f in forget: |
|
1001 | for f in forget: | |
996 | if lfdirstate[f] == 'a': |
|
1002 | if lfdirstate[f] == 'a': | |
997 | lfdirstate.drop(f) |
|
1003 | lfdirstate.drop(f) | |
998 | else: |
|
1004 | else: | |
999 | lfdirstate.remove(f) |
|
1005 | lfdirstate.remove(f) | |
1000 | lfdirstate.write() |
|
1006 | lfdirstate.write() | |
1001 | standins = [lfutil.standin(f) for f in forget] |
|
1007 | standins = [lfutil.standin(f) for f in forget] | |
1002 | for f in standins: |
|
1008 | for f in standins: | |
1003 | util.unlinkpath(repo.wjoin(f), ignoremissing=True) |
|
1009 | util.unlinkpath(repo.wjoin(f), ignoremissing=True) | |
1004 | repo[None].forget(standins) |
|
1010 | repo[None].forget(standins) | |
1005 | finally: |
|
1011 | finally: | |
1006 | wlock.release() |
|
1012 | wlock.release() | |
1007 |
|
1013 | |||
1008 | return result |
|
1014 | return result | |
1009 |
|
1015 | |||
1010 | def _getoutgoings(repo, other, missing, addfunc): |
|
1016 | def _getoutgoings(repo, other, missing, addfunc): | |
1011 | """get pairs of filename and largefile hash in outgoing revisions |
|
1017 | """get pairs of filename and largefile hash in outgoing revisions | |
1012 | in 'missing'. |
|
1018 | in 'missing'. | |
1013 |
|
1019 | |||
1014 | largefiles already existing on 'other' repository are ignored. |
|
1020 | largefiles already existing on 'other' repository are ignored. | |
1015 |
|
1021 | |||
1016 | 'addfunc' is invoked with each unique pairs of filename and |
|
1022 | 'addfunc' is invoked with each unique pairs of filename and | |
1017 | largefile hash value. |
|
1023 | largefile hash value. | |
1018 | """ |
|
1024 | """ | |
1019 | knowns = set() |
|
1025 | knowns = set() | |
1020 | lfhashes = set() |
|
1026 | lfhashes = set() | |
1021 | def dedup(fn, lfhash): |
|
1027 | def dedup(fn, lfhash): | |
1022 | k = (fn, lfhash) |
|
1028 | k = (fn, lfhash) | |
1023 | if k not in knowns: |
|
1029 | if k not in knowns: | |
1024 | knowns.add(k) |
|
1030 | knowns.add(k) | |
1025 | lfhashes.add(lfhash) |
|
1031 | lfhashes.add(lfhash) | |
1026 | lfutil.getlfilestoupload(repo, missing, dedup) |
|
1032 | lfutil.getlfilestoupload(repo, missing, dedup) | |
1027 | if lfhashes: |
|
1033 | if lfhashes: | |
1028 | lfexists = basestore._openstore(repo, other).exists(lfhashes) |
|
1034 | lfexists = basestore._openstore(repo, other).exists(lfhashes) | |
1029 | for fn, lfhash in knowns: |
|
1035 | for fn, lfhash in knowns: | |
1030 | if not lfexists[lfhash]: # lfhash doesn't exist on "other" |
|
1036 | if not lfexists[lfhash]: # lfhash doesn't exist on "other" | |
1031 | addfunc(fn, lfhash) |
|
1037 | addfunc(fn, lfhash) | |
1032 |
|
1038 | |||
1033 | def outgoinghook(ui, repo, other, opts, missing): |
|
1039 | def outgoinghook(ui, repo, other, opts, missing): | |
1034 | if opts.pop('large', None): |
|
1040 | if opts.pop('large', None): | |
1035 | lfhashes = set() |
|
1041 | lfhashes = set() | |
1036 | if ui.debugflag: |
|
1042 | if ui.debugflag: | |
1037 | toupload = {} |
|
1043 | toupload = {} | |
1038 | def addfunc(fn, lfhash): |
|
1044 | def addfunc(fn, lfhash): | |
1039 | if fn not in toupload: |
|
1045 | if fn not in toupload: | |
1040 | toupload[fn] = [] |
|
1046 | toupload[fn] = [] | |
1041 | toupload[fn].append(lfhash) |
|
1047 | toupload[fn].append(lfhash) | |
1042 | lfhashes.add(lfhash) |
|
1048 | lfhashes.add(lfhash) | |
1043 | def showhashes(fn): |
|
1049 | def showhashes(fn): | |
1044 | for lfhash in sorted(toupload[fn]): |
|
1050 | for lfhash in sorted(toupload[fn]): | |
1045 | ui.debug(' %s\n' % (lfhash)) |
|
1051 | ui.debug(' %s\n' % (lfhash)) | |
1046 | else: |
|
1052 | else: | |
1047 | toupload = set() |
|
1053 | toupload = set() | |
1048 | def addfunc(fn, lfhash): |
|
1054 | def addfunc(fn, lfhash): | |
1049 | toupload.add(fn) |
|
1055 | toupload.add(fn) | |
1050 | lfhashes.add(lfhash) |
|
1056 | lfhashes.add(lfhash) | |
1051 | def showhashes(fn): |
|
1057 | def showhashes(fn): | |
1052 | pass |
|
1058 | pass | |
1053 | _getoutgoings(repo, other, missing, addfunc) |
|
1059 | _getoutgoings(repo, other, missing, addfunc) | |
1054 |
|
1060 | |||
1055 | if not toupload: |
|
1061 | if not toupload: | |
1056 | ui.status(_('largefiles: no files to upload\n')) |
|
1062 | ui.status(_('largefiles: no files to upload\n')) | |
1057 | else: |
|
1063 | else: | |
1058 | ui.status(_('largefiles to upload (%d entities):\n') |
|
1064 | ui.status(_('largefiles to upload (%d entities):\n') | |
1059 | % (len(lfhashes))) |
|
1065 | % (len(lfhashes))) | |
1060 | for file in sorted(toupload): |
|
1066 | for file in sorted(toupload): | |
1061 | ui.status(lfutil.splitstandin(file) + '\n') |
|
1067 | ui.status(lfutil.splitstandin(file) + '\n') | |
1062 | showhashes(file) |
|
1068 | showhashes(file) | |
1063 | ui.status('\n') |
|
1069 | ui.status('\n') | |
1064 |
|
1070 | |||
1065 | def summaryremotehook(ui, repo, opts, changes): |
|
1071 | def summaryremotehook(ui, repo, opts, changes): | |
1066 | largeopt = opts.get('large', False) |
|
1072 | largeopt = opts.get('large', False) | |
1067 | if changes is None: |
|
1073 | if changes is None: | |
1068 | if largeopt: |
|
1074 | if largeopt: | |
1069 | return (False, True) # only outgoing check is needed |
|
1075 | return (False, True) # only outgoing check is needed | |
1070 | else: |
|
1076 | else: | |
1071 | return (False, False) |
|
1077 | return (False, False) | |
1072 | elif largeopt: |
|
1078 | elif largeopt: | |
1073 | url, branch, peer, outgoing = changes[1] |
|
1079 | url, branch, peer, outgoing = changes[1] | |
1074 | if peer is None: |
|
1080 | if peer is None: | |
1075 | # i18n: column positioning for "hg summary" |
|
1081 | # i18n: column positioning for "hg summary" | |
1076 | ui.status(_('largefiles: (no remote repo)\n')) |
|
1082 | ui.status(_('largefiles: (no remote repo)\n')) | |
1077 | return |
|
1083 | return | |
1078 |
|
1084 | |||
1079 | toupload = set() |
|
1085 | toupload = set() | |
1080 | lfhashes = set() |
|
1086 | lfhashes = set() | |
1081 | def addfunc(fn, lfhash): |
|
1087 | def addfunc(fn, lfhash): | |
1082 | toupload.add(fn) |
|
1088 | toupload.add(fn) | |
1083 | lfhashes.add(lfhash) |
|
1089 | lfhashes.add(lfhash) | |
1084 | _getoutgoings(repo, peer, outgoing.missing, addfunc) |
|
1090 | _getoutgoings(repo, peer, outgoing.missing, addfunc) | |
1085 |
|
1091 | |||
1086 | if not toupload: |
|
1092 | if not toupload: | |
1087 | # i18n: column positioning for "hg summary" |
|
1093 | # i18n: column positioning for "hg summary" | |
1088 | ui.status(_('largefiles: (no files to upload)\n')) |
|
1094 | ui.status(_('largefiles: (no files to upload)\n')) | |
1089 | else: |
|
1095 | else: | |
1090 | # i18n: column positioning for "hg summary" |
|
1096 | # i18n: column positioning for "hg summary" | |
1091 | ui.status(_('largefiles: %d entities for %d files to upload\n') |
|
1097 | ui.status(_('largefiles: %d entities for %d files to upload\n') | |
1092 | % (len(lfhashes), len(toupload))) |
|
1098 | % (len(lfhashes), len(toupload))) | |
1093 |
|
1099 | |||
1094 | def overridesummary(orig, ui, repo, *pats, **opts): |
|
1100 | def overridesummary(orig, ui, repo, *pats, **opts): | |
1095 | try: |
|
1101 | try: | |
1096 | repo.lfstatus = True |
|
1102 | repo.lfstatus = True | |
1097 | orig(ui, repo, *pats, **opts) |
|
1103 | orig(ui, repo, *pats, **opts) | |
1098 | finally: |
|
1104 | finally: | |
1099 | repo.lfstatus = False |
|
1105 | repo.lfstatus = False | |
1100 |
|
1106 | |||
1101 | def scmutiladdremove(orig, repo, matcher, prefix, opts={}, dry_run=None, |
|
1107 | def scmutiladdremove(orig, repo, matcher, prefix, opts={}, dry_run=None, | |
1102 | similarity=None): |
|
1108 | similarity=None): | |
1103 | if not lfutil.islfilesrepo(repo): |
|
1109 | if not lfutil.islfilesrepo(repo): | |
1104 | return orig(repo, matcher, prefix, opts, dry_run, similarity) |
|
1110 | return orig(repo, matcher, prefix, opts, dry_run, similarity) | |
1105 | # Get the list of missing largefiles so we can remove them |
|
1111 | # Get the list of missing largefiles so we can remove them | |
1106 | lfdirstate = lfutil.openlfdirstate(repo.ui, repo) |
|
1112 | lfdirstate = lfutil.openlfdirstate(repo.ui, repo) | |
1107 | unsure, s = lfdirstate.status(match_.always(repo.root, repo.getcwd()), [], |
|
1113 | unsure, s = lfdirstate.status(match_.always(repo.root, repo.getcwd()), [], | |
1108 | False, False, False) |
|
1114 | False, False, False) | |
1109 |
|
1115 | |||
1110 | # Call into the normal remove code, but the removing of the standin, we want |
|
1116 | # Call into the normal remove code, but the removing of the standin, we want | |
1111 | # to have handled by original addremove. Monkey patching here makes sure |
|
1117 | # to have handled by original addremove. Monkey patching here makes sure | |
1112 | # we don't remove the standin in the largefiles code, preventing a very |
|
1118 | # we don't remove the standin in the largefiles code, preventing a very | |
1113 | # confused state later. |
|
1119 | # confused state later. | |
1114 | if s.deleted: |
|
1120 | if s.deleted: | |
1115 | m = copy.copy(matcher) |
|
1121 | m = copy.copy(matcher) | |
1116 |
|
1122 | |||
1117 | # The m._files and m._map attributes are not changed to the deleted list |
|
1123 | # The m._files and m._map attributes are not changed to the deleted list | |
1118 | # because that affects the m.exact() test, which in turn governs whether |
|
1124 | # because that affects the m.exact() test, which in turn governs whether | |
1119 | # or not the file name is printed, and how. Simply limit the original |
|
1125 | # or not the file name is printed, and how. Simply limit the original | |
1120 | # matches to those in the deleted status list. |
|
1126 | # matches to those in the deleted status list. | |
1121 | matchfn = m.matchfn |
|
1127 | matchfn = m.matchfn | |
1122 | m.matchfn = lambda f: f in s.deleted and matchfn(f) |
|
1128 | m.matchfn = lambda f: f in s.deleted and matchfn(f) | |
1123 |
|
1129 | |||
1124 | removelargefiles(repo.ui, repo, True, m, **opts) |
|
1130 | removelargefiles(repo.ui, repo, True, m, **opts) | |
1125 | # Call into the normal add code, and any files that *should* be added as |
|
1131 | # Call into the normal add code, and any files that *should* be added as | |
1126 | # largefiles will be |
|
1132 | # largefiles will be | |
1127 | addlargefiles(repo.ui, repo, matcher, **opts) |
|
1133 | addlargefiles(repo.ui, repo, True, matcher, **opts) | |
1128 | # Now that we've handled largefiles, hand off to the original addremove |
|
1134 | # Now that we've handled largefiles, hand off to the original addremove | |
1129 | # function to take care of the rest. Make sure it doesn't do anything with |
|
1135 | # function to take care of the rest. Make sure it doesn't do anything with | |
1130 | # largefiles by passing a matcher that will ignore them. |
|
1136 | # largefiles by passing a matcher that will ignore them. | |
1131 | matcher = composenormalfilematcher(matcher, repo[None].manifest()) |
|
1137 | matcher = composenormalfilematcher(matcher, repo[None].manifest()) | |
1132 | return orig(repo, matcher, prefix, opts, dry_run, similarity) |
|
1138 | return orig(repo, matcher, prefix, opts, dry_run, similarity) | |
1133 |
|
1139 | |||
1134 | # Calling purge with --all will cause the largefiles to be deleted. |
|
1140 | # Calling purge with --all will cause the largefiles to be deleted. | |
1135 | # Override repo.status to prevent this from happening. |
|
1141 | # Override repo.status to prevent this from happening. | |
1136 | def overridepurge(orig, ui, repo, *dirs, **opts): |
|
1142 | def overridepurge(orig, ui, repo, *dirs, **opts): | |
1137 | # XXX Monkey patching a repoview will not work. The assigned attribute will |
|
1143 | # XXX Monkey patching a repoview will not work. The assigned attribute will | |
1138 | # be set on the unfiltered repo, but we will only lookup attributes in the |
|
1144 | # be set on the unfiltered repo, but we will only lookup attributes in the | |
1139 | # unfiltered repo if the lookup in the repoview object itself fails. As the |
|
1145 | # unfiltered repo if the lookup in the repoview object itself fails. As the | |
1140 | # monkey patched method exists on the repoview class the lookup will not |
|
1146 | # monkey patched method exists on the repoview class the lookup will not | |
1141 | # fail. As a result, the original version will shadow the monkey patched |
|
1147 | # fail. As a result, the original version will shadow the monkey patched | |
1142 | # one, defeating the monkey patch. |
|
1148 | # one, defeating the monkey patch. | |
1143 | # |
|
1149 | # | |
1144 | # As a work around we use an unfiltered repo here. We should do something |
|
1150 | # As a work around we use an unfiltered repo here. We should do something | |
1145 | # cleaner instead. |
|
1151 | # cleaner instead. | |
1146 | repo = repo.unfiltered() |
|
1152 | repo = repo.unfiltered() | |
1147 | oldstatus = repo.status |
|
1153 | oldstatus = repo.status | |
1148 | def overridestatus(node1='.', node2=None, match=None, ignored=False, |
|
1154 | def overridestatus(node1='.', node2=None, match=None, ignored=False, | |
1149 | clean=False, unknown=False, listsubrepos=False): |
|
1155 | clean=False, unknown=False, listsubrepos=False): | |
1150 | r = oldstatus(node1, node2, match, ignored, clean, unknown, |
|
1156 | r = oldstatus(node1, node2, match, ignored, clean, unknown, | |
1151 | listsubrepos) |
|
1157 | listsubrepos) | |
1152 | lfdirstate = lfutil.openlfdirstate(ui, repo) |
|
1158 | lfdirstate = lfutil.openlfdirstate(ui, repo) | |
1153 | unknown = [f for f in r.unknown if lfdirstate[f] == '?'] |
|
1159 | unknown = [f for f in r.unknown if lfdirstate[f] == '?'] | |
1154 | ignored = [f for f in r.ignored if lfdirstate[f] == '?'] |
|
1160 | ignored = [f for f in r.ignored if lfdirstate[f] == '?'] | |
1155 | return scmutil.status(r.modified, r.added, r.removed, r.deleted, |
|
1161 | return scmutil.status(r.modified, r.added, r.removed, r.deleted, | |
1156 | unknown, ignored, r.clean) |
|
1162 | unknown, ignored, r.clean) | |
1157 | repo.status = overridestatus |
|
1163 | repo.status = overridestatus | |
1158 | orig(ui, repo, *dirs, **opts) |
|
1164 | orig(ui, repo, *dirs, **opts) | |
1159 | repo.status = oldstatus |
|
1165 | repo.status = oldstatus | |
1160 | def overriderollback(orig, ui, repo, **opts): |
|
1166 | def overriderollback(orig, ui, repo, **opts): | |
1161 | wlock = repo.wlock() |
|
1167 | wlock = repo.wlock() | |
1162 | try: |
|
1168 | try: | |
1163 | before = repo.dirstate.parents() |
|
1169 | before = repo.dirstate.parents() | |
1164 | orphans = set(f for f in repo.dirstate |
|
1170 | orphans = set(f for f in repo.dirstate | |
1165 | if lfutil.isstandin(f) and repo.dirstate[f] != 'r') |
|
1171 | if lfutil.isstandin(f) and repo.dirstate[f] != 'r') | |
1166 | result = orig(ui, repo, **opts) |
|
1172 | result = orig(ui, repo, **opts) | |
1167 | after = repo.dirstate.parents() |
|
1173 | after = repo.dirstate.parents() | |
1168 | if before == after: |
|
1174 | if before == after: | |
1169 | return result # no need to restore standins |
|
1175 | return result # no need to restore standins | |
1170 |
|
1176 | |||
1171 | pctx = repo['.'] |
|
1177 | pctx = repo['.'] | |
1172 | for f in repo.dirstate: |
|
1178 | for f in repo.dirstate: | |
1173 | if lfutil.isstandin(f): |
|
1179 | if lfutil.isstandin(f): | |
1174 | orphans.discard(f) |
|
1180 | orphans.discard(f) | |
1175 | if repo.dirstate[f] == 'r': |
|
1181 | if repo.dirstate[f] == 'r': | |
1176 | repo.wvfs.unlinkpath(f, ignoremissing=True) |
|
1182 | repo.wvfs.unlinkpath(f, ignoremissing=True) | |
1177 | elif f in pctx: |
|
1183 | elif f in pctx: | |
1178 | fctx = pctx[f] |
|
1184 | fctx = pctx[f] | |
1179 | repo.wwrite(f, fctx.data(), fctx.flags()) |
|
1185 | repo.wwrite(f, fctx.data(), fctx.flags()) | |
1180 | else: |
|
1186 | else: | |
1181 | # content of standin is not so important in 'a', |
|
1187 | # content of standin is not so important in 'a', | |
1182 | # 'm' or 'n' (coming from the 2nd parent) cases |
|
1188 | # 'm' or 'n' (coming from the 2nd parent) cases | |
1183 | lfutil.writestandin(repo, f, '', False) |
|
1189 | lfutil.writestandin(repo, f, '', False) | |
1184 | for standin in orphans: |
|
1190 | for standin in orphans: | |
1185 | repo.wvfs.unlinkpath(standin, ignoremissing=True) |
|
1191 | repo.wvfs.unlinkpath(standin, ignoremissing=True) | |
1186 |
|
1192 | |||
1187 | lfdirstate = lfutil.openlfdirstate(ui, repo) |
|
1193 | lfdirstate = lfutil.openlfdirstate(ui, repo) | |
1188 | orphans = set(lfdirstate) |
|
1194 | orphans = set(lfdirstate) | |
1189 | lfiles = lfutil.listlfiles(repo) |
|
1195 | lfiles = lfutil.listlfiles(repo) | |
1190 | for file in lfiles: |
|
1196 | for file in lfiles: | |
1191 | lfutil.synclfdirstate(repo, lfdirstate, file, True) |
|
1197 | lfutil.synclfdirstate(repo, lfdirstate, file, True) | |
1192 | orphans.discard(file) |
|
1198 | orphans.discard(file) | |
1193 | for lfile in orphans: |
|
1199 | for lfile in orphans: | |
1194 | lfdirstate.drop(lfile) |
|
1200 | lfdirstate.drop(lfile) | |
1195 | lfdirstate.write() |
|
1201 | lfdirstate.write() | |
1196 | finally: |
|
1202 | finally: | |
1197 | wlock.release() |
|
1203 | wlock.release() | |
1198 | return result |
|
1204 | return result | |
1199 |
|
1205 | |||
1200 | def overridetransplant(orig, ui, repo, *revs, **opts): |
|
1206 | def overridetransplant(orig, ui, repo, *revs, **opts): | |
1201 | resuming = opts.get('continue') |
|
1207 | resuming = opts.get('continue') | |
1202 | repo._lfcommithooks.append(lfutil.automatedcommithook(resuming)) |
|
1208 | repo._lfcommithooks.append(lfutil.automatedcommithook(resuming)) | |
1203 | repo._lfstatuswriters.append(lambda *msg, **opts: None) |
|
1209 | repo._lfstatuswriters.append(lambda *msg, **opts: None) | |
1204 | try: |
|
1210 | try: | |
1205 | result = orig(ui, repo, *revs, **opts) |
|
1211 | result = orig(ui, repo, *revs, **opts) | |
1206 | finally: |
|
1212 | finally: | |
1207 | repo._lfstatuswriters.pop() |
|
1213 | repo._lfstatuswriters.pop() | |
1208 | repo._lfcommithooks.pop() |
|
1214 | repo._lfcommithooks.pop() | |
1209 | return result |
|
1215 | return result | |
1210 |
|
1216 | |||
1211 | def overridecat(orig, ui, repo, file1, *pats, **opts): |
|
1217 | def overridecat(orig, ui, repo, file1, *pats, **opts): | |
1212 | ctx = scmutil.revsingle(repo, opts.get('rev')) |
|
1218 | ctx = scmutil.revsingle(repo, opts.get('rev')) | |
1213 | err = 1 |
|
1219 | err = 1 | |
1214 | notbad = set() |
|
1220 | notbad = set() | |
1215 | m = scmutil.match(ctx, (file1,) + pats, opts) |
|
1221 | m = scmutil.match(ctx, (file1,) + pats, opts) | |
1216 | origmatchfn = m.matchfn |
|
1222 | origmatchfn = m.matchfn | |
1217 | def lfmatchfn(f): |
|
1223 | def lfmatchfn(f): | |
1218 | if origmatchfn(f): |
|
1224 | if origmatchfn(f): | |
1219 | return True |
|
1225 | return True | |
1220 | lf = lfutil.splitstandin(f) |
|
1226 | lf = lfutil.splitstandin(f) | |
1221 | if lf is None: |
|
1227 | if lf is None: | |
1222 | return False |
|
1228 | return False | |
1223 | notbad.add(lf) |
|
1229 | notbad.add(lf) | |
1224 | return origmatchfn(lf) |
|
1230 | return origmatchfn(lf) | |
1225 | m.matchfn = lfmatchfn |
|
1231 | m.matchfn = lfmatchfn | |
1226 | origbadfn = m.bad |
|
1232 | origbadfn = m.bad | |
1227 | def lfbadfn(f, msg): |
|
1233 | def lfbadfn(f, msg): | |
1228 | if not f in notbad: |
|
1234 | if not f in notbad: | |
1229 | origbadfn(f, msg) |
|
1235 | origbadfn(f, msg) | |
1230 | m.bad = lfbadfn |
|
1236 | m.bad = lfbadfn | |
1231 | for f in ctx.walk(m): |
|
1237 | for f in ctx.walk(m): | |
1232 | fp = cmdutil.makefileobj(repo, opts.get('output'), ctx.node(), |
|
1238 | fp = cmdutil.makefileobj(repo, opts.get('output'), ctx.node(), | |
1233 | pathname=f) |
|
1239 | pathname=f) | |
1234 | lf = lfutil.splitstandin(f) |
|
1240 | lf = lfutil.splitstandin(f) | |
1235 | if lf is None or origmatchfn(f): |
|
1241 | if lf is None or origmatchfn(f): | |
1236 | # duplicating unreachable code from commands.cat |
|
1242 | # duplicating unreachable code from commands.cat | |
1237 | data = ctx[f].data() |
|
1243 | data = ctx[f].data() | |
1238 | if opts.get('decode'): |
|
1244 | if opts.get('decode'): | |
1239 | data = repo.wwritedata(f, data) |
|
1245 | data = repo.wwritedata(f, data) | |
1240 | fp.write(data) |
|
1246 | fp.write(data) | |
1241 | else: |
|
1247 | else: | |
1242 | hash = lfutil.readstandin(repo, lf, ctx.rev()) |
|
1248 | hash = lfutil.readstandin(repo, lf, ctx.rev()) | |
1243 | if not lfutil.inusercache(repo.ui, hash): |
|
1249 | if not lfutil.inusercache(repo.ui, hash): | |
1244 | store = basestore._openstore(repo) |
|
1250 | store = basestore._openstore(repo) | |
1245 | success, missing = store.get([(lf, hash)]) |
|
1251 | success, missing = store.get([(lf, hash)]) | |
1246 | if len(success) != 1: |
|
1252 | if len(success) != 1: | |
1247 | raise util.Abort( |
|
1253 | raise util.Abort( | |
1248 | _('largefile %s is not in cache and could not be ' |
|
1254 | _('largefile %s is not in cache and could not be ' | |
1249 | 'downloaded') % lf) |
|
1255 | 'downloaded') % lf) | |
1250 | path = lfutil.usercachepath(repo.ui, hash) |
|
1256 | path = lfutil.usercachepath(repo.ui, hash) | |
1251 | fpin = open(path, "rb") |
|
1257 | fpin = open(path, "rb") | |
1252 | for chunk in util.filechunkiter(fpin, 128 * 1024): |
|
1258 | for chunk in util.filechunkiter(fpin, 128 * 1024): | |
1253 | fp.write(chunk) |
|
1259 | fp.write(chunk) | |
1254 | fpin.close() |
|
1260 | fpin.close() | |
1255 | fp.close() |
|
1261 | fp.close() | |
1256 | err = 0 |
|
1262 | err = 0 | |
1257 | return err |
|
1263 | return err | |
1258 |
|
1264 | |||
1259 | def mergeupdate(orig, repo, node, branchmerge, force, partial, |
|
1265 | def mergeupdate(orig, repo, node, branchmerge, force, partial, | |
1260 | *args, **kwargs): |
|
1266 | *args, **kwargs): | |
1261 | wlock = repo.wlock() |
|
1267 | wlock = repo.wlock() | |
1262 | try: |
|
1268 | try: | |
1263 | # branch | | | |
|
1269 | # branch | | | | |
1264 | # merge | force | partial | action |
|
1270 | # merge | force | partial | action | |
1265 | # -------+-------+---------+-------------- |
|
1271 | # -------+-------+---------+-------------- | |
1266 | # x | x | x | linear-merge |
|
1272 | # x | x | x | linear-merge | |
1267 | # o | x | x | branch-merge |
|
1273 | # o | x | x | branch-merge | |
1268 | # x | o | x | overwrite (as clean update) |
|
1274 | # x | o | x | overwrite (as clean update) | |
1269 | # o | o | x | force-branch-merge (*1) |
|
1275 | # o | o | x | force-branch-merge (*1) | |
1270 | # x | x | o | (*) |
|
1276 | # x | x | o | (*) | |
1271 | # o | x | o | (*) |
|
1277 | # o | x | o | (*) | |
1272 | # x | o | o | overwrite (as revert) |
|
1278 | # x | o | o | overwrite (as revert) | |
1273 | # o | o | o | (*) |
|
1279 | # o | o | o | (*) | |
1274 | # |
|
1280 | # | |
1275 | # (*) don't care |
|
1281 | # (*) don't care | |
1276 | # (*1) deprecated, but used internally (e.g: "rebase --collapse") |
|
1282 | # (*1) deprecated, but used internally (e.g: "rebase --collapse") | |
1277 |
|
1283 | |||
1278 | linearmerge = not branchmerge and not force and not partial |
|
1284 | linearmerge = not branchmerge and not force and not partial | |
1279 |
|
1285 | |||
1280 | if linearmerge or (branchmerge and force and not partial): |
|
1286 | if linearmerge or (branchmerge and force and not partial): | |
1281 | # update standins for linear-merge or force-branch-merge, |
|
1287 | # update standins for linear-merge or force-branch-merge, | |
1282 | # because largefiles in the working directory may be modified |
|
1288 | # because largefiles in the working directory may be modified | |
1283 | lfdirstate = lfutil.openlfdirstate(repo.ui, repo) |
|
1289 | lfdirstate = lfutil.openlfdirstate(repo.ui, repo) | |
1284 | unsure, s = lfdirstate.status(match_.always(repo.root, |
|
1290 | unsure, s = lfdirstate.status(match_.always(repo.root, | |
1285 | repo.getcwd()), |
|
1291 | repo.getcwd()), | |
1286 | [], False, False, False) |
|
1292 | [], False, False, False) | |
1287 | for lfile in unsure + s.modified + s.added: |
|
1293 | for lfile in unsure + s.modified + s.added: | |
1288 | lfutil.updatestandin(repo, lfutil.standin(lfile)) |
|
1294 | lfutil.updatestandin(repo, lfutil.standin(lfile)) | |
1289 |
|
1295 | |||
1290 | if linearmerge: |
|
1296 | if linearmerge: | |
1291 | # Only call updatelfiles on the standins that have changed |
|
1297 | # Only call updatelfiles on the standins that have changed | |
1292 | # to save time |
|
1298 | # to save time | |
1293 | oldstandins = lfutil.getstandinsstate(repo) |
|
1299 | oldstandins = lfutil.getstandinsstate(repo) | |
1294 |
|
1300 | |||
1295 | result = orig(repo, node, branchmerge, force, partial, *args, **kwargs) |
|
1301 | result = orig(repo, node, branchmerge, force, partial, *args, **kwargs) | |
1296 |
|
1302 | |||
1297 | filelist = None |
|
1303 | filelist = None | |
1298 | if linearmerge: |
|
1304 | if linearmerge: | |
1299 | newstandins = lfutil.getstandinsstate(repo) |
|
1305 | newstandins = lfutil.getstandinsstate(repo) | |
1300 | filelist = lfutil.getlfilestoupdate(oldstandins, newstandins) |
|
1306 | filelist = lfutil.getlfilestoupdate(oldstandins, newstandins) | |
1301 |
|
1307 | |||
1302 | lfcommands.updatelfiles(repo.ui, repo, filelist=filelist, |
|
1308 | lfcommands.updatelfiles(repo.ui, repo, filelist=filelist, | |
1303 | normallookup=partial) |
|
1309 | normallookup=partial) | |
1304 |
|
1310 | |||
1305 | return result |
|
1311 | return result | |
1306 | finally: |
|
1312 | finally: | |
1307 | wlock.release() |
|
1313 | wlock.release() | |
1308 |
|
1314 | |||
1309 | def scmutilmarktouched(orig, repo, files, *args, **kwargs): |
|
1315 | def scmutilmarktouched(orig, repo, files, *args, **kwargs): | |
1310 | result = orig(repo, files, *args, **kwargs) |
|
1316 | result = orig(repo, files, *args, **kwargs) | |
1311 |
|
1317 | |||
1312 | filelist = [lfutil.splitstandin(f) for f in files if lfutil.isstandin(f)] |
|
1318 | filelist = [lfutil.splitstandin(f) for f in files if lfutil.isstandin(f)] | |
1313 | if filelist: |
|
1319 | if filelist: | |
1314 | lfcommands.updatelfiles(repo.ui, repo, filelist=filelist, |
|
1320 | lfcommands.updatelfiles(repo.ui, repo, filelist=filelist, | |
1315 | printmessage=False, normallookup=True) |
|
1321 | printmessage=False, normallookup=True) | |
1316 |
|
1322 | |||
1317 | return result |
|
1323 | return result |
@@ -1,930 +1,930 b'' | |||||
1 | This file contains testcases that tend to be related to special cases or less |
|
1 | This file contains testcases that tend to be related to special cases or less | |
2 | common commands affecting largefile. |
|
2 | common commands affecting largefile. | |
3 |
|
3 | |||
4 | Each sections should be independent of each others. |
|
4 | Each sections should be independent of each others. | |
5 |
|
5 | |||
6 | $ USERCACHE="$TESTTMP/cache"; export USERCACHE |
|
6 | $ USERCACHE="$TESTTMP/cache"; export USERCACHE | |
7 | $ mkdir "${USERCACHE}" |
|
7 | $ mkdir "${USERCACHE}" | |
8 | $ cat >> $HGRCPATH <<EOF |
|
8 | $ cat >> $HGRCPATH <<EOF | |
9 | > [extensions] |
|
9 | > [extensions] | |
10 | > largefiles= |
|
10 | > largefiles= | |
11 | > purge= |
|
11 | > purge= | |
12 | > rebase= |
|
12 | > rebase= | |
13 | > transplant= |
|
13 | > transplant= | |
14 | > [phases] |
|
14 | > [phases] | |
15 | > publish=False |
|
15 | > publish=False | |
16 | > [largefiles] |
|
16 | > [largefiles] | |
17 | > minsize=2 |
|
17 | > minsize=2 | |
18 | > patterns=glob:**.dat |
|
18 | > patterns=glob:**.dat | |
19 | > usercache=${USERCACHE} |
|
19 | > usercache=${USERCACHE} | |
20 | > [hooks] |
|
20 | > [hooks] | |
21 | > precommit=sh -c "echo \\"Invoking status precommit hook\\"; hg status" |
|
21 | > precommit=sh -c "echo \\"Invoking status precommit hook\\"; hg status" | |
22 | > EOF |
|
22 | > EOF | |
23 |
|
23 | |||
24 |
|
24 | |||
25 |
|
25 | |||
26 | Test copies and moves from a directory other than root (issue3516) |
|
26 | Test copies and moves from a directory other than root (issue3516) | |
27 | ========================================================================= |
|
27 | ========================================================================= | |
28 |
|
28 | |||
29 | $ hg init lf_cpmv |
|
29 | $ hg init lf_cpmv | |
30 | $ cd lf_cpmv |
|
30 | $ cd lf_cpmv | |
31 | $ mkdir dira |
|
31 | $ mkdir dira | |
32 | $ mkdir dira/dirb |
|
32 | $ mkdir dira/dirb | |
33 | $ touch dira/dirb/largefile |
|
33 | $ touch dira/dirb/largefile | |
34 | $ hg add --large dira/dirb/largefile |
|
34 | $ hg add --large dira/dirb/largefile | |
35 | $ hg commit -m "added" |
|
35 | $ hg commit -m "added" | |
36 | Invoking status precommit hook |
|
36 | Invoking status precommit hook | |
37 | A dira/dirb/largefile |
|
37 | A dira/dirb/largefile | |
38 | $ cd dira |
|
38 | $ cd dira | |
39 | $ hg cp dirb/largefile foo/largefile |
|
39 | $ hg cp dirb/largefile foo/largefile | |
40 | $ hg ci -m "deep copy" |
|
40 | $ hg ci -m "deep copy" | |
41 | Invoking status precommit hook |
|
41 | Invoking status precommit hook | |
42 | A dira/foo/largefile |
|
42 | A dira/foo/largefile | |
43 | $ find . | sort |
|
43 | $ find . | sort | |
44 | . |
|
44 | . | |
45 | ./dirb |
|
45 | ./dirb | |
46 | ./dirb/largefile |
|
46 | ./dirb/largefile | |
47 | ./foo |
|
47 | ./foo | |
48 | ./foo/largefile |
|
48 | ./foo/largefile | |
49 | $ hg mv foo/largefile baz/largefile |
|
49 | $ hg mv foo/largefile baz/largefile | |
50 | $ hg ci -m "moved" |
|
50 | $ hg ci -m "moved" | |
51 | Invoking status precommit hook |
|
51 | Invoking status precommit hook | |
52 | A dira/baz/largefile |
|
52 | A dira/baz/largefile | |
53 | R dira/foo/largefile |
|
53 | R dira/foo/largefile | |
54 | $ find . | sort |
|
54 | $ find . | sort | |
55 | . |
|
55 | . | |
56 | ./baz |
|
56 | ./baz | |
57 | ./baz/largefile |
|
57 | ./baz/largefile | |
58 | ./dirb |
|
58 | ./dirb | |
59 | ./dirb/largefile |
|
59 | ./dirb/largefile | |
60 | $ cd .. |
|
60 | $ cd .. | |
61 | $ hg mv dira dirc |
|
61 | $ hg mv dira dirc | |
62 | moving .hglf/dira/baz/largefile to .hglf/dirc/baz/largefile (glob) |
|
62 | moving .hglf/dira/baz/largefile to .hglf/dirc/baz/largefile (glob) | |
63 | moving .hglf/dira/dirb/largefile to .hglf/dirc/dirb/largefile (glob) |
|
63 | moving .hglf/dira/dirb/largefile to .hglf/dirc/dirb/largefile (glob) | |
64 | $ find * | sort |
|
64 | $ find * | sort | |
65 | dirc |
|
65 | dirc | |
66 | dirc/baz |
|
66 | dirc/baz | |
67 | dirc/baz/largefile |
|
67 | dirc/baz/largefile | |
68 | dirc/dirb |
|
68 | dirc/dirb | |
69 | dirc/dirb/largefile |
|
69 | dirc/dirb/largefile | |
70 |
|
70 | |||
71 | $ hg clone -q . ../fetch |
|
71 | $ hg clone -q . ../fetch | |
72 | $ hg --config extensions.fetch= fetch ../fetch |
|
72 | $ hg --config extensions.fetch= fetch ../fetch | |
73 | abort: uncommitted changes |
|
73 | abort: uncommitted changes | |
74 | [255] |
|
74 | [255] | |
75 | $ hg up -qC |
|
75 | $ hg up -qC | |
76 | $ cd .. |
|
76 | $ cd .. | |
77 |
|
77 | |||
78 | Clone a local repository owned by another user |
|
78 | Clone a local repository owned by another user | |
79 | =================================================== |
|
79 | =================================================== | |
80 |
|
80 | |||
81 | #if unix-permissions |
|
81 | #if unix-permissions | |
82 |
|
82 | |||
83 | We have to simulate that here by setting $HOME and removing write permissions |
|
83 | We have to simulate that here by setting $HOME and removing write permissions | |
84 | $ ORIGHOME="$HOME" |
|
84 | $ ORIGHOME="$HOME" | |
85 | $ mkdir alice |
|
85 | $ mkdir alice | |
86 | $ HOME="`pwd`/alice" |
|
86 | $ HOME="`pwd`/alice" | |
87 | $ cd alice |
|
87 | $ cd alice | |
88 | $ hg init pubrepo |
|
88 | $ hg init pubrepo | |
89 | $ cd pubrepo |
|
89 | $ cd pubrepo | |
90 | $ dd if=/dev/zero bs=1k count=11k > a-large-file 2> /dev/null |
|
90 | $ dd if=/dev/zero bs=1k count=11k > a-large-file 2> /dev/null | |
91 | $ hg add --large a-large-file |
|
91 | $ hg add --large a-large-file | |
92 | $ hg commit -m "Add a large file" |
|
92 | $ hg commit -m "Add a large file" | |
93 | Invoking status precommit hook |
|
93 | Invoking status precommit hook | |
94 | A a-large-file |
|
94 | A a-large-file | |
95 | $ cd .. |
|
95 | $ cd .. | |
96 | $ chmod -R a-w pubrepo |
|
96 | $ chmod -R a-w pubrepo | |
97 | $ cd .. |
|
97 | $ cd .. | |
98 | $ mkdir bob |
|
98 | $ mkdir bob | |
99 | $ HOME="`pwd`/bob" |
|
99 | $ HOME="`pwd`/bob" | |
100 | $ cd bob |
|
100 | $ cd bob | |
101 | $ hg clone --pull ../alice/pubrepo pubrepo |
|
101 | $ hg clone --pull ../alice/pubrepo pubrepo | |
102 | requesting all changes |
|
102 | requesting all changes | |
103 | adding changesets |
|
103 | adding changesets | |
104 | adding manifests |
|
104 | adding manifests | |
105 | adding file changes |
|
105 | adding file changes | |
106 | added 1 changesets with 1 changes to 1 files |
|
106 | added 1 changesets with 1 changes to 1 files | |
107 | updating to branch default |
|
107 | updating to branch default | |
108 | getting changed largefiles |
|
108 | getting changed largefiles | |
109 | 1 largefiles updated, 0 removed |
|
109 | 1 largefiles updated, 0 removed | |
110 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
110 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
111 | $ cd .. |
|
111 | $ cd .. | |
112 | $ chmod -R u+w alice/pubrepo |
|
112 | $ chmod -R u+w alice/pubrepo | |
113 | $ HOME="$ORIGHOME" |
|
113 | $ HOME="$ORIGHOME" | |
114 |
|
114 | |||
115 | #endif |
|
115 | #endif | |
116 |
|
116 | |||
117 |
|
117 | |||
118 | Symlink to a large largefile should behave the same as a symlink to a normal file |
|
118 | Symlink to a large largefile should behave the same as a symlink to a normal file | |
119 | ===================================================================================== |
|
119 | ===================================================================================== | |
120 |
|
120 | |||
121 | #if symlink |
|
121 | #if symlink | |
122 |
|
122 | |||
123 | $ hg init largesymlink |
|
123 | $ hg init largesymlink | |
124 | $ cd largesymlink |
|
124 | $ cd largesymlink | |
125 | $ dd if=/dev/zero bs=1k count=10k of=largefile 2>/dev/null |
|
125 | $ dd if=/dev/zero bs=1k count=10k of=largefile 2>/dev/null | |
126 | $ hg add --large largefile |
|
126 | $ hg add --large largefile | |
127 | $ hg commit -m "commit a large file" |
|
127 | $ hg commit -m "commit a large file" | |
128 | Invoking status precommit hook |
|
128 | Invoking status precommit hook | |
129 | A largefile |
|
129 | A largefile | |
130 | $ ln -s largefile largelink |
|
130 | $ ln -s largefile largelink | |
131 | $ hg add largelink |
|
131 | $ hg add largelink | |
132 | $ hg commit -m "commit a large symlink" |
|
132 | $ hg commit -m "commit a large symlink" | |
133 | Invoking status precommit hook |
|
133 | Invoking status precommit hook | |
134 | A largelink |
|
134 | A largelink | |
135 | $ rm -f largelink |
|
135 | $ rm -f largelink | |
136 | $ hg up >/dev/null |
|
136 | $ hg up >/dev/null | |
137 | $ test -f largelink |
|
137 | $ test -f largelink | |
138 | [1] |
|
138 | [1] | |
139 | $ test -L largelink |
|
139 | $ test -L largelink | |
140 | [1] |
|
140 | [1] | |
141 | $ rm -f largelink # make next part of the test independent of the previous |
|
141 | $ rm -f largelink # make next part of the test independent of the previous | |
142 | $ hg up -C >/dev/null |
|
142 | $ hg up -C >/dev/null | |
143 | $ test -f largelink |
|
143 | $ test -f largelink | |
144 | $ test -L largelink |
|
144 | $ test -L largelink | |
145 | $ cd .. |
|
145 | $ cd .. | |
146 |
|
146 | |||
147 | #endif |
|
147 | #endif | |
148 |
|
148 | |||
149 |
|
149 | |||
150 | test for pattern matching on 'hg status': |
|
150 | test for pattern matching on 'hg status': | |
151 | ============================================== |
|
151 | ============================================== | |
152 |
|
152 | |||
153 |
|
153 | |||
154 | to boost performance, largefiles checks whether specified patterns are |
|
154 | to boost performance, largefiles checks whether specified patterns are | |
155 | related to largefiles in working directory (NOT to STANDIN) or not. |
|
155 | related to largefiles in working directory (NOT to STANDIN) or not. | |
156 |
|
156 | |||
157 | $ hg init statusmatch |
|
157 | $ hg init statusmatch | |
158 | $ cd statusmatch |
|
158 | $ cd statusmatch | |
159 |
|
159 | |||
160 | $ mkdir -p a/b/c/d |
|
160 | $ mkdir -p a/b/c/d | |
161 | $ echo normal > a/b/c/d/e.normal.txt |
|
161 | $ echo normal > a/b/c/d/e.normal.txt | |
162 | $ hg add a/b/c/d/e.normal.txt |
|
162 | $ hg add a/b/c/d/e.normal.txt | |
163 | $ echo large > a/b/c/d/e.large.txt |
|
163 | $ echo large > a/b/c/d/e.large.txt | |
164 | $ hg add --large a/b/c/d/e.large.txt |
|
164 | $ hg add --large a/b/c/d/e.large.txt | |
165 | $ mkdir -p a/b/c/x |
|
165 | $ mkdir -p a/b/c/x | |
166 | $ echo normal > a/b/c/x/y.normal.txt |
|
166 | $ echo normal > a/b/c/x/y.normal.txt | |
167 | $ hg add a/b/c/x/y.normal.txt |
|
167 | $ hg add a/b/c/x/y.normal.txt | |
168 | $ hg commit -m 'add files' |
|
168 | $ hg commit -m 'add files' | |
169 | Invoking status precommit hook |
|
169 | Invoking status precommit hook | |
170 | A a/b/c/d/e.large.txt |
|
170 | A a/b/c/d/e.large.txt | |
171 | A a/b/c/d/e.normal.txt |
|
171 | A a/b/c/d/e.normal.txt | |
172 | A a/b/c/x/y.normal.txt |
|
172 | A a/b/c/x/y.normal.txt | |
173 |
|
173 | |||
174 | (1) no pattern: no performance boost |
|
174 | (1) no pattern: no performance boost | |
175 | $ hg status -A |
|
175 | $ hg status -A | |
176 | C a/b/c/d/e.large.txt |
|
176 | C a/b/c/d/e.large.txt | |
177 | C a/b/c/d/e.normal.txt |
|
177 | C a/b/c/d/e.normal.txt | |
178 | C a/b/c/x/y.normal.txt |
|
178 | C a/b/c/x/y.normal.txt | |
179 |
|
179 | |||
180 | (2) pattern not related to largefiles: performance boost |
|
180 | (2) pattern not related to largefiles: performance boost | |
181 | $ hg status -A a/b/c/x |
|
181 | $ hg status -A a/b/c/x | |
182 | C a/b/c/x/y.normal.txt |
|
182 | C a/b/c/x/y.normal.txt | |
183 |
|
183 | |||
184 | (3) pattern related to largefiles: no performance boost |
|
184 | (3) pattern related to largefiles: no performance boost | |
185 | $ hg status -A a/b/c/d |
|
185 | $ hg status -A a/b/c/d | |
186 | C a/b/c/d/e.large.txt |
|
186 | C a/b/c/d/e.large.txt | |
187 | C a/b/c/d/e.normal.txt |
|
187 | C a/b/c/d/e.normal.txt | |
188 |
|
188 | |||
189 | (4) pattern related to STANDIN (not to largefiles): performance boost |
|
189 | (4) pattern related to STANDIN (not to largefiles): performance boost | |
190 | $ hg status -A .hglf/a |
|
190 | $ hg status -A .hglf/a | |
191 | C .hglf/a/b/c/d/e.large.txt |
|
191 | C .hglf/a/b/c/d/e.large.txt | |
192 |
|
192 | |||
193 | (5) mixed case: no performance boost |
|
193 | (5) mixed case: no performance boost | |
194 | $ hg status -A a/b/c/x a/b/c/d |
|
194 | $ hg status -A a/b/c/x a/b/c/d | |
195 | C a/b/c/d/e.large.txt |
|
195 | C a/b/c/d/e.large.txt | |
196 | C a/b/c/d/e.normal.txt |
|
196 | C a/b/c/d/e.normal.txt | |
197 | C a/b/c/x/y.normal.txt |
|
197 | C a/b/c/x/y.normal.txt | |
198 |
|
198 | |||
199 | verify that largefiles doesn't break filesets |
|
199 | verify that largefiles doesn't break filesets | |
200 |
|
200 | |||
201 | $ hg log --rev . --exclude "set:binary()" |
|
201 | $ hg log --rev . --exclude "set:binary()" | |
202 | changeset: 0:41bd42f10efa |
|
202 | changeset: 0:41bd42f10efa | |
203 | tag: tip |
|
203 | tag: tip | |
204 | user: test |
|
204 | user: test | |
205 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
205 | date: Thu Jan 01 00:00:00 1970 +0000 | |
206 | summary: add files |
|
206 | summary: add files | |
207 |
|
207 | |||
208 | verify that large files in subrepos handled properly |
|
208 | verify that large files in subrepos handled properly | |
209 | $ hg init subrepo |
|
209 | $ hg init subrepo | |
210 | $ echo "subrepo = subrepo" > .hgsub |
|
210 | $ echo "subrepo = subrepo" > .hgsub | |
211 | $ hg add .hgsub |
|
211 | $ hg add .hgsub | |
212 | $ hg ci -m "add subrepo" |
|
212 | $ hg ci -m "add subrepo" | |
213 | Invoking status precommit hook |
|
213 | Invoking status precommit hook | |
214 | A .hgsub |
|
214 | A .hgsub | |
215 | ? .hgsubstate |
|
215 | ? .hgsubstate | |
216 | $ echo "rev 1" > subrepo/large.txt |
|
216 | $ echo "rev 1" > subrepo/large.txt | |
217 | $ hg -R subrepo add --large subrepo/large.txt |
|
217 | $ hg -R subrepo add --large subrepo/large.txt | |
218 | $ hg sum |
|
218 | $ hg sum | |
219 | parent: 1:8ee150ea2e9c tip |
|
219 | parent: 1:8ee150ea2e9c tip | |
220 | add subrepo |
|
220 | add subrepo | |
221 | branch: default |
|
221 | branch: default | |
222 | commit: 1 subrepos |
|
222 | commit: 1 subrepos | |
223 | update: (current) |
|
223 | update: (current) | |
224 | $ hg st |
|
224 | $ hg st | |
225 | $ hg st -S |
|
225 | $ hg st -S | |
226 | A subrepo/large.txt |
|
226 | A subrepo/large.txt | |
227 | $ hg ci -S -m "commit top repo" |
|
227 | $ hg ci -S -m "commit top repo" | |
228 | committing subrepository subrepo |
|
228 | committing subrepository subrepo | |
229 | Invoking status precommit hook |
|
229 | Invoking status precommit hook | |
230 | A large.txt |
|
230 | A large.txt | |
231 | Invoking status precommit hook |
|
231 | Invoking status precommit hook | |
232 | M .hgsubstate |
|
232 | M .hgsubstate | |
233 | # No differences |
|
233 | # No differences | |
234 | $ hg st -S |
|
234 | $ hg st -S | |
235 | $ hg sum |
|
235 | $ hg sum | |
236 | parent: 2:ce4cd0c527a6 tip |
|
236 | parent: 2:ce4cd0c527a6 tip | |
237 | commit top repo |
|
237 | commit top repo | |
238 | branch: default |
|
238 | branch: default | |
239 | commit: (clean) |
|
239 | commit: (clean) | |
240 | update: (current) |
|
240 | update: (current) | |
241 | $ echo "rev 2" > subrepo/large.txt |
|
241 | $ echo "rev 2" > subrepo/large.txt | |
242 | $ hg st -S |
|
242 | $ hg st -S | |
243 | M subrepo/large.txt |
|
243 | M subrepo/large.txt | |
244 | $ hg sum |
|
244 | $ hg sum | |
245 | parent: 2:ce4cd0c527a6 tip |
|
245 | parent: 2:ce4cd0c527a6 tip | |
246 | commit top repo |
|
246 | commit top repo | |
247 | branch: default |
|
247 | branch: default | |
248 | commit: 1 subrepos |
|
248 | commit: 1 subrepos | |
249 | update: (current) |
|
249 | update: (current) | |
250 | $ hg ci -m "this commit should fail without -S" |
|
250 | $ hg ci -m "this commit should fail without -S" | |
251 | abort: uncommitted changes in subrepo subrepo |
|
251 | abort: uncommitted changes in subrepo subrepo | |
252 | (use --subrepos for recursive commit) |
|
252 | (use --subrepos for recursive commit) | |
253 | [255] |
|
253 | [255] | |
254 |
|
254 | |||
255 | Add a normal file to the subrepo, then test archiving |
|
255 | Add a normal file to the subrepo, then test archiving | |
256 |
|
256 | |||
257 | $ echo 'normal file' > subrepo/normal.txt |
|
257 | $ echo 'normal file' > subrepo/normal.txt | |
258 | $ touch large.dat |
|
258 | $ touch large.dat | |
259 | $ mv subrepo/large.txt subrepo/renamed-large.txt |
|
259 | $ mv subrepo/large.txt subrepo/renamed-large.txt | |
260 | $ hg addremove -S --dry-run |
|
260 | $ hg addremove -S --dry-run | |
261 | adding large.dat as a largefile |
|
261 | adding large.dat as a largefile | |
262 | removing subrepo/large.txt |
|
262 | removing subrepo/large.txt | |
263 | adding subrepo/normal.txt |
|
263 | adding subrepo/normal.txt | |
264 | adding subrepo/renamed-large.txt |
|
264 | adding subrepo/renamed-large.txt | |
265 | adding large.dat |
|
265 | adding large.dat | |
266 | $ hg status -S |
|
266 | $ hg status -S | |
267 | ! subrepo/large.txt |
|
267 | ! subrepo/large.txt | |
268 | ? large.dat |
|
268 | ? large.dat | |
269 | ? subrepo/normal.txt |
|
269 | ? subrepo/normal.txt | |
270 | ? subrepo/renamed-large.txt |
|
270 | ? subrepo/renamed-large.txt | |
271 |
|
271 | |||
272 | $ hg addremove --dry-run subrepo |
|
272 | $ hg addremove --dry-run subrepo | |
273 | removing subrepo/large.txt (glob) |
|
273 | removing subrepo/large.txt (glob) | |
274 | adding subrepo/normal.txt (glob) |
|
274 | adding subrepo/normal.txt (glob) | |
275 | adding subrepo/renamed-large.txt (glob) |
|
275 | adding subrepo/renamed-large.txt (glob) | |
276 | $ hg status -S |
|
276 | $ hg status -S | |
277 | ! subrepo/large.txt |
|
277 | ! subrepo/large.txt | |
278 | ? large.dat |
|
278 | ? large.dat | |
279 | ? subrepo/normal.txt |
|
279 | ? subrepo/normal.txt | |
280 | ? subrepo/renamed-large.txt |
|
280 | ? subrepo/renamed-large.txt | |
281 | $ cd .. |
|
281 | $ cd .. | |
282 |
|
282 | |||
283 | $ hg -R statusmatch addremove --dry-run statusmatch/subrepo |
|
283 | $ hg -R statusmatch addremove --dry-run statusmatch/subrepo | |
284 | removing statusmatch/subrepo/large.txt (glob) |
|
284 | removing statusmatch/subrepo/large.txt (glob) | |
285 | adding statusmatch/subrepo/normal.txt (glob) |
|
285 | adding statusmatch/subrepo/normal.txt (glob) | |
286 | adding statusmatch/subrepo/renamed-large.txt (glob) |
|
286 | adding statusmatch/subrepo/renamed-large.txt (glob) | |
287 | $ hg -R statusmatch status -S |
|
287 | $ hg -R statusmatch status -S | |
288 | ! subrepo/large.txt |
|
288 | ! subrepo/large.txt | |
289 | ? large.dat |
|
289 | ? large.dat | |
290 | ? subrepo/normal.txt |
|
290 | ? subrepo/normal.txt | |
291 | ? subrepo/renamed-large.txt |
|
291 | ? subrepo/renamed-large.txt | |
292 |
|
292 | |||
293 | $ hg -R statusmatch addremove --dry-run -S |
|
293 | $ hg -R statusmatch addremove --dry-run -S | |
294 |
adding |
|
294 | adding large.dat as a largefile | |
295 | removing subrepo/large.txt |
|
295 | removing subrepo/large.txt | |
296 | adding subrepo/normal.txt |
|
296 | adding subrepo/normal.txt | |
297 | adding subrepo/renamed-large.txt |
|
297 | adding subrepo/renamed-large.txt | |
298 | adding large.dat |
|
298 | adding large.dat | |
299 | $ cd statusmatch |
|
299 | $ cd statusmatch | |
300 |
|
300 | |||
301 | $ mv subrepo/renamed-large.txt subrepo/large.txt |
|
301 | $ mv subrepo/renamed-large.txt subrepo/large.txt | |
302 | $ hg addremove subrepo |
|
302 | $ hg addremove subrepo | |
303 | adding subrepo/normal.txt (glob) |
|
303 | adding subrepo/normal.txt (glob) | |
304 | $ hg forget subrepo/normal.txt |
|
304 | $ hg forget subrepo/normal.txt | |
305 |
|
305 | |||
306 | $ hg addremove -S |
|
306 | $ hg addremove -S | |
307 | adding large.dat as a largefile |
|
307 | adding large.dat as a largefile | |
308 | adding subrepo/normal.txt |
|
308 | adding subrepo/normal.txt | |
309 | $ rm large.dat |
|
309 | $ rm large.dat | |
310 |
|
310 | |||
311 | $ hg addremove subrepo |
|
311 | $ hg addremove subrepo | |
312 | $ hg addremove -S |
|
312 | $ hg addremove -S | |
313 | removing large.dat |
|
313 | removing large.dat | |
314 |
|
314 | |||
315 | Lock in subrepo, otherwise the change isn't archived |
|
315 | Lock in subrepo, otherwise the change isn't archived | |
316 |
|
316 | |||
317 | $ hg ci -S -m "add normal file to top level" |
|
317 | $ hg ci -S -m "add normal file to top level" | |
318 | committing subrepository subrepo |
|
318 | committing subrepository subrepo | |
319 | Invoking status precommit hook |
|
319 | Invoking status precommit hook | |
320 | M large.txt |
|
320 | M large.txt | |
321 | A normal.txt |
|
321 | A normal.txt | |
322 | Invoking status precommit hook |
|
322 | Invoking status precommit hook | |
323 | M .hgsubstate |
|
323 | M .hgsubstate | |
324 | $ hg archive -S ../lf_subrepo_archive |
|
324 | $ hg archive -S ../lf_subrepo_archive | |
325 | $ find ../lf_subrepo_archive | sort |
|
325 | $ find ../lf_subrepo_archive | sort | |
326 | ../lf_subrepo_archive |
|
326 | ../lf_subrepo_archive | |
327 | ../lf_subrepo_archive/.hg_archival.txt |
|
327 | ../lf_subrepo_archive/.hg_archival.txt | |
328 | ../lf_subrepo_archive/.hgsub |
|
328 | ../lf_subrepo_archive/.hgsub | |
329 | ../lf_subrepo_archive/.hgsubstate |
|
329 | ../lf_subrepo_archive/.hgsubstate | |
330 | ../lf_subrepo_archive/a |
|
330 | ../lf_subrepo_archive/a | |
331 | ../lf_subrepo_archive/a/b |
|
331 | ../lf_subrepo_archive/a/b | |
332 | ../lf_subrepo_archive/a/b/c |
|
332 | ../lf_subrepo_archive/a/b/c | |
333 | ../lf_subrepo_archive/a/b/c/d |
|
333 | ../lf_subrepo_archive/a/b/c/d | |
334 | ../lf_subrepo_archive/a/b/c/d/e.large.txt |
|
334 | ../lf_subrepo_archive/a/b/c/d/e.large.txt | |
335 | ../lf_subrepo_archive/a/b/c/d/e.normal.txt |
|
335 | ../lf_subrepo_archive/a/b/c/d/e.normal.txt | |
336 | ../lf_subrepo_archive/a/b/c/x |
|
336 | ../lf_subrepo_archive/a/b/c/x | |
337 | ../lf_subrepo_archive/a/b/c/x/y.normal.txt |
|
337 | ../lf_subrepo_archive/a/b/c/x/y.normal.txt | |
338 | ../lf_subrepo_archive/subrepo |
|
338 | ../lf_subrepo_archive/subrepo | |
339 | ../lf_subrepo_archive/subrepo/large.txt |
|
339 | ../lf_subrepo_archive/subrepo/large.txt | |
340 | ../lf_subrepo_archive/subrepo/normal.txt |
|
340 | ../lf_subrepo_archive/subrepo/normal.txt | |
341 |
|
341 | |||
342 | Test update with subrepos. |
|
342 | Test update with subrepos. | |
343 |
|
343 | |||
344 | $ hg update 0 |
|
344 | $ hg update 0 | |
345 | getting changed largefiles |
|
345 | getting changed largefiles | |
346 | 0 largefiles updated, 1 removed |
|
346 | 0 largefiles updated, 1 removed | |
347 | 0 files updated, 0 files merged, 2 files removed, 0 files unresolved |
|
347 | 0 files updated, 0 files merged, 2 files removed, 0 files unresolved | |
348 | $ hg status -S |
|
348 | $ hg status -S | |
349 | $ hg update tip |
|
349 | $ hg update tip | |
350 | getting changed largefiles |
|
350 | getting changed largefiles | |
351 | 1 largefiles updated, 0 removed |
|
351 | 1 largefiles updated, 0 removed | |
352 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
352 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
353 | $ hg status -S |
|
353 | $ hg status -S | |
354 | # modify a large file |
|
354 | # modify a large file | |
355 | $ echo "modified" > subrepo/large.txt |
|
355 | $ echo "modified" > subrepo/large.txt | |
356 | $ hg st -S |
|
356 | $ hg st -S | |
357 | M subrepo/large.txt |
|
357 | M subrepo/large.txt | |
358 | # update -C should revert the change. |
|
358 | # update -C should revert the change. | |
359 | $ hg update -C |
|
359 | $ hg update -C | |
360 | getting changed largefiles |
|
360 | getting changed largefiles | |
361 | 1 largefiles updated, 0 removed |
|
361 | 1 largefiles updated, 0 removed | |
362 | getting changed largefiles |
|
362 | getting changed largefiles | |
363 | 0 largefiles updated, 0 removed |
|
363 | 0 largefiles updated, 0 removed | |
364 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
364 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
365 | $ hg status -S |
|
365 | $ hg status -S | |
366 |
|
366 | |||
367 | $ rm subrepo/large.txt |
|
367 | $ rm subrepo/large.txt | |
368 | $ hg addremove -S |
|
368 | $ hg addremove -S | |
369 | removing subrepo/large.txt |
|
369 | removing subrepo/large.txt | |
370 | $ hg st -S |
|
370 | $ hg st -S | |
371 | R subrepo/large.txt |
|
371 | R subrepo/large.txt | |
372 |
|
372 | |||
373 | Test archiving a revision that references a subrepo that is not yet |
|
373 | Test archiving a revision that references a subrepo that is not yet | |
374 | cloned (see test-subrepo-recursion.t): |
|
374 | cloned (see test-subrepo-recursion.t): | |
375 |
|
375 | |||
376 | $ hg clone -U . ../empty |
|
376 | $ hg clone -U . ../empty | |
377 | $ cd ../empty |
|
377 | $ cd ../empty | |
378 | $ hg archive --subrepos -r tip ../archive.tar.gz |
|
378 | $ hg archive --subrepos -r tip ../archive.tar.gz | |
379 | cloning subrepo subrepo from $TESTTMP/statusmatch/subrepo |
|
379 | cloning subrepo subrepo from $TESTTMP/statusmatch/subrepo | |
380 | $ cd .. |
|
380 | $ cd .. | |
381 |
|
381 | |||
382 |
|
382 | |||
383 |
|
383 | |||
384 |
|
384 | |||
385 |
|
385 | |||
386 |
|
386 | |||
387 | Test addremove, forget and others |
|
387 | Test addremove, forget and others | |
388 | ============================================== |
|
388 | ============================================== | |
389 |
|
389 | |||
390 | Test that addremove picks up largefiles prior to the initial commit (issue3541) |
|
390 | Test that addremove picks up largefiles prior to the initial commit (issue3541) | |
391 |
|
391 | |||
392 | $ hg init addrm2 |
|
392 | $ hg init addrm2 | |
393 | $ cd addrm2 |
|
393 | $ cd addrm2 | |
394 | $ touch large.dat |
|
394 | $ touch large.dat | |
395 | $ touch large2.dat |
|
395 | $ touch large2.dat | |
396 | $ touch normal |
|
396 | $ touch normal | |
397 | $ hg add --large large.dat |
|
397 | $ hg add --large large.dat | |
398 | $ hg addremove -v |
|
398 | $ hg addremove -v | |
399 | adding large2.dat as a largefile |
|
399 | adding large2.dat as a largefile | |
400 | adding normal |
|
400 | adding normal | |
401 |
|
401 | |||
402 | Test that forgetting all largefiles reverts to islfilesrepo() == False |
|
402 | Test that forgetting all largefiles reverts to islfilesrepo() == False | |
403 | (addremove will add *.dat as normal files now) |
|
403 | (addremove will add *.dat as normal files now) | |
404 | $ hg forget large.dat |
|
404 | $ hg forget large.dat | |
405 | $ hg forget large2.dat |
|
405 | $ hg forget large2.dat | |
406 | $ hg addremove -v |
|
406 | $ hg addremove -v | |
407 | adding large.dat |
|
407 | adding large.dat | |
408 | adding large2.dat |
|
408 | adding large2.dat | |
409 |
|
409 | |||
410 | Test commit's addremove option prior to the first commit |
|
410 | Test commit's addremove option prior to the first commit | |
411 | $ hg forget large.dat |
|
411 | $ hg forget large.dat | |
412 | $ hg forget large2.dat |
|
412 | $ hg forget large2.dat | |
413 | $ hg add --large large.dat |
|
413 | $ hg add --large large.dat | |
414 | $ hg ci -Am "commit" |
|
414 | $ hg ci -Am "commit" | |
415 | adding large2.dat as a largefile |
|
415 | adding large2.dat as a largefile | |
416 | Invoking status precommit hook |
|
416 | Invoking status precommit hook | |
417 | A large.dat |
|
417 | A large.dat | |
418 | A large2.dat |
|
418 | A large2.dat | |
419 | A normal |
|
419 | A normal | |
420 | $ find .hglf | sort |
|
420 | $ find .hglf | sort | |
421 | .hglf |
|
421 | .hglf | |
422 | .hglf/large.dat |
|
422 | .hglf/large.dat | |
423 | .hglf/large2.dat |
|
423 | .hglf/large2.dat | |
424 |
|
424 | |||
425 | Test actions on largefiles using relative paths from subdir |
|
425 | Test actions on largefiles using relative paths from subdir | |
426 |
|
426 | |||
427 | $ mkdir sub |
|
427 | $ mkdir sub | |
428 | $ cd sub |
|
428 | $ cd sub | |
429 | $ echo anotherlarge > anotherlarge |
|
429 | $ echo anotherlarge > anotherlarge | |
430 | $ hg add --large anotherlarge |
|
430 | $ hg add --large anotherlarge | |
431 | $ hg st |
|
431 | $ hg st | |
432 | A sub/anotherlarge |
|
432 | A sub/anotherlarge | |
433 | $ hg st anotherlarge |
|
433 | $ hg st anotherlarge | |
434 | A anotherlarge |
|
434 | A anotherlarge | |
435 | $ hg commit -m anotherlarge anotherlarge |
|
435 | $ hg commit -m anotherlarge anotherlarge | |
436 | Invoking status precommit hook |
|
436 | Invoking status precommit hook | |
437 | A sub/anotherlarge |
|
437 | A sub/anotherlarge | |
438 | $ hg log anotherlarge |
|
438 | $ hg log anotherlarge | |
439 | changeset: 1:9627a577c5e9 |
|
439 | changeset: 1:9627a577c5e9 | |
440 | tag: tip |
|
440 | tag: tip | |
441 | user: test |
|
441 | user: test | |
442 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
442 | date: Thu Jan 01 00:00:00 1970 +0000 | |
443 | summary: anotherlarge |
|
443 | summary: anotherlarge | |
444 |
|
444 | |||
445 | $ hg log -G anotherlarge |
|
445 | $ hg log -G anotherlarge | |
446 | @ changeset: 1:9627a577c5e9 |
|
446 | @ changeset: 1:9627a577c5e9 | |
447 | | tag: tip |
|
447 | | tag: tip | |
448 | | user: test |
|
448 | | user: test | |
449 | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
449 | | date: Thu Jan 01 00:00:00 1970 +0000 | |
450 | | summary: anotherlarge |
|
450 | | summary: anotherlarge | |
451 | | |
|
451 | | | |
452 | $ echo more >> anotherlarge |
|
452 | $ echo more >> anotherlarge | |
453 | $ hg st . |
|
453 | $ hg st . | |
454 | M anotherlarge |
|
454 | M anotherlarge | |
455 | $ hg cat anotherlarge |
|
455 | $ hg cat anotherlarge | |
456 | anotherlarge |
|
456 | anotherlarge | |
457 | $ hg revert anotherlarge |
|
457 | $ hg revert anotherlarge | |
458 | $ hg st |
|
458 | $ hg st | |
459 | ? sub/anotherlarge.orig |
|
459 | ? sub/anotherlarge.orig | |
460 | $ cd .. |
|
460 | $ cd .. | |
461 |
|
461 | |||
462 | $ cd .. |
|
462 | $ cd .. | |
463 |
|
463 | |||
464 | Check error message while exchange |
|
464 | Check error message while exchange | |
465 | ========================================================= |
|
465 | ========================================================= | |
466 |
|
466 | |||
467 | issue3651: summary/outgoing with largefiles shows "no remote repo" |
|
467 | issue3651: summary/outgoing with largefiles shows "no remote repo" | |
468 | unexpectedly |
|
468 | unexpectedly | |
469 |
|
469 | |||
470 | $ mkdir issue3651 |
|
470 | $ mkdir issue3651 | |
471 | $ cd issue3651 |
|
471 | $ cd issue3651 | |
472 |
|
472 | |||
473 | $ hg init src |
|
473 | $ hg init src | |
474 | $ echo a > src/a |
|
474 | $ echo a > src/a | |
475 | $ hg -R src add --large src/a |
|
475 | $ hg -R src add --large src/a | |
476 | $ hg -R src commit -m '#0' |
|
476 | $ hg -R src commit -m '#0' | |
477 | Invoking status precommit hook |
|
477 | Invoking status precommit hook | |
478 | A a |
|
478 | A a | |
479 |
|
479 | |||
480 | check messages when no remote repository is specified: |
|
480 | check messages when no remote repository is specified: | |
481 | "no remote repo" route for "hg outgoing --large" is not tested here, |
|
481 | "no remote repo" route for "hg outgoing --large" is not tested here, | |
482 | because it can't be reproduced easily. |
|
482 | because it can't be reproduced easily. | |
483 |
|
483 | |||
484 | $ hg init clone1 |
|
484 | $ hg init clone1 | |
485 | $ hg -R clone1 -q pull src |
|
485 | $ hg -R clone1 -q pull src | |
486 | $ hg -R clone1 -q update |
|
486 | $ hg -R clone1 -q update | |
487 | $ hg -R clone1 paths | grep default |
|
487 | $ hg -R clone1 paths | grep default | |
488 | [1] |
|
488 | [1] | |
489 |
|
489 | |||
490 | $ hg -R clone1 summary --large |
|
490 | $ hg -R clone1 summary --large | |
491 | parent: 0:fc0bd45326d3 tip |
|
491 | parent: 0:fc0bd45326d3 tip | |
492 | #0 |
|
492 | #0 | |
493 | branch: default |
|
493 | branch: default | |
494 | commit: (clean) |
|
494 | commit: (clean) | |
495 | update: (current) |
|
495 | update: (current) | |
496 | largefiles: (no remote repo) |
|
496 | largefiles: (no remote repo) | |
497 |
|
497 | |||
498 | check messages when there is no files to upload: |
|
498 | check messages when there is no files to upload: | |
499 |
|
499 | |||
500 | $ hg -q clone src clone2 |
|
500 | $ hg -q clone src clone2 | |
501 | $ hg -R clone2 paths | grep default |
|
501 | $ hg -R clone2 paths | grep default | |
502 | default = $TESTTMP/issue3651/src (glob) |
|
502 | default = $TESTTMP/issue3651/src (glob) | |
503 |
|
503 | |||
504 | $ hg -R clone2 summary --large |
|
504 | $ hg -R clone2 summary --large | |
505 | parent: 0:fc0bd45326d3 tip |
|
505 | parent: 0:fc0bd45326d3 tip | |
506 | #0 |
|
506 | #0 | |
507 | branch: default |
|
507 | branch: default | |
508 | commit: (clean) |
|
508 | commit: (clean) | |
509 | update: (current) |
|
509 | update: (current) | |
510 | largefiles: (no files to upload) |
|
510 | largefiles: (no files to upload) | |
511 | $ hg -R clone2 outgoing --large |
|
511 | $ hg -R clone2 outgoing --large | |
512 | comparing with $TESTTMP/issue3651/src (glob) |
|
512 | comparing with $TESTTMP/issue3651/src (glob) | |
513 | searching for changes |
|
513 | searching for changes | |
514 | no changes found |
|
514 | no changes found | |
515 | largefiles: no files to upload |
|
515 | largefiles: no files to upload | |
516 | [1] |
|
516 | [1] | |
517 |
|
517 | |||
518 | $ hg -R clone2 outgoing --large --graph --template "{rev}" |
|
518 | $ hg -R clone2 outgoing --large --graph --template "{rev}" | |
519 | comparing with $TESTTMP/issue3651/src (glob) |
|
519 | comparing with $TESTTMP/issue3651/src (glob) | |
520 | searching for changes |
|
520 | searching for changes | |
521 | no changes found |
|
521 | no changes found | |
522 | largefiles: no files to upload |
|
522 | largefiles: no files to upload | |
523 |
|
523 | |||
524 | check messages when there are files to upload: |
|
524 | check messages when there are files to upload: | |
525 |
|
525 | |||
526 | $ echo b > clone2/b |
|
526 | $ echo b > clone2/b | |
527 | $ hg -R clone2 add --large clone2/b |
|
527 | $ hg -R clone2 add --large clone2/b | |
528 | $ hg -R clone2 commit -m '#1' |
|
528 | $ hg -R clone2 commit -m '#1' | |
529 | Invoking status precommit hook |
|
529 | Invoking status precommit hook | |
530 | A b |
|
530 | A b | |
531 | $ hg -R clone2 summary --large |
|
531 | $ hg -R clone2 summary --large | |
532 | parent: 1:1acbe71ce432 tip |
|
532 | parent: 1:1acbe71ce432 tip | |
533 | #1 |
|
533 | #1 | |
534 | branch: default |
|
534 | branch: default | |
535 | commit: (clean) |
|
535 | commit: (clean) | |
536 | update: (current) |
|
536 | update: (current) | |
537 | largefiles: 1 entities for 1 files to upload |
|
537 | largefiles: 1 entities for 1 files to upload | |
538 | $ hg -R clone2 outgoing --large |
|
538 | $ hg -R clone2 outgoing --large | |
539 | comparing with $TESTTMP/issue3651/src (glob) |
|
539 | comparing with $TESTTMP/issue3651/src (glob) | |
540 | searching for changes |
|
540 | searching for changes | |
541 | changeset: 1:1acbe71ce432 |
|
541 | changeset: 1:1acbe71ce432 | |
542 | tag: tip |
|
542 | tag: tip | |
543 | user: test |
|
543 | user: test | |
544 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
544 | date: Thu Jan 01 00:00:00 1970 +0000 | |
545 | summary: #1 |
|
545 | summary: #1 | |
546 |
|
546 | |||
547 | largefiles to upload (1 entities): |
|
547 | largefiles to upload (1 entities): | |
548 | b |
|
548 | b | |
549 |
|
549 | |||
550 | $ hg -R clone2 outgoing --large --graph --template "{rev}" |
|
550 | $ hg -R clone2 outgoing --large --graph --template "{rev}" | |
551 | comparing with $TESTTMP/issue3651/src (glob) |
|
551 | comparing with $TESTTMP/issue3651/src (glob) | |
552 | searching for changes |
|
552 | searching for changes | |
553 | @ 1 |
|
553 | @ 1 | |
554 |
|
554 | |||
555 | largefiles to upload (1 entities): |
|
555 | largefiles to upload (1 entities): | |
556 | b |
|
556 | b | |
557 |
|
557 | |||
558 |
|
558 | |||
559 | $ cp clone2/b clone2/b1 |
|
559 | $ cp clone2/b clone2/b1 | |
560 | $ cp clone2/b clone2/b2 |
|
560 | $ cp clone2/b clone2/b2 | |
561 | $ hg -R clone2 add --large clone2/b1 clone2/b2 |
|
561 | $ hg -R clone2 add --large clone2/b1 clone2/b2 | |
562 | $ hg -R clone2 commit -m '#2: add largefiles referring same entity' |
|
562 | $ hg -R clone2 commit -m '#2: add largefiles referring same entity' | |
563 | Invoking status precommit hook |
|
563 | Invoking status precommit hook | |
564 | A b1 |
|
564 | A b1 | |
565 | A b2 |
|
565 | A b2 | |
566 | $ hg -R clone2 summary --large |
|
566 | $ hg -R clone2 summary --large | |
567 | parent: 2:6095d0695d70 tip |
|
567 | parent: 2:6095d0695d70 tip | |
568 | #2: add largefiles referring same entity |
|
568 | #2: add largefiles referring same entity | |
569 | branch: default |
|
569 | branch: default | |
570 | commit: (clean) |
|
570 | commit: (clean) | |
571 | update: (current) |
|
571 | update: (current) | |
572 | largefiles: 1 entities for 3 files to upload |
|
572 | largefiles: 1 entities for 3 files to upload | |
573 | $ hg -R clone2 outgoing --large -T "{rev}:{node|short}\n" |
|
573 | $ hg -R clone2 outgoing --large -T "{rev}:{node|short}\n" | |
574 | comparing with $TESTTMP/issue3651/src (glob) |
|
574 | comparing with $TESTTMP/issue3651/src (glob) | |
575 | searching for changes |
|
575 | searching for changes | |
576 | 1:1acbe71ce432 |
|
576 | 1:1acbe71ce432 | |
577 | 2:6095d0695d70 |
|
577 | 2:6095d0695d70 | |
578 | largefiles to upload (1 entities): |
|
578 | largefiles to upload (1 entities): | |
579 | b |
|
579 | b | |
580 | b1 |
|
580 | b1 | |
581 | b2 |
|
581 | b2 | |
582 |
|
582 | |||
583 | $ hg -R clone2 cat -r 1 clone2/.hglf/b |
|
583 | $ hg -R clone2 cat -r 1 clone2/.hglf/b | |
584 | 89e6c98d92887913cadf06b2adb97f26cde4849b |
|
584 | 89e6c98d92887913cadf06b2adb97f26cde4849b | |
585 | $ hg -R clone2 outgoing --large -T "{rev}:{node|short}\n" --debug |
|
585 | $ hg -R clone2 outgoing --large -T "{rev}:{node|short}\n" --debug | |
586 | comparing with $TESTTMP/issue3651/src (glob) |
|
586 | comparing with $TESTTMP/issue3651/src (glob) | |
587 | query 1; heads |
|
587 | query 1; heads | |
588 | searching for changes |
|
588 | searching for changes | |
589 | all remote heads known locally |
|
589 | all remote heads known locally | |
590 | 1:1acbe71ce432 |
|
590 | 1:1acbe71ce432 | |
591 | 2:6095d0695d70 |
|
591 | 2:6095d0695d70 | |
592 | largefiles to upload (1 entities): |
|
592 | largefiles to upload (1 entities): | |
593 | b |
|
593 | b | |
594 | 89e6c98d92887913cadf06b2adb97f26cde4849b |
|
594 | 89e6c98d92887913cadf06b2adb97f26cde4849b | |
595 | b1 |
|
595 | b1 | |
596 | 89e6c98d92887913cadf06b2adb97f26cde4849b |
|
596 | 89e6c98d92887913cadf06b2adb97f26cde4849b | |
597 | b2 |
|
597 | b2 | |
598 | 89e6c98d92887913cadf06b2adb97f26cde4849b |
|
598 | 89e6c98d92887913cadf06b2adb97f26cde4849b | |
599 |
|
599 | |||
600 |
|
600 | |||
601 | $ echo bbb > clone2/b |
|
601 | $ echo bbb > clone2/b | |
602 | $ hg -R clone2 commit -m '#3: add new largefile entity as existing file' |
|
602 | $ hg -R clone2 commit -m '#3: add new largefile entity as existing file' | |
603 | Invoking status precommit hook |
|
603 | Invoking status precommit hook | |
604 | M b |
|
604 | M b | |
605 | $ echo bbbb > clone2/b |
|
605 | $ echo bbbb > clone2/b | |
606 | $ hg -R clone2 commit -m '#4: add new largefile entity as existing file' |
|
606 | $ hg -R clone2 commit -m '#4: add new largefile entity as existing file' | |
607 | Invoking status precommit hook |
|
607 | Invoking status precommit hook | |
608 | M b |
|
608 | M b | |
609 | $ cp clone2/b1 clone2/b |
|
609 | $ cp clone2/b1 clone2/b | |
610 | $ hg -R clone2 commit -m '#5: refer existing largefile entity again' |
|
610 | $ hg -R clone2 commit -m '#5: refer existing largefile entity again' | |
611 | Invoking status precommit hook |
|
611 | Invoking status precommit hook | |
612 | M b |
|
612 | M b | |
613 | $ hg -R clone2 summary --large |
|
613 | $ hg -R clone2 summary --large | |
614 | parent: 5:036794ea641c tip |
|
614 | parent: 5:036794ea641c tip | |
615 | #5: refer existing largefile entity again |
|
615 | #5: refer existing largefile entity again | |
616 | branch: default |
|
616 | branch: default | |
617 | commit: (clean) |
|
617 | commit: (clean) | |
618 | update: (current) |
|
618 | update: (current) | |
619 | largefiles: 3 entities for 3 files to upload |
|
619 | largefiles: 3 entities for 3 files to upload | |
620 | $ hg -R clone2 outgoing --large -T "{rev}:{node|short}\n" |
|
620 | $ hg -R clone2 outgoing --large -T "{rev}:{node|short}\n" | |
621 | comparing with $TESTTMP/issue3651/src (glob) |
|
621 | comparing with $TESTTMP/issue3651/src (glob) | |
622 | searching for changes |
|
622 | searching for changes | |
623 | 1:1acbe71ce432 |
|
623 | 1:1acbe71ce432 | |
624 | 2:6095d0695d70 |
|
624 | 2:6095d0695d70 | |
625 | 3:7983dce246cc |
|
625 | 3:7983dce246cc | |
626 | 4:233f12ada4ae |
|
626 | 4:233f12ada4ae | |
627 | 5:036794ea641c |
|
627 | 5:036794ea641c | |
628 | largefiles to upload (3 entities): |
|
628 | largefiles to upload (3 entities): | |
629 | b |
|
629 | b | |
630 | b1 |
|
630 | b1 | |
631 | b2 |
|
631 | b2 | |
632 |
|
632 | |||
633 | $ hg -R clone2 cat -r 3 clone2/.hglf/b |
|
633 | $ hg -R clone2 cat -r 3 clone2/.hglf/b | |
634 | c801c9cfe94400963fcb683246217d5db77f9a9a |
|
634 | c801c9cfe94400963fcb683246217d5db77f9a9a | |
635 | $ hg -R clone2 cat -r 4 clone2/.hglf/b |
|
635 | $ hg -R clone2 cat -r 4 clone2/.hglf/b | |
636 | 13f9ed0898e315bf59dc2973fec52037b6f441a2 |
|
636 | 13f9ed0898e315bf59dc2973fec52037b6f441a2 | |
637 | $ hg -R clone2 outgoing --large -T "{rev}:{node|short}\n" --debug |
|
637 | $ hg -R clone2 outgoing --large -T "{rev}:{node|short}\n" --debug | |
638 | comparing with $TESTTMP/issue3651/src (glob) |
|
638 | comparing with $TESTTMP/issue3651/src (glob) | |
639 | query 1; heads |
|
639 | query 1; heads | |
640 | searching for changes |
|
640 | searching for changes | |
641 | all remote heads known locally |
|
641 | all remote heads known locally | |
642 | 1:1acbe71ce432 |
|
642 | 1:1acbe71ce432 | |
643 | 2:6095d0695d70 |
|
643 | 2:6095d0695d70 | |
644 | 3:7983dce246cc |
|
644 | 3:7983dce246cc | |
645 | 4:233f12ada4ae |
|
645 | 4:233f12ada4ae | |
646 | 5:036794ea641c |
|
646 | 5:036794ea641c | |
647 | largefiles to upload (3 entities): |
|
647 | largefiles to upload (3 entities): | |
648 | b |
|
648 | b | |
649 | 13f9ed0898e315bf59dc2973fec52037b6f441a2 |
|
649 | 13f9ed0898e315bf59dc2973fec52037b6f441a2 | |
650 | 89e6c98d92887913cadf06b2adb97f26cde4849b |
|
650 | 89e6c98d92887913cadf06b2adb97f26cde4849b | |
651 | c801c9cfe94400963fcb683246217d5db77f9a9a |
|
651 | c801c9cfe94400963fcb683246217d5db77f9a9a | |
652 | b1 |
|
652 | b1 | |
653 | 89e6c98d92887913cadf06b2adb97f26cde4849b |
|
653 | 89e6c98d92887913cadf06b2adb97f26cde4849b | |
654 | b2 |
|
654 | b2 | |
655 | 89e6c98d92887913cadf06b2adb97f26cde4849b |
|
655 | 89e6c98d92887913cadf06b2adb97f26cde4849b | |
656 |
|
656 | |||
657 |
|
657 | |||
658 | Pushing revision #1 causes uploading entity 89e6c98d9288, which is |
|
658 | Pushing revision #1 causes uploading entity 89e6c98d9288, which is | |
659 | shared also by largefiles b1, b2 in revision #2 and b in revision #5. |
|
659 | shared also by largefiles b1, b2 in revision #2 and b in revision #5. | |
660 |
|
660 | |||
661 | Then, entity 89e6c98d9288 is not treated as "outgoing entity" at "hg |
|
661 | Then, entity 89e6c98d9288 is not treated as "outgoing entity" at "hg | |
662 | summary" and "hg outgoing", even though files in outgoing revision #2 |
|
662 | summary" and "hg outgoing", even though files in outgoing revision #2 | |
663 | and #5 refer it. |
|
663 | and #5 refer it. | |
664 |
|
664 | |||
665 | $ hg -R clone2 push -r 1 -q |
|
665 | $ hg -R clone2 push -r 1 -q | |
666 | $ hg -R clone2 summary --large |
|
666 | $ hg -R clone2 summary --large | |
667 | parent: 5:036794ea641c tip |
|
667 | parent: 5:036794ea641c tip | |
668 | #5: refer existing largefile entity again |
|
668 | #5: refer existing largefile entity again | |
669 | branch: default |
|
669 | branch: default | |
670 | commit: (clean) |
|
670 | commit: (clean) | |
671 | update: (current) |
|
671 | update: (current) | |
672 | largefiles: 2 entities for 1 files to upload |
|
672 | largefiles: 2 entities for 1 files to upload | |
673 | $ hg -R clone2 outgoing --large -T "{rev}:{node|short}\n" |
|
673 | $ hg -R clone2 outgoing --large -T "{rev}:{node|short}\n" | |
674 | comparing with $TESTTMP/issue3651/src (glob) |
|
674 | comparing with $TESTTMP/issue3651/src (glob) | |
675 | searching for changes |
|
675 | searching for changes | |
676 | 2:6095d0695d70 |
|
676 | 2:6095d0695d70 | |
677 | 3:7983dce246cc |
|
677 | 3:7983dce246cc | |
678 | 4:233f12ada4ae |
|
678 | 4:233f12ada4ae | |
679 | 5:036794ea641c |
|
679 | 5:036794ea641c | |
680 | largefiles to upload (2 entities): |
|
680 | largefiles to upload (2 entities): | |
681 | b |
|
681 | b | |
682 |
|
682 | |||
683 | $ hg -R clone2 outgoing --large -T "{rev}:{node|short}\n" --debug |
|
683 | $ hg -R clone2 outgoing --large -T "{rev}:{node|short}\n" --debug | |
684 | comparing with $TESTTMP/issue3651/src (glob) |
|
684 | comparing with $TESTTMP/issue3651/src (glob) | |
685 | query 1; heads |
|
685 | query 1; heads | |
686 | searching for changes |
|
686 | searching for changes | |
687 | all remote heads known locally |
|
687 | all remote heads known locally | |
688 | 2:6095d0695d70 |
|
688 | 2:6095d0695d70 | |
689 | 3:7983dce246cc |
|
689 | 3:7983dce246cc | |
690 | 4:233f12ada4ae |
|
690 | 4:233f12ada4ae | |
691 | 5:036794ea641c |
|
691 | 5:036794ea641c | |
692 | largefiles to upload (2 entities): |
|
692 | largefiles to upload (2 entities): | |
693 | b |
|
693 | b | |
694 | 13f9ed0898e315bf59dc2973fec52037b6f441a2 |
|
694 | 13f9ed0898e315bf59dc2973fec52037b6f441a2 | |
695 | c801c9cfe94400963fcb683246217d5db77f9a9a |
|
695 | c801c9cfe94400963fcb683246217d5db77f9a9a | |
696 |
|
696 | |||
697 |
|
697 | |||
698 | $ cd .. |
|
698 | $ cd .. | |
699 |
|
699 | |||
700 | merge action 'd' for 'local renamed directory to d2/g' which has no filename |
|
700 | merge action 'd' for 'local renamed directory to d2/g' which has no filename | |
701 | ================================================================================== |
|
701 | ================================================================================== | |
702 |
|
702 | |||
703 | $ hg init merge-action |
|
703 | $ hg init merge-action | |
704 | $ cd merge-action |
|
704 | $ cd merge-action | |
705 | $ touch l |
|
705 | $ touch l | |
706 | $ hg add --large l |
|
706 | $ hg add --large l | |
707 | $ mkdir d1 |
|
707 | $ mkdir d1 | |
708 | $ touch d1/f |
|
708 | $ touch d1/f | |
709 | $ hg ci -Aqm0 |
|
709 | $ hg ci -Aqm0 | |
710 | Invoking status precommit hook |
|
710 | Invoking status precommit hook | |
711 | A d1/f |
|
711 | A d1/f | |
712 | A l |
|
712 | A l | |
713 | $ echo > d1/f |
|
713 | $ echo > d1/f | |
714 | $ touch d1/g |
|
714 | $ touch d1/g | |
715 | $ hg ci -Aqm1 |
|
715 | $ hg ci -Aqm1 | |
716 | Invoking status precommit hook |
|
716 | Invoking status precommit hook | |
717 | M d1/f |
|
717 | M d1/f | |
718 | A d1/g |
|
718 | A d1/g | |
719 | $ hg up -qr0 |
|
719 | $ hg up -qr0 | |
720 | $ hg mv d1 d2 |
|
720 | $ hg mv d1 d2 | |
721 | moving d1/f to d2/f (glob) |
|
721 | moving d1/f to d2/f (glob) | |
722 | $ hg ci -qm2 |
|
722 | $ hg ci -qm2 | |
723 | Invoking status precommit hook |
|
723 | Invoking status precommit hook | |
724 | A d2/f |
|
724 | A d2/f | |
725 | R d1/f |
|
725 | R d1/f | |
726 | $ hg merge |
|
726 | $ hg merge | |
727 | merging d2/f and d1/f to d2/f |
|
727 | merging d2/f and d1/f to d2/f | |
728 | getting changed largefiles |
|
728 | getting changed largefiles | |
729 | 0 largefiles updated, 0 removed |
|
729 | 0 largefiles updated, 0 removed | |
730 | 1 files updated, 1 files merged, 0 files removed, 0 files unresolved |
|
730 | 1 files updated, 1 files merged, 0 files removed, 0 files unresolved | |
731 | (branch merge, don't forget to commit) |
|
731 | (branch merge, don't forget to commit) | |
732 | $ cd .. |
|
732 | $ cd .. | |
733 |
|
733 | |||
734 |
|
734 | |||
735 | Merge conflicts: |
|
735 | Merge conflicts: | |
736 | ===================== |
|
736 | ===================== | |
737 |
|
737 | |||
738 | $ hg init merge |
|
738 | $ hg init merge | |
739 | $ cd merge |
|
739 | $ cd merge | |
740 | $ echo 0 > f-different |
|
740 | $ echo 0 > f-different | |
741 | $ echo 0 > f-same |
|
741 | $ echo 0 > f-same | |
742 | $ echo 0 > f-unchanged-1 |
|
742 | $ echo 0 > f-unchanged-1 | |
743 | $ echo 0 > f-unchanged-2 |
|
743 | $ echo 0 > f-unchanged-2 | |
744 | $ hg add --large * |
|
744 | $ hg add --large * | |
745 | $ hg ci -m0 |
|
745 | $ hg ci -m0 | |
746 | Invoking status precommit hook |
|
746 | Invoking status precommit hook | |
747 | A f-different |
|
747 | A f-different | |
748 | A f-same |
|
748 | A f-same | |
749 | A f-unchanged-1 |
|
749 | A f-unchanged-1 | |
750 | A f-unchanged-2 |
|
750 | A f-unchanged-2 | |
751 | $ echo tmp1 > f-unchanged-1 |
|
751 | $ echo tmp1 > f-unchanged-1 | |
752 | $ echo tmp1 > f-unchanged-2 |
|
752 | $ echo tmp1 > f-unchanged-2 | |
753 | $ echo tmp1 > f-same |
|
753 | $ echo tmp1 > f-same | |
754 | $ hg ci -m1 |
|
754 | $ hg ci -m1 | |
755 | Invoking status precommit hook |
|
755 | Invoking status precommit hook | |
756 | M f-same |
|
756 | M f-same | |
757 | M f-unchanged-1 |
|
757 | M f-unchanged-1 | |
758 | M f-unchanged-2 |
|
758 | M f-unchanged-2 | |
759 | $ echo 2 > f-different |
|
759 | $ echo 2 > f-different | |
760 | $ echo 0 > f-unchanged-1 |
|
760 | $ echo 0 > f-unchanged-1 | |
761 | $ echo 1 > f-unchanged-2 |
|
761 | $ echo 1 > f-unchanged-2 | |
762 | $ echo 1 > f-same |
|
762 | $ echo 1 > f-same | |
763 | $ hg ci -m2 |
|
763 | $ hg ci -m2 | |
764 | Invoking status precommit hook |
|
764 | Invoking status precommit hook | |
765 | M f-different |
|
765 | M f-different | |
766 | M f-same |
|
766 | M f-same | |
767 | M f-unchanged-1 |
|
767 | M f-unchanged-1 | |
768 | M f-unchanged-2 |
|
768 | M f-unchanged-2 | |
769 | $ hg up -qr0 |
|
769 | $ hg up -qr0 | |
770 | $ echo tmp2 > f-unchanged-1 |
|
770 | $ echo tmp2 > f-unchanged-1 | |
771 | $ echo tmp2 > f-unchanged-2 |
|
771 | $ echo tmp2 > f-unchanged-2 | |
772 | $ echo tmp2 > f-same |
|
772 | $ echo tmp2 > f-same | |
773 | $ hg ci -m3 |
|
773 | $ hg ci -m3 | |
774 | Invoking status precommit hook |
|
774 | Invoking status precommit hook | |
775 | M f-same |
|
775 | M f-same | |
776 | M f-unchanged-1 |
|
776 | M f-unchanged-1 | |
777 | M f-unchanged-2 |
|
777 | M f-unchanged-2 | |
778 | created new head |
|
778 | created new head | |
779 | $ echo 1 > f-different |
|
779 | $ echo 1 > f-different | |
780 | $ echo 1 > f-unchanged-1 |
|
780 | $ echo 1 > f-unchanged-1 | |
781 | $ echo 0 > f-unchanged-2 |
|
781 | $ echo 0 > f-unchanged-2 | |
782 | $ echo 1 > f-same |
|
782 | $ echo 1 > f-same | |
783 | $ hg ci -m4 |
|
783 | $ hg ci -m4 | |
784 | Invoking status precommit hook |
|
784 | Invoking status precommit hook | |
785 | M f-different |
|
785 | M f-different | |
786 | M f-same |
|
786 | M f-same | |
787 | M f-unchanged-1 |
|
787 | M f-unchanged-1 | |
788 | M f-unchanged-2 |
|
788 | M f-unchanged-2 | |
789 | $ hg merge |
|
789 | $ hg merge | |
790 | largefile f-different has a merge conflict |
|
790 | largefile f-different has a merge conflict | |
791 | ancestor was 09d2af8dd22201dd8d48e5dcfcaed281ff9422c7 |
|
791 | ancestor was 09d2af8dd22201dd8d48e5dcfcaed281ff9422c7 | |
792 | keep (l)ocal e5fa44f2b31c1fb553b6021e7360d07d5d91ff5e or |
|
792 | keep (l)ocal e5fa44f2b31c1fb553b6021e7360d07d5d91ff5e or | |
793 | take (o)ther 7448d8798a4380162d4b56f9b452e2f6f9e24e7a? l |
|
793 | take (o)ther 7448d8798a4380162d4b56f9b452e2f6f9e24e7a? l | |
794 | getting changed largefiles |
|
794 | getting changed largefiles | |
795 | 1 largefiles updated, 0 removed |
|
795 | 1 largefiles updated, 0 removed | |
796 | 0 files updated, 4 files merged, 0 files removed, 0 files unresolved |
|
796 | 0 files updated, 4 files merged, 0 files removed, 0 files unresolved | |
797 | (branch merge, don't forget to commit) |
|
797 | (branch merge, don't forget to commit) | |
798 | $ cat f-different |
|
798 | $ cat f-different | |
799 | 1 |
|
799 | 1 | |
800 | $ cat f-same |
|
800 | $ cat f-same | |
801 | 1 |
|
801 | 1 | |
802 | $ cat f-unchanged-1 |
|
802 | $ cat f-unchanged-1 | |
803 | 1 |
|
803 | 1 | |
804 | $ cat f-unchanged-2 |
|
804 | $ cat f-unchanged-2 | |
805 | 1 |
|
805 | 1 | |
806 | $ cd .. |
|
806 | $ cd .. | |
807 |
|
807 | |||
808 | Test largefile insulation (do not enabled a side effect |
|
808 | Test largefile insulation (do not enabled a side effect | |
809 | ======================================================== |
|
809 | ======================================================== | |
810 |
|
810 | |||
811 | Check whether "largefiles" feature is supported only in repositories |
|
811 | Check whether "largefiles" feature is supported only in repositories | |
812 | enabling largefiles extension. |
|
812 | enabling largefiles extension. | |
813 |
|
813 | |||
814 | $ mkdir individualenabling |
|
814 | $ mkdir individualenabling | |
815 | $ cd individualenabling |
|
815 | $ cd individualenabling | |
816 |
|
816 | |||
817 | $ hg init enabledlocally |
|
817 | $ hg init enabledlocally | |
818 | $ echo large > enabledlocally/large |
|
818 | $ echo large > enabledlocally/large | |
819 | $ hg -R enabledlocally add --large enabledlocally/large |
|
819 | $ hg -R enabledlocally add --large enabledlocally/large | |
820 | $ hg -R enabledlocally commit -m '#0' |
|
820 | $ hg -R enabledlocally commit -m '#0' | |
821 | Invoking status precommit hook |
|
821 | Invoking status precommit hook | |
822 | A large |
|
822 | A large | |
823 |
|
823 | |||
824 | $ hg init notenabledlocally |
|
824 | $ hg init notenabledlocally | |
825 | $ echo large > notenabledlocally/large |
|
825 | $ echo large > notenabledlocally/large | |
826 | $ hg -R notenabledlocally add --large notenabledlocally/large |
|
826 | $ hg -R notenabledlocally add --large notenabledlocally/large | |
827 | $ hg -R notenabledlocally commit -m '#0' |
|
827 | $ hg -R notenabledlocally commit -m '#0' | |
828 | Invoking status precommit hook |
|
828 | Invoking status precommit hook | |
829 | A large |
|
829 | A large | |
830 |
|
830 | |||
831 | $ cat >> $HGRCPATH <<EOF |
|
831 | $ cat >> $HGRCPATH <<EOF | |
832 | > [extensions] |
|
832 | > [extensions] | |
833 | > # disable globally |
|
833 | > # disable globally | |
834 | > largefiles=! |
|
834 | > largefiles=! | |
835 | > EOF |
|
835 | > EOF | |
836 | $ cat >> enabledlocally/.hg/hgrc <<EOF |
|
836 | $ cat >> enabledlocally/.hg/hgrc <<EOF | |
837 | > [extensions] |
|
837 | > [extensions] | |
838 | > # enable locally |
|
838 | > # enable locally | |
839 | > largefiles= |
|
839 | > largefiles= | |
840 | > EOF |
|
840 | > EOF | |
841 | $ hg -R enabledlocally root |
|
841 | $ hg -R enabledlocally root | |
842 | $TESTTMP/individualenabling/enabledlocally (glob) |
|
842 | $TESTTMP/individualenabling/enabledlocally (glob) | |
843 | $ hg -R notenabledlocally root |
|
843 | $ hg -R notenabledlocally root | |
844 | abort: repository requires features unknown to this Mercurial: largefiles! |
|
844 | abort: repository requires features unknown to this Mercurial: largefiles! | |
845 | (see http://mercurial.selenic.com/wiki/MissingRequirement for more information) |
|
845 | (see http://mercurial.selenic.com/wiki/MissingRequirement for more information) | |
846 | [255] |
|
846 | [255] | |
847 |
|
847 | |||
848 | $ hg init push-dst |
|
848 | $ hg init push-dst | |
849 | $ hg -R enabledlocally push push-dst |
|
849 | $ hg -R enabledlocally push push-dst | |
850 | pushing to push-dst |
|
850 | pushing to push-dst | |
851 | abort: required features are not supported in the destination: largefiles |
|
851 | abort: required features are not supported in the destination: largefiles | |
852 | [255] |
|
852 | [255] | |
853 |
|
853 | |||
854 | $ hg init pull-src |
|
854 | $ hg init pull-src | |
855 | $ hg -R pull-src pull enabledlocally |
|
855 | $ hg -R pull-src pull enabledlocally | |
856 | pulling from enabledlocally |
|
856 | pulling from enabledlocally | |
857 | abort: required features are not supported in the destination: largefiles |
|
857 | abort: required features are not supported in the destination: largefiles | |
858 | [255] |
|
858 | [255] | |
859 |
|
859 | |||
860 | $ hg clone enabledlocally clone-dst |
|
860 | $ hg clone enabledlocally clone-dst | |
861 | abort: repository requires features unknown to this Mercurial: largefiles! |
|
861 | abort: repository requires features unknown to this Mercurial: largefiles! | |
862 | (see http://mercurial.selenic.com/wiki/MissingRequirement for more information) |
|
862 | (see http://mercurial.selenic.com/wiki/MissingRequirement for more information) | |
863 | [255] |
|
863 | [255] | |
864 | $ test -d clone-dst |
|
864 | $ test -d clone-dst | |
865 | [1] |
|
865 | [1] | |
866 | $ hg clone --pull enabledlocally clone-pull-dst |
|
866 | $ hg clone --pull enabledlocally clone-pull-dst | |
867 | abort: required features are not supported in the destination: largefiles |
|
867 | abort: required features are not supported in the destination: largefiles | |
868 | [255] |
|
868 | [255] | |
869 | $ test -d clone-pull-dst |
|
869 | $ test -d clone-pull-dst | |
870 | [1] |
|
870 | [1] | |
871 |
|
871 | |||
872 | #if serve |
|
872 | #if serve | |
873 |
|
873 | |||
874 | Test largefiles specific peer setup, when largefiles is enabled |
|
874 | Test largefiles specific peer setup, when largefiles is enabled | |
875 | locally (issue4109) |
|
875 | locally (issue4109) | |
876 |
|
876 | |||
877 | $ hg showconfig extensions | grep largefiles |
|
877 | $ hg showconfig extensions | grep largefiles | |
878 | extensions.largefiles=! |
|
878 | extensions.largefiles=! | |
879 | $ mkdir -p $TESTTMP/individualenabling/usercache |
|
879 | $ mkdir -p $TESTTMP/individualenabling/usercache | |
880 |
|
880 | |||
881 | $ hg serve -R enabledlocally -d -p $HGPORT --pid-file hg.pid |
|
881 | $ hg serve -R enabledlocally -d -p $HGPORT --pid-file hg.pid | |
882 | $ cat hg.pid >> $DAEMON_PIDS |
|
882 | $ cat hg.pid >> $DAEMON_PIDS | |
883 |
|
883 | |||
884 | $ hg init pull-dst |
|
884 | $ hg init pull-dst | |
885 | $ cat > pull-dst/.hg/hgrc <<EOF |
|
885 | $ cat > pull-dst/.hg/hgrc <<EOF | |
886 | > [extensions] |
|
886 | > [extensions] | |
887 | > # enable locally |
|
887 | > # enable locally | |
888 | > largefiles= |
|
888 | > largefiles= | |
889 | > [largefiles] |
|
889 | > [largefiles] | |
890 | > # ignore system cache to force largefiles specific wire proto access |
|
890 | > # ignore system cache to force largefiles specific wire proto access | |
891 | > usercache=$TESTTMP/individualenabling/usercache |
|
891 | > usercache=$TESTTMP/individualenabling/usercache | |
892 | > EOF |
|
892 | > EOF | |
893 | $ hg -R pull-dst -q pull -u http://localhost:$HGPORT |
|
893 | $ hg -R pull-dst -q pull -u http://localhost:$HGPORT | |
894 |
|
894 | |||
895 | $ "$TESTDIR/killdaemons.py" $DAEMON_PIDS |
|
895 | $ "$TESTDIR/killdaemons.py" $DAEMON_PIDS | |
896 | #endif |
|
896 | #endif | |
897 |
|
897 | |||
898 | $ cd .. |
|
898 | $ cd .. | |
899 |
|
899 | |||
900 |
|
900 | |||
901 | Test "pull --rebase" when rebase is enabled before largefiles (issue3861) |
|
901 | Test "pull --rebase" when rebase is enabled before largefiles (issue3861) | |
902 | ========================================================================= |
|
902 | ========================================================================= | |
903 |
|
903 | |||
904 | $ hg showconfig extensions | grep largefiles |
|
904 | $ hg showconfig extensions | grep largefiles | |
905 | extensions.largefiles=! |
|
905 | extensions.largefiles=! | |
906 |
|
906 | |||
907 | $ mkdir issue3861 |
|
907 | $ mkdir issue3861 | |
908 | $ cd issue3861 |
|
908 | $ cd issue3861 | |
909 | $ hg init src |
|
909 | $ hg init src | |
910 | $ hg clone -q src dst |
|
910 | $ hg clone -q src dst | |
911 | $ echo a > src/a |
|
911 | $ echo a > src/a | |
912 | $ hg -R src commit -Aqm "#0" |
|
912 | $ hg -R src commit -Aqm "#0" | |
913 | Invoking status precommit hook |
|
913 | Invoking status precommit hook | |
914 | A a |
|
914 | A a | |
915 |
|
915 | |||
916 | $ cat >> dst/.hg/hgrc <<EOF |
|
916 | $ cat >> dst/.hg/hgrc <<EOF | |
917 | > [extensions] |
|
917 | > [extensions] | |
918 | > largefiles= |
|
918 | > largefiles= | |
919 | > EOF |
|
919 | > EOF | |
920 | $ hg -R dst pull --rebase |
|
920 | $ hg -R dst pull --rebase | |
921 | pulling from $TESTTMP/issue3861/src (glob) |
|
921 | pulling from $TESTTMP/issue3861/src (glob) | |
922 | requesting all changes |
|
922 | requesting all changes | |
923 | adding changesets |
|
923 | adding changesets | |
924 | adding manifests |
|
924 | adding manifests | |
925 | adding file changes |
|
925 | adding file changes | |
926 | added 1 changesets with 1 changes to 1 files |
|
926 | added 1 changesets with 1 changes to 1 files | |
927 | nothing to rebase - working directory parent is already an ancestor of destination bf5e395ced2c |
|
927 | nothing to rebase - working directory parent is already an ancestor of destination bf5e395ced2c | |
928 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
928 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
929 |
|
929 | |||
930 | $ cd .. |
|
930 | $ cd .. |
@@ -1,1834 +1,1834 b'' | |||||
1 | This file used to contains all largefile tests. |
|
1 | This file used to contains all largefile tests. | |
2 | Do not add any new tests in this file as it his already far too long to run. |
|
2 | Do not add any new tests in this file as it his already far too long to run. | |
3 |
|
3 | |||
4 | It contains all the testing of the basic concepts of large file in a single block. |
|
4 | It contains all the testing of the basic concepts of large file in a single block. | |
5 |
|
5 | |||
6 | $ USERCACHE="$TESTTMP/cache"; export USERCACHE |
|
6 | $ USERCACHE="$TESTTMP/cache"; export USERCACHE | |
7 | $ mkdir "${USERCACHE}" |
|
7 | $ mkdir "${USERCACHE}" | |
8 | $ cat >> $HGRCPATH <<EOF |
|
8 | $ cat >> $HGRCPATH <<EOF | |
9 | > [extensions] |
|
9 | > [extensions] | |
10 | > largefiles= |
|
10 | > largefiles= | |
11 | > purge= |
|
11 | > purge= | |
12 | > rebase= |
|
12 | > rebase= | |
13 | > transplant= |
|
13 | > transplant= | |
14 | > [phases] |
|
14 | > [phases] | |
15 | > publish=False |
|
15 | > publish=False | |
16 | > [largefiles] |
|
16 | > [largefiles] | |
17 | > minsize=2 |
|
17 | > minsize=2 | |
18 | > patterns=glob:**.dat |
|
18 | > patterns=glob:**.dat | |
19 | > usercache=${USERCACHE} |
|
19 | > usercache=${USERCACHE} | |
20 | > [hooks] |
|
20 | > [hooks] | |
21 | > precommit=sh -c "echo \\"Invoking status precommit hook\\"; hg status" |
|
21 | > precommit=sh -c "echo \\"Invoking status precommit hook\\"; hg status" | |
22 | > EOF |
|
22 | > EOF | |
23 |
|
23 | |||
24 | Create the repo with a couple of revisions of both large and normal |
|
24 | Create the repo with a couple of revisions of both large and normal | |
25 | files. |
|
25 | files. | |
26 | Test status and dirstate of largefiles and that summary output is correct. |
|
26 | Test status and dirstate of largefiles and that summary output is correct. | |
27 |
|
27 | |||
28 | $ hg init a |
|
28 | $ hg init a | |
29 | $ cd a |
|
29 | $ cd a | |
30 | $ mkdir sub |
|
30 | $ mkdir sub | |
31 | $ echo normal1 > normal1 |
|
31 | $ echo normal1 > normal1 | |
32 | $ echo normal2 > sub/normal2 |
|
32 | $ echo normal2 > sub/normal2 | |
33 | $ echo large1 > large1 |
|
33 | $ echo large1 > large1 | |
34 | $ echo large2 > sub/large2 |
|
34 | $ echo large2 > sub/large2 | |
35 | $ hg add normal1 sub/normal2 |
|
35 | $ hg add normal1 sub/normal2 | |
36 | $ hg add --large large1 sub/large2 |
|
36 | $ hg add --large large1 sub/large2 | |
37 | $ hg commit -m "add files" |
|
37 | $ hg commit -m "add files" | |
38 | Invoking status precommit hook |
|
38 | Invoking status precommit hook | |
39 | A large1 |
|
39 | A large1 | |
40 | A normal1 |
|
40 | A normal1 | |
41 | A sub/large2 |
|
41 | A sub/large2 | |
42 | A sub/normal2 |
|
42 | A sub/normal2 | |
43 | $ touch large1 sub/large2 |
|
43 | $ touch large1 sub/large2 | |
44 | $ sleep 1 |
|
44 | $ sleep 1 | |
45 | $ hg st |
|
45 | $ hg st | |
46 | $ hg debugstate --nodates |
|
46 | $ hg debugstate --nodates | |
47 | n 644 41 .hglf/large1 |
|
47 | n 644 41 .hglf/large1 | |
48 | n 644 41 .hglf/sub/large2 |
|
48 | n 644 41 .hglf/sub/large2 | |
49 | n 644 8 normal1 |
|
49 | n 644 8 normal1 | |
50 | n 644 8 sub/normal2 |
|
50 | n 644 8 sub/normal2 | |
51 | $ hg debugstate --large --nodates |
|
51 | $ hg debugstate --large --nodates | |
52 | n 644 7 large1 |
|
52 | n 644 7 large1 | |
53 | n 644 7 sub/large2 |
|
53 | n 644 7 sub/large2 | |
54 | $ echo normal11 > normal1 |
|
54 | $ echo normal11 > normal1 | |
55 | $ echo normal22 > sub/normal2 |
|
55 | $ echo normal22 > sub/normal2 | |
56 | $ echo large11 > large1 |
|
56 | $ echo large11 > large1 | |
57 | $ echo large22 > sub/large2 |
|
57 | $ echo large22 > sub/large2 | |
58 | $ hg commit -m "edit files" |
|
58 | $ hg commit -m "edit files" | |
59 | Invoking status precommit hook |
|
59 | Invoking status precommit hook | |
60 | M large1 |
|
60 | M large1 | |
61 | M normal1 |
|
61 | M normal1 | |
62 | M sub/large2 |
|
62 | M sub/large2 | |
63 | M sub/normal2 |
|
63 | M sub/normal2 | |
64 | $ hg sum --large |
|
64 | $ hg sum --large | |
65 | parent: 1:ce8896473775 tip |
|
65 | parent: 1:ce8896473775 tip | |
66 | edit files |
|
66 | edit files | |
67 | branch: default |
|
67 | branch: default | |
68 | commit: (clean) |
|
68 | commit: (clean) | |
69 | update: (current) |
|
69 | update: (current) | |
70 | largefiles: (no remote repo) |
|
70 | largefiles: (no remote repo) | |
71 |
|
71 | |||
72 | Commit preserved largefile contents. |
|
72 | Commit preserved largefile contents. | |
73 |
|
73 | |||
74 | $ cat normal1 |
|
74 | $ cat normal1 | |
75 | normal11 |
|
75 | normal11 | |
76 | $ cat large1 |
|
76 | $ cat large1 | |
77 | large11 |
|
77 | large11 | |
78 | $ cat sub/normal2 |
|
78 | $ cat sub/normal2 | |
79 | normal22 |
|
79 | normal22 | |
80 | $ cat sub/large2 |
|
80 | $ cat sub/large2 | |
81 | large22 |
|
81 | large22 | |
82 |
|
82 | |||
83 | Test status, subdir and unknown files |
|
83 | Test status, subdir and unknown files | |
84 |
|
84 | |||
85 | $ echo unknown > sub/unknown |
|
85 | $ echo unknown > sub/unknown | |
86 | $ hg st --all |
|
86 | $ hg st --all | |
87 | ? sub/unknown |
|
87 | ? sub/unknown | |
88 | C large1 |
|
88 | C large1 | |
89 | C normal1 |
|
89 | C normal1 | |
90 | C sub/large2 |
|
90 | C sub/large2 | |
91 | C sub/normal2 |
|
91 | C sub/normal2 | |
92 | $ hg st --all sub |
|
92 | $ hg st --all sub | |
93 | ? sub/unknown |
|
93 | ? sub/unknown | |
94 | C sub/large2 |
|
94 | C sub/large2 | |
95 | C sub/normal2 |
|
95 | C sub/normal2 | |
96 | $ rm sub/unknown |
|
96 | $ rm sub/unknown | |
97 |
|
97 | |||
98 | Test messages and exit codes for remove warning cases |
|
98 | Test messages and exit codes for remove warning cases | |
99 |
|
99 | |||
100 | $ hg remove -A large1 |
|
100 | $ hg remove -A large1 | |
101 | not removing large1: file still exists |
|
101 | not removing large1: file still exists | |
102 | [1] |
|
102 | [1] | |
103 | $ echo 'modified' > large1 |
|
103 | $ echo 'modified' > large1 | |
104 | $ hg remove large1 |
|
104 | $ hg remove large1 | |
105 | not removing large1: file is modified (use -f to force removal) |
|
105 | not removing large1: file is modified (use -f to force removal) | |
106 | [1] |
|
106 | [1] | |
107 | $ echo 'new' > normalnew |
|
107 | $ echo 'new' > normalnew | |
108 | $ hg add normalnew |
|
108 | $ hg add normalnew | |
109 | $ echo 'new' > largenew |
|
109 | $ echo 'new' > largenew | |
110 | $ hg add --large normalnew |
|
110 | $ hg add --large normalnew | |
111 | normalnew already tracked! |
|
111 | normalnew already tracked! | |
112 | $ hg remove normalnew largenew |
|
112 | $ hg remove normalnew largenew | |
113 | not removing largenew: file is untracked |
|
113 | not removing largenew: file is untracked | |
114 | not removing normalnew: file has been marked for add (use forget to undo) |
|
114 | not removing normalnew: file has been marked for add (use forget to undo) | |
115 | [1] |
|
115 | [1] | |
116 | $ rm normalnew largenew |
|
116 | $ rm normalnew largenew | |
117 | $ hg up -Cq |
|
117 | $ hg up -Cq | |
118 |
|
118 | |||
119 | Remove both largefiles and normal files. |
|
119 | Remove both largefiles and normal files. | |
120 |
|
120 | |||
121 | $ hg remove normal1 large1 |
|
121 | $ hg remove normal1 large1 | |
122 | $ hg status large1 |
|
122 | $ hg status large1 | |
123 | R large1 |
|
123 | R large1 | |
124 | $ hg commit -m "remove files" |
|
124 | $ hg commit -m "remove files" | |
125 | Invoking status precommit hook |
|
125 | Invoking status precommit hook | |
126 | R large1 |
|
126 | R large1 | |
127 | R normal1 |
|
127 | R normal1 | |
128 | $ ls |
|
128 | $ ls | |
129 | sub |
|
129 | sub | |
130 | $ echo "testlargefile" > large1-test |
|
130 | $ echo "testlargefile" > large1-test | |
131 | $ hg add --large large1-test |
|
131 | $ hg add --large large1-test | |
132 | $ hg st |
|
132 | $ hg st | |
133 | A large1-test |
|
133 | A large1-test | |
134 | $ hg rm large1-test |
|
134 | $ hg rm large1-test | |
135 | not removing large1-test: file has been marked for add (use forget to undo) |
|
135 | not removing large1-test: file has been marked for add (use forget to undo) | |
136 | [1] |
|
136 | [1] | |
137 | $ hg st |
|
137 | $ hg st | |
138 | A large1-test |
|
138 | A large1-test | |
139 | $ hg forget large1-test |
|
139 | $ hg forget large1-test | |
140 | $ hg st |
|
140 | $ hg st | |
141 | ? large1-test |
|
141 | ? large1-test | |
142 | $ hg remove large1-test |
|
142 | $ hg remove large1-test | |
143 | not removing large1-test: file is untracked |
|
143 | not removing large1-test: file is untracked | |
144 | [1] |
|
144 | [1] | |
145 | $ hg forget large1-test |
|
145 | $ hg forget large1-test | |
146 | not removing large1-test: file is already untracked |
|
146 | not removing large1-test: file is already untracked | |
147 | [1] |
|
147 | [1] | |
148 | $ rm large1-test |
|
148 | $ rm large1-test | |
149 |
|
149 | |||
150 | Copy both largefiles and normal files (testing that status output is correct). |
|
150 | Copy both largefiles and normal files (testing that status output is correct). | |
151 |
|
151 | |||
152 | $ hg cp sub/normal2 normal1 |
|
152 | $ hg cp sub/normal2 normal1 | |
153 | $ hg cp sub/large2 large1 |
|
153 | $ hg cp sub/large2 large1 | |
154 | $ hg commit -m "copy files" |
|
154 | $ hg commit -m "copy files" | |
155 | Invoking status precommit hook |
|
155 | Invoking status precommit hook | |
156 | A large1 |
|
156 | A large1 | |
157 | A normal1 |
|
157 | A normal1 | |
158 | $ cat normal1 |
|
158 | $ cat normal1 | |
159 | normal22 |
|
159 | normal22 | |
160 | $ cat large1 |
|
160 | $ cat large1 | |
161 | large22 |
|
161 | large22 | |
162 |
|
162 | |||
163 | Test moving largefiles and verify that normal files are also unaffected. |
|
163 | Test moving largefiles and verify that normal files are also unaffected. | |
164 |
|
164 | |||
165 | $ hg mv normal1 normal3 |
|
165 | $ hg mv normal1 normal3 | |
166 | $ hg mv large1 large3 |
|
166 | $ hg mv large1 large3 | |
167 | $ hg mv sub/normal2 sub/normal4 |
|
167 | $ hg mv sub/normal2 sub/normal4 | |
168 | $ hg mv sub/large2 sub/large4 |
|
168 | $ hg mv sub/large2 sub/large4 | |
169 | $ hg commit -m "move files" |
|
169 | $ hg commit -m "move files" | |
170 | Invoking status precommit hook |
|
170 | Invoking status precommit hook | |
171 | A large3 |
|
171 | A large3 | |
172 | A normal3 |
|
172 | A normal3 | |
173 | A sub/large4 |
|
173 | A sub/large4 | |
174 | A sub/normal4 |
|
174 | A sub/normal4 | |
175 | R large1 |
|
175 | R large1 | |
176 | R normal1 |
|
176 | R normal1 | |
177 | R sub/large2 |
|
177 | R sub/large2 | |
178 | R sub/normal2 |
|
178 | R sub/normal2 | |
179 | $ cat normal3 |
|
179 | $ cat normal3 | |
180 | normal22 |
|
180 | normal22 | |
181 | $ cat large3 |
|
181 | $ cat large3 | |
182 | large22 |
|
182 | large22 | |
183 | $ cat sub/normal4 |
|
183 | $ cat sub/normal4 | |
184 | normal22 |
|
184 | normal22 | |
185 | $ cat sub/large4 |
|
185 | $ cat sub/large4 | |
186 | large22 |
|
186 | large22 | |
187 |
|
187 | |||
188 |
|
188 | |||
189 | #if serve |
|
189 | #if serve | |
190 | Test display of largefiles in hgweb |
|
190 | Test display of largefiles in hgweb | |
191 |
|
191 | |||
192 | $ hg serve -d -p $HGPORT --pid-file ../hg.pid |
|
192 | $ hg serve -d -p $HGPORT --pid-file ../hg.pid | |
193 | $ cat ../hg.pid >> $DAEMON_PIDS |
|
193 | $ cat ../hg.pid >> $DAEMON_PIDS | |
194 | $ "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT 'file/tip/?style=raw' |
|
194 | $ "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT 'file/tip/?style=raw' | |
195 | 200 Script output follows |
|
195 | 200 Script output follows | |
196 |
|
196 | |||
197 |
|
197 | |||
198 | drwxr-xr-x sub |
|
198 | drwxr-xr-x sub | |
199 | -rw-r--r-- 41 large3 |
|
199 | -rw-r--r-- 41 large3 | |
200 | -rw-r--r-- 9 normal3 |
|
200 | -rw-r--r-- 9 normal3 | |
201 |
|
201 | |||
202 |
|
202 | |||
203 | $ "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT 'file/tip/sub/?style=raw' |
|
203 | $ "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT 'file/tip/sub/?style=raw' | |
204 | 200 Script output follows |
|
204 | 200 Script output follows | |
205 |
|
205 | |||
206 |
|
206 | |||
207 | -rw-r--r-- 41 large4 |
|
207 | -rw-r--r-- 41 large4 | |
208 | -rw-r--r-- 9 normal4 |
|
208 | -rw-r--r-- 9 normal4 | |
209 |
|
209 | |||
210 |
|
210 | |||
211 | $ "$TESTDIR/killdaemons.py" $DAEMON_PIDS |
|
211 | $ "$TESTDIR/killdaemons.py" $DAEMON_PIDS | |
212 | #endif |
|
212 | #endif | |
213 |
|
213 | |||
214 | Test archiving the various revisions. These hit corner cases known with |
|
214 | Test archiving the various revisions. These hit corner cases known with | |
215 | archiving. |
|
215 | archiving. | |
216 |
|
216 | |||
217 | $ hg archive -r 0 ../archive0 |
|
217 | $ hg archive -r 0 ../archive0 | |
218 | $ hg archive -r 1 ../archive1 |
|
218 | $ hg archive -r 1 ../archive1 | |
219 | $ hg archive -r 2 ../archive2 |
|
219 | $ hg archive -r 2 ../archive2 | |
220 | $ hg archive -r 3 ../archive3 |
|
220 | $ hg archive -r 3 ../archive3 | |
221 | $ hg archive -r 4 ../archive4 |
|
221 | $ hg archive -r 4 ../archive4 | |
222 | $ cd ../archive0 |
|
222 | $ cd ../archive0 | |
223 | $ cat normal1 |
|
223 | $ cat normal1 | |
224 | normal1 |
|
224 | normal1 | |
225 | $ cat large1 |
|
225 | $ cat large1 | |
226 | large1 |
|
226 | large1 | |
227 | $ cat sub/normal2 |
|
227 | $ cat sub/normal2 | |
228 | normal2 |
|
228 | normal2 | |
229 | $ cat sub/large2 |
|
229 | $ cat sub/large2 | |
230 | large2 |
|
230 | large2 | |
231 | $ cd ../archive1 |
|
231 | $ cd ../archive1 | |
232 | $ cat normal1 |
|
232 | $ cat normal1 | |
233 | normal11 |
|
233 | normal11 | |
234 | $ cat large1 |
|
234 | $ cat large1 | |
235 | large11 |
|
235 | large11 | |
236 | $ cat sub/normal2 |
|
236 | $ cat sub/normal2 | |
237 | normal22 |
|
237 | normal22 | |
238 | $ cat sub/large2 |
|
238 | $ cat sub/large2 | |
239 | large22 |
|
239 | large22 | |
240 | $ cd ../archive2 |
|
240 | $ cd ../archive2 | |
241 | $ ls |
|
241 | $ ls | |
242 | sub |
|
242 | sub | |
243 | $ cat sub/normal2 |
|
243 | $ cat sub/normal2 | |
244 | normal22 |
|
244 | normal22 | |
245 | $ cat sub/large2 |
|
245 | $ cat sub/large2 | |
246 | large22 |
|
246 | large22 | |
247 | $ cd ../archive3 |
|
247 | $ cd ../archive3 | |
248 | $ cat normal1 |
|
248 | $ cat normal1 | |
249 | normal22 |
|
249 | normal22 | |
250 | $ cat large1 |
|
250 | $ cat large1 | |
251 | large22 |
|
251 | large22 | |
252 | $ cat sub/normal2 |
|
252 | $ cat sub/normal2 | |
253 | normal22 |
|
253 | normal22 | |
254 | $ cat sub/large2 |
|
254 | $ cat sub/large2 | |
255 | large22 |
|
255 | large22 | |
256 | $ cd ../archive4 |
|
256 | $ cd ../archive4 | |
257 | $ cat normal3 |
|
257 | $ cat normal3 | |
258 | normal22 |
|
258 | normal22 | |
259 | $ cat large3 |
|
259 | $ cat large3 | |
260 | large22 |
|
260 | large22 | |
261 | $ cat sub/normal4 |
|
261 | $ cat sub/normal4 | |
262 | normal22 |
|
262 | normal22 | |
263 | $ cat sub/large4 |
|
263 | $ cat sub/large4 | |
264 | large22 |
|
264 | large22 | |
265 |
|
265 | |||
266 | Commit corner case: specify files to commit. |
|
266 | Commit corner case: specify files to commit. | |
267 |
|
267 | |||
268 | $ cd ../a |
|
268 | $ cd ../a | |
269 | $ echo normal3 > normal3 |
|
269 | $ echo normal3 > normal3 | |
270 | $ echo large3 > large3 |
|
270 | $ echo large3 > large3 | |
271 | $ echo normal4 > sub/normal4 |
|
271 | $ echo normal4 > sub/normal4 | |
272 | $ echo large4 > sub/large4 |
|
272 | $ echo large4 > sub/large4 | |
273 | $ hg commit normal3 large3 sub/normal4 sub/large4 -m "edit files again" |
|
273 | $ hg commit normal3 large3 sub/normal4 sub/large4 -m "edit files again" | |
274 | Invoking status precommit hook |
|
274 | Invoking status precommit hook | |
275 | M large3 |
|
275 | M large3 | |
276 | M normal3 |
|
276 | M normal3 | |
277 | M sub/large4 |
|
277 | M sub/large4 | |
278 | M sub/normal4 |
|
278 | M sub/normal4 | |
279 | $ cat normal3 |
|
279 | $ cat normal3 | |
280 | normal3 |
|
280 | normal3 | |
281 | $ cat large3 |
|
281 | $ cat large3 | |
282 | large3 |
|
282 | large3 | |
283 | $ cat sub/normal4 |
|
283 | $ cat sub/normal4 | |
284 | normal4 |
|
284 | normal4 | |
285 | $ cat sub/large4 |
|
285 | $ cat sub/large4 | |
286 | large4 |
|
286 | large4 | |
287 |
|
287 | |||
288 | One more commit corner case: commit from a subdirectory. |
|
288 | One more commit corner case: commit from a subdirectory. | |
289 |
|
289 | |||
290 | $ cd ../a |
|
290 | $ cd ../a | |
291 | $ echo normal33 > normal3 |
|
291 | $ echo normal33 > normal3 | |
292 | $ echo large33 > large3 |
|
292 | $ echo large33 > large3 | |
293 | $ echo normal44 > sub/normal4 |
|
293 | $ echo normal44 > sub/normal4 | |
294 | $ echo large44 > sub/large4 |
|
294 | $ echo large44 > sub/large4 | |
295 | $ cd sub |
|
295 | $ cd sub | |
296 | $ hg commit -m "edit files yet again" |
|
296 | $ hg commit -m "edit files yet again" | |
297 | Invoking status precommit hook |
|
297 | Invoking status precommit hook | |
298 | M large3 |
|
298 | M large3 | |
299 | M normal3 |
|
299 | M normal3 | |
300 | M sub/large4 |
|
300 | M sub/large4 | |
301 | M sub/normal4 |
|
301 | M sub/normal4 | |
302 | $ cat ../normal3 |
|
302 | $ cat ../normal3 | |
303 | normal33 |
|
303 | normal33 | |
304 | $ cat ../large3 |
|
304 | $ cat ../large3 | |
305 | large33 |
|
305 | large33 | |
306 | $ cat normal4 |
|
306 | $ cat normal4 | |
307 | normal44 |
|
307 | normal44 | |
308 | $ cat large4 |
|
308 | $ cat large4 | |
309 | large44 |
|
309 | large44 | |
310 |
|
310 | |||
311 | Committing standins is not allowed. |
|
311 | Committing standins is not allowed. | |
312 |
|
312 | |||
313 | $ cd .. |
|
313 | $ cd .. | |
314 | $ echo large3 > large3 |
|
314 | $ echo large3 > large3 | |
315 | $ hg commit .hglf/large3 -m "try to commit standin" |
|
315 | $ hg commit .hglf/large3 -m "try to commit standin" | |
316 | abort: file ".hglf/large3" is a largefile standin |
|
316 | abort: file ".hglf/large3" is a largefile standin | |
317 | (commit the largefile itself instead) |
|
317 | (commit the largefile itself instead) | |
318 | [255] |
|
318 | [255] | |
319 |
|
319 | |||
320 | Corner cases for adding largefiles. |
|
320 | Corner cases for adding largefiles. | |
321 |
|
321 | |||
322 | $ echo large5 > large5 |
|
322 | $ echo large5 > large5 | |
323 | $ hg add --large large5 |
|
323 | $ hg add --large large5 | |
324 | $ hg add --large large5 |
|
324 | $ hg add --large large5 | |
325 | large5 already a largefile |
|
325 | large5 already a largefile | |
326 | $ mkdir sub2 |
|
326 | $ mkdir sub2 | |
327 | $ echo large6 > sub2/large6 |
|
327 | $ echo large6 > sub2/large6 | |
328 | $ echo large7 > sub2/large7 |
|
328 | $ echo large7 > sub2/large7 | |
329 | $ hg add --large sub2 |
|
329 | $ hg add --large sub2 | |
330 | adding sub2/large6 as a largefile (glob) |
|
330 | adding sub2/large6 as a largefile (glob) | |
331 | adding sub2/large7 as a largefile (glob) |
|
331 | adding sub2/large7 as a largefile (glob) | |
332 | $ hg st |
|
332 | $ hg st | |
333 | M large3 |
|
333 | M large3 | |
334 | A large5 |
|
334 | A large5 | |
335 | A sub2/large6 |
|
335 | A sub2/large6 | |
336 | A sub2/large7 |
|
336 | A sub2/large7 | |
337 |
|
337 | |||
338 | Committing directories containing only largefiles. |
|
338 | Committing directories containing only largefiles. | |
339 |
|
339 | |||
340 | $ mkdir -p z/y/x/m |
|
340 | $ mkdir -p z/y/x/m | |
341 | $ touch z/y/x/m/large1 |
|
341 | $ touch z/y/x/m/large1 | |
342 | $ touch z/y/x/large2 |
|
342 | $ touch z/y/x/large2 | |
343 | $ hg add --large z/y/x/m/large1 z/y/x/large2 |
|
343 | $ hg add --large z/y/x/m/large1 z/y/x/large2 | |
344 | $ hg commit -m "Subdir with directory only containing largefiles" z |
|
344 | $ hg commit -m "Subdir with directory only containing largefiles" z | |
345 | Invoking status precommit hook |
|
345 | Invoking status precommit hook | |
346 | M large3 |
|
346 | M large3 | |
347 | A large5 |
|
347 | A large5 | |
348 | A sub2/large6 |
|
348 | A sub2/large6 | |
349 | A sub2/large7 |
|
349 | A sub2/large7 | |
350 | A z/y/x/large2 |
|
350 | A z/y/x/large2 | |
351 | A z/y/x/m/large1 |
|
351 | A z/y/x/m/large1 | |
352 |
|
352 | |||
353 | (and a bit of log testing) |
|
353 | (and a bit of log testing) | |
354 |
|
354 | |||
355 | $ hg log -T '{rev}\n' z/y/x/m/large1 |
|
355 | $ hg log -T '{rev}\n' z/y/x/m/large1 | |
356 | 7 |
|
356 | 7 | |
357 | $ hg log -T '{rev}\n' z/y/x/m # with only a largefile |
|
357 | $ hg log -T '{rev}\n' z/y/x/m # with only a largefile | |
358 | 7 |
|
358 | 7 | |
359 |
|
359 | |||
360 | $ hg rollback --quiet |
|
360 | $ hg rollback --quiet | |
361 | $ touch z/y/x/m/normal |
|
361 | $ touch z/y/x/m/normal | |
362 | $ hg add z/y/x/m/normal |
|
362 | $ hg add z/y/x/m/normal | |
363 | $ hg commit -m "Subdir with mixed contents" z |
|
363 | $ hg commit -m "Subdir with mixed contents" z | |
364 | Invoking status precommit hook |
|
364 | Invoking status precommit hook | |
365 | M large3 |
|
365 | M large3 | |
366 | A large5 |
|
366 | A large5 | |
367 | A sub2/large6 |
|
367 | A sub2/large6 | |
368 | A sub2/large7 |
|
368 | A sub2/large7 | |
369 | A z/y/x/large2 |
|
369 | A z/y/x/large2 | |
370 | A z/y/x/m/large1 |
|
370 | A z/y/x/m/large1 | |
371 | A z/y/x/m/normal |
|
371 | A z/y/x/m/normal | |
372 | $ hg st |
|
372 | $ hg st | |
373 | M large3 |
|
373 | M large3 | |
374 | A large5 |
|
374 | A large5 | |
375 | A sub2/large6 |
|
375 | A sub2/large6 | |
376 | A sub2/large7 |
|
376 | A sub2/large7 | |
377 | $ hg rollback --quiet |
|
377 | $ hg rollback --quiet | |
378 | $ hg revert z/y/x/large2 z/y/x/m/large1 |
|
378 | $ hg revert z/y/x/large2 z/y/x/m/large1 | |
379 | $ rm z/y/x/large2 z/y/x/m/large1 |
|
379 | $ rm z/y/x/large2 z/y/x/m/large1 | |
380 | $ hg commit -m "Subdir with normal contents" z |
|
380 | $ hg commit -m "Subdir with normal contents" z | |
381 | Invoking status precommit hook |
|
381 | Invoking status precommit hook | |
382 | M large3 |
|
382 | M large3 | |
383 | A large5 |
|
383 | A large5 | |
384 | A sub2/large6 |
|
384 | A sub2/large6 | |
385 | A sub2/large7 |
|
385 | A sub2/large7 | |
386 | A z/y/x/m/normal |
|
386 | A z/y/x/m/normal | |
387 | $ hg st |
|
387 | $ hg st | |
388 | M large3 |
|
388 | M large3 | |
389 | A large5 |
|
389 | A large5 | |
390 | A sub2/large6 |
|
390 | A sub2/large6 | |
391 | A sub2/large7 |
|
391 | A sub2/large7 | |
392 | $ hg rollback --quiet |
|
392 | $ hg rollback --quiet | |
393 | $ hg revert --quiet z |
|
393 | $ hg revert --quiet z | |
394 | $ hg commit -m "Empty subdir" z |
|
394 | $ hg commit -m "Empty subdir" z | |
395 | abort: z: no match under directory! |
|
395 | abort: z: no match under directory! | |
396 | [255] |
|
396 | [255] | |
397 | $ rm -rf z |
|
397 | $ rm -rf z | |
398 | $ hg ci -m "standin" .hglf |
|
398 | $ hg ci -m "standin" .hglf | |
399 | abort: file ".hglf" is a largefile standin |
|
399 | abort: file ".hglf" is a largefile standin | |
400 | (commit the largefile itself instead) |
|
400 | (commit the largefile itself instead) | |
401 | [255] |
|
401 | [255] | |
402 |
|
402 | |||
403 | Test "hg status" with combination of 'file pattern' and 'directory |
|
403 | Test "hg status" with combination of 'file pattern' and 'directory | |
404 | pattern' for largefiles: |
|
404 | pattern' for largefiles: | |
405 |
|
405 | |||
406 | $ hg status sub2/large6 sub2 |
|
406 | $ hg status sub2/large6 sub2 | |
407 | A sub2/large6 |
|
407 | A sub2/large6 | |
408 | A sub2/large7 |
|
408 | A sub2/large7 | |
409 |
|
409 | |||
410 | Config settings (pattern **.dat, minsize 2 MB) are respected. |
|
410 | Config settings (pattern **.dat, minsize 2 MB) are respected. | |
411 |
|
411 | |||
412 | $ echo testdata > test.dat |
|
412 | $ echo testdata > test.dat | |
413 | $ dd bs=1k count=2k if=/dev/zero of=reallylarge > /dev/null 2> /dev/null |
|
413 | $ dd bs=1k count=2k if=/dev/zero of=reallylarge > /dev/null 2> /dev/null | |
414 | $ hg add |
|
414 | $ hg add | |
415 | adding reallylarge as a largefile |
|
415 | adding reallylarge as a largefile | |
416 | adding test.dat as a largefile |
|
416 | adding test.dat as a largefile | |
417 |
|
417 | |||
418 | Test that minsize and --lfsize handle float values; |
|
418 | Test that minsize and --lfsize handle float values; | |
419 | also tests that --lfsize overrides largefiles.minsize. |
|
419 | also tests that --lfsize overrides largefiles.minsize. | |
420 | (0.250 MB = 256 kB = 262144 B) |
|
420 | (0.250 MB = 256 kB = 262144 B) | |
421 |
|
421 | |||
422 | $ dd if=/dev/zero of=ratherlarge bs=1024 count=256 > /dev/null 2> /dev/null |
|
422 | $ dd if=/dev/zero of=ratherlarge bs=1024 count=256 > /dev/null 2> /dev/null | |
423 | $ dd if=/dev/zero of=medium bs=1024 count=128 > /dev/null 2> /dev/null |
|
423 | $ dd if=/dev/zero of=medium bs=1024 count=128 > /dev/null 2> /dev/null | |
424 | $ hg --config largefiles.minsize=.25 add |
|
424 | $ hg --config largefiles.minsize=.25 add | |
425 | adding ratherlarge as a largefile |
|
425 | adding ratherlarge as a largefile | |
426 | adding medium |
|
426 | adding medium | |
427 | $ hg forget medium |
|
427 | $ hg forget medium | |
428 | $ hg --config largefiles.minsize=.25 add --lfsize=.125 |
|
428 | $ hg --config largefiles.minsize=.25 add --lfsize=.125 | |
429 | adding medium as a largefile |
|
429 | adding medium as a largefile | |
430 | $ dd if=/dev/zero of=notlarge bs=1024 count=127 > /dev/null 2> /dev/null |
|
430 | $ dd if=/dev/zero of=notlarge bs=1024 count=127 > /dev/null 2> /dev/null | |
431 | $ hg --config largefiles.minsize=.25 add --lfsize=.125 |
|
431 | $ hg --config largefiles.minsize=.25 add --lfsize=.125 | |
432 | adding notlarge |
|
432 | adding notlarge | |
433 | $ hg forget notlarge |
|
433 | $ hg forget notlarge | |
434 |
|
434 | |||
435 | Test forget on largefiles. |
|
435 | Test forget on largefiles. | |
436 |
|
436 | |||
437 | $ hg forget large3 large5 test.dat reallylarge ratherlarge medium |
|
437 | $ hg forget large3 large5 test.dat reallylarge ratherlarge medium | |
438 | $ hg commit -m "add/edit more largefiles" |
|
438 | $ hg commit -m "add/edit more largefiles" | |
439 | Invoking status precommit hook |
|
439 | Invoking status precommit hook | |
440 | A sub2/large6 |
|
440 | A sub2/large6 | |
441 | A sub2/large7 |
|
441 | A sub2/large7 | |
442 | R large3 |
|
442 | R large3 | |
443 | ? large5 |
|
443 | ? large5 | |
444 | ? medium |
|
444 | ? medium | |
445 | ? notlarge |
|
445 | ? notlarge | |
446 | ? ratherlarge |
|
446 | ? ratherlarge | |
447 | ? reallylarge |
|
447 | ? reallylarge | |
448 | ? test.dat |
|
448 | ? test.dat | |
449 | $ hg st |
|
449 | $ hg st | |
450 | ? large3 |
|
450 | ? large3 | |
451 | ? large5 |
|
451 | ? large5 | |
452 | ? medium |
|
452 | ? medium | |
453 | ? notlarge |
|
453 | ? notlarge | |
454 | ? ratherlarge |
|
454 | ? ratherlarge | |
455 | ? reallylarge |
|
455 | ? reallylarge | |
456 | ? test.dat |
|
456 | ? test.dat | |
457 |
|
457 | |||
458 | Purge with largefiles: verify that largefiles are still in the working |
|
458 | Purge with largefiles: verify that largefiles are still in the working | |
459 | dir after a purge. |
|
459 | dir after a purge. | |
460 |
|
460 | |||
461 | $ hg purge --all |
|
461 | $ hg purge --all | |
462 | $ cat sub/large4 |
|
462 | $ cat sub/large4 | |
463 | large44 |
|
463 | large44 | |
464 | $ cat sub2/large6 |
|
464 | $ cat sub2/large6 | |
465 | large6 |
|
465 | large6 | |
466 | $ cat sub2/large7 |
|
466 | $ cat sub2/large7 | |
467 | large7 |
|
467 | large7 | |
468 |
|
468 | |||
469 | Test addremove: verify that files that should be added as largefiles are added as |
|
469 | Test addremove: verify that files that should be added as largefiles are added as | |
470 | such and that already-existing largefiles are not added as normal files by |
|
470 | such and that already-existing largefiles are not added as normal files by | |
471 | accident. |
|
471 | accident. | |
472 |
|
472 | |||
473 | $ rm normal3 |
|
473 | $ rm normal3 | |
474 | $ rm sub/large4 |
|
474 | $ rm sub/large4 | |
475 | $ echo "testing addremove with patterns" > testaddremove.dat |
|
475 | $ echo "testing addremove with patterns" > testaddremove.dat | |
476 | $ echo "normaladdremove" > normaladdremove |
|
476 | $ echo "normaladdremove" > normaladdremove | |
477 | $ hg addremove |
|
477 | $ hg addremove | |
478 | removing sub/large4 |
|
478 | removing sub/large4 | |
479 | adding testaddremove.dat as a largefile |
|
479 | adding testaddremove.dat as a largefile | |
480 | removing normal3 |
|
480 | removing normal3 | |
481 | adding normaladdremove |
|
481 | adding normaladdremove | |
482 |
|
482 | |||
483 | Test addremove with -R |
|
483 | Test addremove with -R | |
484 |
|
484 | |||
485 | $ hg up -C |
|
485 | $ hg up -C | |
486 | getting changed largefiles |
|
486 | getting changed largefiles | |
487 | 1 largefiles updated, 0 removed |
|
487 | 1 largefiles updated, 0 removed | |
488 | 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 | |
489 | $ rm normal3 |
|
489 | $ rm normal3 | |
490 | $ rm sub/large4 |
|
490 | $ rm sub/large4 | |
491 | $ echo "testing addremove with patterns" > testaddremove.dat |
|
491 | $ echo "testing addremove with patterns" > testaddremove.dat | |
492 | $ echo "normaladdremove" > normaladdremove |
|
492 | $ echo "normaladdremove" > normaladdremove | |
493 | $ cd .. |
|
493 | $ cd .. | |
494 | $ hg -R a -v addremove |
|
494 | $ hg -R a -v addremove | |
495 | removing sub/large4 |
|
495 | removing sub/large4 | |
496 |
adding |
|
496 | adding testaddremove.dat as a largefile | |
497 | removing normal3 |
|
497 | removing normal3 | |
498 | adding normaladdremove |
|
498 | adding normaladdremove | |
499 | $ cd a |
|
499 | $ cd a | |
500 |
|
500 | |||
501 | Test 3364 |
|
501 | Test 3364 | |
502 | $ hg clone . ../addrm |
|
502 | $ hg clone . ../addrm | |
503 | updating to branch default |
|
503 | updating to branch default | |
504 | getting changed largefiles |
|
504 | getting changed largefiles | |
505 | 3 largefiles updated, 0 removed |
|
505 | 3 largefiles updated, 0 removed | |
506 | 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 | |
507 | $ cd ../addrm |
|
507 | $ cd ../addrm | |
508 | $ cat >> .hg/hgrc <<EOF |
|
508 | $ cat >> .hg/hgrc <<EOF | |
509 | > [hooks] |
|
509 | > [hooks] | |
510 | > post-commit.stat=sh -c "echo \\"Invoking status postcommit hook\\"; hg status -A" |
|
510 | > post-commit.stat=sh -c "echo \\"Invoking status postcommit hook\\"; hg status -A" | |
511 | > EOF |
|
511 | > EOF | |
512 | $ touch foo |
|
512 | $ touch foo | |
513 | $ hg add --large foo |
|
513 | $ hg add --large foo | |
514 | $ hg ci -m "add foo" |
|
514 | $ hg ci -m "add foo" | |
515 | Invoking status precommit hook |
|
515 | Invoking status precommit hook | |
516 | A foo |
|
516 | A foo | |
517 | Invoking status postcommit hook |
|
517 | Invoking status postcommit hook | |
518 | C foo |
|
518 | C foo | |
519 | C normal3 |
|
519 | C normal3 | |
520 | C sub/large4 |
|
520 | C sub/large4 | |
521 | C sub/normal4 |
|
521 | C sub/normal4 | |
522 | C sub2/large6 |
|
522 | C sub2/large6 | |
523 | C sub2/large7 |
|
523 | C sub2/large7 | |
524 | $ rm foo |
|
524 | $ rm foo | |
525 | $ hg st |
|
525 | $ hg st | |
526 | ! foo |
|
526 | ! foo | |
527 | hmm.. no precommit invoked, but there is a postcommit?? |
|
527 | hmm.. no precommit invoked, but there is a postcommit?? | |
528 | $ hg ci -m "will not checkin" |
|
528 | $ hg ci -m "will not checkin" | |
529 | nothing changed |
|
529 | nothing changed | |
530 | Invoking status postcommit hook |
|
530 | Invoking status postcommit hook | |
531 | ! foo |
|
531 | ! foo | |
532 | C normal3 |
|
532 | C normal3 | |
533 | C sub/large4 |
|
533 | C sub/large4 | |
534 | C sub/normal4 |
|
534 | C sub/normal4 | |
535 | C sub2/large6 |
|
535 | C sub2/large6 | |
536 | C sub2/large7 |
|
536 | C sub2/large7 | |
537 | [1] |
|
537 | [1] | |
538 | $ hg addremove |
|
538 | $ hg addremove | |
539 | removing foo |
|
539 | removing foo | |
540 | $ hg st |
|
540 | $ hg st | |
541 | R foo |
|
541 | R foo | |
542 | $ hg ci -m "used to say nothing changed" |
|
542 | $ hg ci -m "used to say nothing changed" | |
543 | Invoking status precommit hook |
|
543 | Invoking status precommit hook | |
544 | R foo |
|
544 | R foo | |
545 | Invoking status postcommit hook |
|
545 | Invoking status postcommit hook | |
546 | C normal3 |
|
546 | C normal3 | |
547 | C sub/large4 |
|
547 | C sub/large4 | |
548 | C sub/normal4 |
|
548 | C sub/normal4 | |
549 | C sub2/large6 |
|
549 | C sub2/large6 | |
550 | C sub2/large7 |
|
550 | C sub2/large7 | |
551 | $ hg st |
|
551 | $ hg st | |
552 |
|
552 | |||
553 | Test 3507 (both normal files and largefiles were a problem) |
|
553 | Test 3507 (both normal files and largefiles were a problem) | |
554 |
|
554 | |||
555 | $ touch normal |
|
555 | $ touch normal | |
556 | $ touch large |
|
556 | $ touch large | |
557 | $ hg add normal |
|
557 | $ hg add normal | |
558 | $ hg add --large large |
|
558 | $ hg add --large large | |
559 | $ hg ci -m "added" |
|
559 | $ hg ci -m "added" | |
560 | Invoking status precommit hook |
|
560 | Invoking status precommit hook | |
561 | A large |
|
561 | A large | |
562 | A normal |
|
562 | A normal | |
563 | Invoking status postcommit hook |
|
563 | Invoking status postcommit hook | |
564 | C large |
|
564 | C large | |
565 | C normal |
|
565 | C normal | |
566 | C normal3 |
|
566 | C normal3 | |
567 | C sub/large4 |
|
567 | C sub/large4 | |
568 | C sub/normal4 |
|
568 | C sub/normal4 | |
569 | C sub2/large6 |
|
569 | C sub2/large6 | |
570 | C sub2/large7 |
|
570 | C sub2/large7 | |
571 | $ hg remove normal |
|
571 | $ hg remove normal | |
572 | $ hg addremove --traceback |
|
572 | $ hg addremove --traceback | |
573 | $ hg ci -m "addremoved normal" |
|
573 | $ hg ci -m "addremoved normal" | |
574 | Invoking status precommit hook |
|
574 | Invoking status precommit hook | |
575 | R normal |
|
575 | R normal | |
576 | Invoking status postcommit hook |
|
576 | Invoking status postcommit hook | |
577 | C large |
|
577 | C large | |
578 | C normal3 |
|
578 | C normal3 | |
579 | C sub/large4 |
|
579 | C sub/large4 | |
580 | C sub/normal4 |
|
580 | C sub/normal4 | |
581 | C sub2/large6 |
|
581 | C sub2/large6 | |
582 | C sub2/large7 |
|
582 | C sub2/large7 | |
583 | $ hg up -C '.^' |
|
583 | $ hg up -C '.^' | |
584 | getting changed largefiles |
|
584 | getting changed largefiles | |
585 | 0 largefiles updated, 0 removed |
|
585 | 0 largefiles updated, 0 removed | |
586 | 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 | |
587 | $ hg remove large |
|
587 | $ hg remove large | |
588 | $ hg addremove --traceback |
|
588 | $ hg addremove --traceback | |
589 | $ hg ci -m "removed large" |
|
589 | $ hg ci -m "removed large" | |
590 | Invoking status precommit hook |
|
590 | Invoking status precommit hook | |
591 | R large |
|
591 | R large | |
592 | created new head |
|
592 | created new head | |
593 | Invoking status postcommit hook |
|
593 | Invoking status postcommit hook | |
594 | C normal |
|
594 | C normal | |
595 | C normal3 |
|
595 | C normal3 | |
596 | C sub/large4 |
|
596 | C sub/large4 | |
597 | C sub/normal4 |
|
597 | C sub/normal4 | |
598 | C sub2/large6 |
|
598 | C sub2/large6 | |
599 | C sub2/large7 |
|
599 | C sub2/large7 | |
600 |
|
600 | |||
601 | Test commit -A (issue3542) |
|
601 | Test commit -A (issue3542) | |
602 | $ echo large8 > large8 |
|
602 | $ echo large8 > large8 | |
603 | $ hg add --large large8 |
|
603 | $ hg add --large large8 | |
604 | $ hg ci -Am 'this used to add large8 as normal and commit both' |
|
604 | $ hg ci -Am 'this used to add large8 as normal and commit both' | |
605 | Invoking status precommit hook |
|
605 | Invoking status precommit hook | |
606 | A large8 |
|
606 | A large8 | |
607 | Invoking status postcommit hook |
|
607 | Invoking status postcommit hook | |
608 | C large8 |
|
608 | C large8 | |
609 | C normal |
|
609 | C normal | |
610 | C normal3 |
|
610 | C normal3 | |
611 | C sub/large4 |
|
611 | C sub/large4 | |
612 | C sub/normal4 |
|
612 | C sub/normal4 | |
613 | C sub2/large6 |
|
613 | C sub2/large6 | |
614 | C sub2/large7 |
|
614 | C sub2/large7 | |
615 | $ rm large8 |
|
615 | $ rm large8 | |
616 | $ hg ci -Am 'this used to not notice the rm' |
|
616 | $ hg ci -Am 'this used to not notice the rm' | |
617 | removing large8 |
|
617 | removing large8 | |
618 | Invoking status precommit hook |
|
618 | Invoking status precommit hook | |
619 | R large8 |
|
619 | R large8 | |
620 | Invoking status postcommit hook |
|
620 | Invoking status postcommit hook | |
621 | C normal |
|
621 | C normal | |
622 | C normal3 |
|
622 | C normal3 | |
623 | C sub/large4 |
|
623 | C sub/large4 | |
624 | C sub/normal4 |
|
624 | C sub/normal4 | |
625 | C sub2/large6 |
|
625 | C sub2/large6 | |
626 | C sub2/large7 |
|
626 | C sub2/large7 | |
627 |
|
627 | |||
628 | Test that a standin can't be added as a large file |
|
628 | Test that a standin can't be added as a large file | |
629 |
|
629 | |||
630 | $ touch large |
|
630 | $ touch large | |
631 | $ hg add --large large |
|
631 | $ hg add --large large | |
632 | $ hg ci -m "add" |
|
632 | $ hg ci -m "add" | |
633 | Invoking status precommit hook |
|
633 | Invoking status precommit hook | |
634 | A large |
|
634 | A large | |
635 | Invoking status postcommit hook |
|
635 | Invoking status postcommit hook | |
636 | C large |
|
636 | C large | |
637 | C normal |
|
637 | C normal | |
638 | C normal3 |
|
638 | C normal3 | |
639 | C sub/large4 |
|
639 | C sub/large4 | |
640 | C sub/normal4 |
|
640 | C sub/normal4 | |
641 | C sub2/large6 |
|
641 | C sub2/large6 | |
642 | C sub2/large7 |
|
642 | C sub2/large7 | |
643 | $ hg remove large |
|
643 | $ hg remove large | |
644 | $ touch large |
|
644 | $ touch large | |
645 | $ hg addremove --config largefiles.patterns=**large --traceback |
|
645 | $ hg addremove --config largefiles.patterns=**large --traceback | |
646 | adding large as a largefile |
|
646 | adding large as a largefile | |
647 |
|
647 | |||
648 | Test that outgoing --large works (with revsets too) |
|
648 | Test that outgoing --large works (with revsets too) | |
649 | $ hg outgoing --rev '.^' --large |
|
649 | $ hg outgoing --rev '.^' --large | |
650 | comparing with $TESTTMP/a (glob) |
|
650 | comparing with $TESTTMP/a (glob) | |
651 | searching for changes |
|
651 | searching for changes | |
652 | changeset: 8:c02fd3b77ec4 |
|
652 | changeset: 8:c02fd3b77ec4 | |
653 | user: test |
|
653 | user: test | |
654 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
654 | date: Thu Jan 01 00:00:00 1970 +0000 | |
655 | summary: add foo |
|
655 | summary: add foo | |
656 |
|
656 | |||
657 | changeset: 9:289dd08c9bbb |
|
657 | changeset: 9:289dd08c9bbb | |
658 | user: test |
|
658 | user: test | |
659 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
659 | date: Thu Jan 01 00:00:00 1970 +0000 | |
660 | summary: used to say nothing changed |
|
660 | summary: used to say nothing changed | |
661 |
|
661 | |||
662 | changeset: 10:34f23ac6ac12 |
|
662 | changeset: 10:34f23ac6ac12 | |
663 | user: test |
|
663 | user: test | |
664 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
664 | date: Thu Jan 01 00:00:00 1970 +0000 | |
665 | summary: added |
|
665 | summary: added | |
666 |
|
666 | |||
667 | changeset: 12:710c1b2f523c |
|
667 | changeset: 12:710c1b2f523c | |
668 | parent: 10:34f23ac6ac12 |
|
668 | parent: 10:34f23ac6ac12 | |
669 | user: test |
|
669 | user: test | |
670 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
670 | date: Thu Jan 01 00:00:00 1970 +0000 | |
671 | summary: removed large |
|
671 | summary: removed large | |
672 |
|
672 | |||
673 | changeset: 13:0a3e75774479 |
|
673 | changeset: 13:0a3e75774479 | |
674 | user: test |
|
674 | user: test | |
675 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
675 | date: Thu Jan 01 00:00:00 1970 +0000 | |
676 | summary: this used to add large8 as normal and commit both |
|
676 | summary: this used to add large8 as normal and commit both | |
677 |
|
677 | |||
678 | changeset: 14:84f3d378175c |
|
678 | changeset: 14:84f3d378175c | |
679 | user: test |
|
679 | user: test | |
680 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
680 | date: Thu Jan 01 00:00:00 1970 +0000 | |
681 | summary: this used to not notice the rm |
|
681 | summary: this used to not notice the rm | |
682 |
|
682 | |||
683 | largefiles to upload (1 entities): |
|
683 | largefiles to upload (1 entities): | |
684 | large8 |
|
684 | large8 | |
685 |
|
685 | |||
686 | $ cd ../a |
|
686 | $ cd ../a | |
687 |
|
687 | |||
688 | Clone a largefiles repo. |
|
688 | Clone a largefiles repo. | |
689 |
|
689 | |||
690 | $ hg clone . ../b |
|
690 | $ hg clone . ../b | |
691 | updating to branch default |
|
691 | updating to branch default | |
692 | getting changed largefiles |
|
692 | getting changed largefiles | |
693 | 3 largefiles updated, 0 removed |
|
693 | 3 largefiles updated, 0 removed | |
694 | 5 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
694 | 5 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
695 | $ cd ../b |
|
695 | $ cd ../b | |
696 | $ hg log --template '{rev}:{node|short} {desc|firstline}\n' |
|
696 | $ hg log --template '{rev}:{node|short} {desc|firstline}\n' | |
697 | 7:daea875e9014 add/edit more largefiles |
|
697 | 7:daea875e9014 add/edit more largefiles | |
698 | 6:4355d653f84f edit files yet again |
|
698 | 6:4355d653f84f edit files yet again | |
699 | 5:9d5af5072dbd edit files again |
|
699 | 5:9d5af5072dbd edit files again | |
700 | 4:74c02385b94c move files |
|
700 | 4:74c02385b94c move files | |
701 | 3:9e8fbc4bce62 copy files |
|
701 | 3:9e8fbc4bce62 copy files | |
702 | 2:51a0ae4d5864 remove files |
|
702 | 2:51a0ae4d5864 remove files | |
703 | 1:ce8896473775 edit files |
|
703 | 1:ce8896473775 edit files | |
704 | 0:30d30fe6a5be add files |
|
704 | 0:30d30fe6a5be add files | |
705 | $ cat normal3 |
|
705 | $ cat normal3 | |
706 | normal33 |
|
706 | normal33 | |
707 |
|
707 | |||
708 | Test graph log |
|
708 | Test graph log | |
709 |
|
709 | |||
710 | $ hg log -G --template '{rev}:{node|short} {desc|firstline}\n' |
|
710 | $ hg log -G --template '{rev}:{node|short} {desc|firstline}\n' | |
711 | @ 7:daea875e9014 add/edit more largefiles |
|
711 | @ 7:daea875e9014 add/edit more largefiles | |
712 | | |
|
712 | | | |
713 | o 6:4355d653f84f edit files yet again |
|
713 | o 6:4355d653f84f edit files yet again | |
714 | | |
|
714 | | | |
715 | o 5:9d5af5072dbd edit files again |
|
715 | o 5:9d5af5072dbd edit files again | |
716 | | |
|
716 | | | |
717 | o 4:74c02385b94c move files |
|
717 | o 4:74c02385b94c move files | |
718 | | |
|
718 | | | |
719 | o 3:9e8fbc4bce62 copy files |
|
719 | o 3:9e8fbc4bce62 copy files | |
720 | | |
|
720 | | | |
721 | o 2:51a0ae4d5864 remove files |
|
721 | o 2:51a0ae4d5864 remove files | |
722 | | |
|
722 | | | |
723 | o 1:ce8896473775 edit files |
|
723 | o 1:ce8896473775 edit files | |
724 | | |
|
724 | | | |
725 | o 0:30d30fe6a5be add files |
|
725 | o 0:30d30fe6a5be add files | |
726 |
|
726 | |||
727 |
|
727 | |||
728 | Test log with --patch |
|
728 | Test log with --patch | |
729 |
|
729 | |||
730 | $ hg log --patch -r 6::7 |
|
730 | $ hg log --patch -r 6::7 | |
731 | changeset: 6:4355d653f84f |
|
731 | changeset: 6:4355d653f84f | |
732 | user: test |
|
732 | user: test | |
733 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
733 | date: Thu Jan 01 00:00:00 1970 +0000 | |
734 | summary: edit files yet again |
|
734 | summary: edit files yet again | |
735 |
|
735 | |||
736 | diff -r 9d5af5072dbd -r 4355d653f84f .hglf/large3 |
|
736 | diff -r 9d5af5072dbd -r 4355d653f84f .hglf/large3 | |
737 | --- a/.hglf/large3 Thu Jan 01 00:00:00 1970 +0000 |
|
737 | --- a/.hglf/large3 Thu Jan 01 00:00:00 1970 +0000 | |
738 | +++ b/.hglf/large3 Thu Jan 01 00:00:00 1970 +0000 |
|
738 | +++ b/.hglf/large3 Thu Jan 01 00:00:00 1970 +0000 | |
739 | @@ -1,1 +1,1 @@ |
|
739 | @@ -1,1 +1,1 @@ | |
740 | -baaf12afde9d8d67f25dab6dced0d2bf77dba47c |
|
740 | -baaf12afde9d8d67f25dab6dced0d2bf77dba47c | |
741 | +7838695e10da2bb75ac1156565f40a2595fa2fa0 |
|
741 | +7838695e10da2bb75ac1156565f40a2595fa2fa0 | |
742 | diff -r 9d5af5072dbd -r 4355d653f84f .hglf/sub/large4 |
|
742 | diff -r 9d5af5072dbd -r 4355d653f84f .hglf/sub/large4 | |
743 | --- a/.hglf/sub/large4 Thu Jan 01 00:00:00 1970 +0000 |
|
743 | --- a/.hglf/sub/large4 Thu Jan 01 00:00:00 1970 +0000 | |
744 | +++ b/.hglf/sub/large4 Thu Jan 01 00:00:00 1970 +0000 |
|
744 | +++ b/.hglf/sub/large4 Thu Jan 01 00:00:00 1970 +0000 | |
745 | @@ -1,1 +1,1 @@ |
|
745 | @@ -1,1 +1,1 @@ | |
746 | -aeb2210d19f02886dde00dac279729a48471e2f9 |
|
746 | -aeb2210d19f02886dde00dac279729a48471e2f9 | |
747 | +971fb41e78fea4f8e0ba5244784239371cb00591 |
|
747 | +971fb41e78fea4f8e0ba5244784239371cb00591 | |
748 | diff -r 9d5af5072dbd -r 4355d653f84f normal3 |
|
748 | diff -r 9d5af5072dbd -r 4355d653f84f normal3 | |
749 | --- a/normal3 Thu Jan 01 00:00:00 1970 +0000 |
|
749 | --- a/normal3 Thu Jan 01 00:00:00 1970 +0000 | |
750 | +++ b/normal3 Thu Jan 01 00:00:00 1970 +0000 |
|
750 | +++ b/normal3 Thu Jan 01 00:00:00 1970 +0000 | |
751 | @@ -1,1 +1,1 @@ |
|
751 | @@ -1,1 +1,1 @@ | |
752 | -normal3 |
|
752 | -normal3 | |
753 | +normal33 |
|
753 | +normal33 | |
754 | diff -r 9d5af5072dbd -r 4355d653f84f sub/normal4 |
|
754 | diff -r 9d5af5072dbd -r 4355d653f84f sub/normal4 | |
755 | --- a/sub/normal4 Thu Jan 01 00:00:00 1970 +0000 |
|
755 | --- a/sub/normal4 Thu Jan 01 00:00:00 1970 +0000 | |
756 | +++ b/sub/normal4 Thu Jan 01 00:00:00 1970 +0000 |
|
756 | +++ b/sub/normal4 Thu Jan 01 00:00:00 1970 +0000 | |
757 | @@ -1,1 +1,1 @@ |
|
757 | @@ -1,1 +1,1 @@ | |
758 | -normal4 |
|
758 | -normal4 | |
759 | +normal44 |
|
759 | +normal44 | |
760 |
|
760 | |||
761 | changeset: 7:daea875e9014 |
|
761 | changeset: 7:daea875e9014 | |
762 | tag: tip |
|
762 | tag: tip | |
763 | user: test |
|
763 | user: test | |
764 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
764 | date: Thu Jan 01 00:00:00 1970 +0000 | |
765 | summary: add/edit more largefiles |
|
765 | summary: add/edit more largefiles | |
766 |
|
766 | |||
767 | diff -r 4355d653f84f -r daea875e9014 .hglf/large3 |
|
767 | diff -r 4355d653f84f -r daea875e9014 .hglf/large3 | |
768 | --- a/.hglf/large3 Thu Jan 01 00:00:00 1970 +0000 |
|
768 | --- a/.hglf/large3 Thu Jan 01 00:00:00 1970 +0000 | |
769 | +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 |
|
769 | +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 | |
770 | @@ -1,1 +0,0 @@ |
|
770 | @@ -1,1 +0,0 @@ | |
771 | -7838695e10da2bb75ac1156565f40a2595fa2fa0 |
|
771 | -7838695e10da2bb75ac1156565f40a2595fa2fa0 | |
772 | diff -r 4355d653f84f -r daea875e9014 .hglf/sub2/large6 |
|
772 | diff -r 4355d653f84f -r daea875e9014 .hglf/sub2/large6 | |
773 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 |
|
773 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 | |
774 | +++ b/.hglf/sub2/large6 Thu Jan 01 00:00:00 1970 +0000 |
|
774 | +++ b/.hglf/sub2/large6 Thu Jan 01 00:00:00 1970 +0000 | |
775 | @@ -0,0 +1,1 @@ |
|
775 | @@ -0,0 +1,1 @@ | |
776 | +0d6d75887db61b2c7e6c74b5dd8fc6ad50c0cc30 |
|
776 | +0d6d75887db61b2c7e6c74b5dd8fc6ad50c0cc30 | |
777 | diff -r 4355d653f84f -r daea875e9014 .hglf/sub2/large7 |
|
777 | diff -r 4355d653f84f -r daea875e9014 .hglf/sub2/large7 | |
778 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 |
|
778 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 | |
779 | +++ b/.hglf/sub2/large7 Thu Jan 01 00:00:00 1970 +0000 |
|
779 | +++ b/.hglf/sub2/large7 Thu Jan 01 00:00:00 1970 +0000 | |
780 | @@ -0,0 +1,1 @@ |
|
780 | @@ -0,0 +1,1 @@ | |
781 | +bb3151689acb10f0c3125c560d5e63df914bc1af |
|
781 | +bb3151689acb10f0c3125c560d5e63df914bc1af | |
782 |
|
782 | |||
783 |
|
783 | |||
784 | $ hg log --patch -r 6::7 sub/ |
|
784 | $ hg log --patch -r 6::7 sub/ | |
785 | changeset: 6:4355d653f84f |
|
785 | changeset: 6:4355d653f84f | |
786 | user: test |
|
786 | user: test | |
787 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
787 | date: Thu Jan 01 00:00:00 1970 +0000 | |
788 | summary: edit files yet again |
|
788 | summary: edit files yet again | |
789 |
|
789 | |||
790 | diff -r 9d5af5072dbd -r 4355d653f84f .hglf/sub/large4 |
|
790 | diff -r 9d5af5072dbd -r 4355d653f84f .hglf/sub/large4 | |
791 | --- a/.hglf/sub/large4 Thu Jan 01 00:00:00 1970 +0000 |
|
791 | --- a/.hglf/sub/large4 Thu Jan 01 00:00:00 1970 +0000 | |
792 | +++ b/.hglf/sub/large4 Thu Jan 01 00:00:00 1970 +0000 |
|
792 | +++ b/.hglf/sub/large4 Thu Jan 01 00:00:00 1970 +0000 | |
793 | @@ -1,1 +1,1 @@ |
|
793 | @@ -1,1 +1,1 @@ | |
794 | -aeb2210d19f02886dde00dac279729a48471e2f9 |
|
794 | -aeb2210d19f02886dde00dac279729a48471e2f9 | |
795 | +971fb41e78fea4f8e0ba5244784239371cb00591 |
|
795 | +971fb41e78fea4f8e0ba5244784239371cb00591 | |
796 | diff -r 9d5af5072dbd -r 4355d653f84f sub/normal4 |
|
796 | diff -r 9d5af5072dbd -r 4355d653f84f sub/normal4 | |
797 | --- a/sub/normal4 Thu Jan 01 00:00:00 1970 +0000 |
|
797 | --- a/sub/normal4 Thu Jan 01 00:00:00 1970 +0000 | |
798 | +++ b/sub/normal4 Thu Jan 01 00:00:00 1970 +0000 |
|
798 | +++ b/sub/normal4 Thu Jan 01 00:00:00 1970 +0000 | |
799 | @@ -1,1 +1,1 @@ |
|
799 | @@ -1,1 +1,1 @@ | |
800 | -normal4 |
|
800 | -normal4 | |
801 | +normal44 |
|
801 | +normal44 | |
802 |
|
802 | |||
803 |
|
803 | |||
804 | log with both --follow and --patch |
|
804 | log with both --follow and --patch | |
805 |
|
805 | |||
806 | $ hg log --follow --patch --limit 2 |
|
806 | $ hg log --follow --patch --limit 2 | |
807 | changeset: 7:daea875e9014 |
|
807 | changeset: 7:daea875e9014 | |
808 | tag: tip |
|
808 | tag: tip | |
809 | user: test |
|
809 | user: test | |
810 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
810 | date: Thu Jan 01 00:00:00 1970 +0000 | |
811 | summary: add/edit more largefiles |
|
811 | summary: add/edit more largefiles | |
812 |
|
812 | |||
813 | diff -r 4355d653f84f -r daea875e9014 .hglf/large3 |
|
813 | diff -r 4355d653f84f -r daea875e9014 .hglf/large3 | |
814 | --- a/.hglf/large3 Thu Jan 01 00:00:00 1970 +0000 |
|
814 | --- a/.hglf/large3 Thu Jan 01 00:00:00 1970 +0000 | |
815 | +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 |
|
815 | +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 | |
816 | @@ -1,1 +0,0 @@ |
|
816 | @@ -1,1 +0,0 @@ | |
817 | -7838695e10da2bb75ac1156565f40a2595fa2fa0 |
|
817 | -7838695e10da2bb75ac1156565f40a2595fa2fa0 | |
818 | diff -r 4355d653f84f -r daea875e9014 .hglf/sub2/large6 |
|
818 | diff -r 4355d653f84f -r daea875e9014 .hglf/sub2/large6 | |
819 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 |
|
819 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 | |
820 | +++ b/.hglf/sub2/large6 Thu Jan 01 00:00:00 1970 +0000 |
|
820 | +++ b/.hglf/sub2/large6 Thu Jan 01 00:00:00 1970 +0000 | |
821 | @@ -0,0 +1,1 @@ |
|
821 | @@ -0,0 +1,1 @@ | |
822 | +0d6d75887db61b2c7e6c74b5dd8fc6ad50c0cc30 |
|
822 | +0d6d75887db61b2c7e6c74b5dd8fc6ad50c0cc30 | |
823 | diff -r 4355d653f84f -r daea875e9014 .hglf/sub2/large7 |
|
823 | diff -r 4355d653f84f -r daea875e9014 .hglf/sub2/large7 | |
824 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 |
|
824 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 | |
825 | +++ b/.hglf/sub2/large7 Thu Jan 01 00:00:00 1970 +0000 |
|
825 | +++ b/.hglf/sub2/large7 Thu Jan 01 00:00:00 1970 +0000 | |
826 | @@ -0,0 +1,1 @@ |
|
826 | @@ -0,0 +1,1 @@ | |
827 | +bb3151689acb10f0c3125c560d5e63df914bc1af |
|
827 | +bb3151689acb10f0c3125c560d5e63df914bc1af | |
828 |
|
828 | |||
829 | changeset: 6:4355d653f84f |
|
829 | changeset: 6:4355d653f84f | |
830 | user: test |
|
830 | user: test | |
831 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
831 | date: Thu Jan 01 00:00:00 1970 +0000 | |
832 | summary: edit files yet again |
|
832 | summary: edit files yet again | |
833 |
|
833 | |||
834 | diff -r 9d5af5072dbd -r 4355d653f84f .hglf/large3 |
|
834 | diff -r 9d5af5072dbd -r 4355d653f84f .hglf/large3 | |
835 | --- a/.hglf/large3 Thu Jan 01 00:00:00 1970 +0000 |
|
835 | --- a/.hglf/large3 Thu Jan 01 00:00:00 1970 +0000 | |
836 | +++ b/.hglf/large3 Thu Jan 01 00:00:00 1970 +0000 |
|
836 | +++ b/.hglf/large3 Thu Jan 01 00:00:00 1970 +0000 | |
837 | @@ -1,1 +1,1 @@ |
|
837 | @@ -1,1 +1,1 @@ | |
838 | -baaf12afde9d8d67f25dab6dced0d2bf77dba47c |
|
838 | -baaf12afde9d8d67f25dab6dced0d2bf77dba47c | |
839 | +7838695e10da2bb75ac1156565f40a2595fa2fa0 |
|
839 | +7838695e10da2bb75ac1156565f40a2595fa2fa0 | |
840 | diff -r 9d5af5072dbd -r 4355d653f84f .hglf/sub/large4 |
|
840 | diff -r 9d5af5072dbd -r 4355d653f84f .hglf/sub/large4 | |
841 | --- a/.hglf/sub/large4 Thu Jan 01 00:00:00 1970 +0000 |
|
841 | --- a/.hglf/sub/large4 Thu Jan 01 00:00:00 1970 +0000 | |
842 | +++ b/.hglf/sub/large4 Thu Jan 01 00:00:00 1970 +0000 |
|
842 | +++ b/.hglf/sub/large4 Thu Jan 01 00:00:00 1970 +0000 | |
843 | @@ -1,1 +1,1 @@ |
|
843 | @@ -1,1 +1,1 @@ | |
844 | -aeb2210d19f02886dde00dac279729a48471e2f9 |
|
844 | -aeb2210d19f02886dde00dac279729a48471e2f9 | |
845 | +971fb41e78fea4f8e0ba5244784239371cb00591 |
|
845 | +971fb41e78fea4f8e0ba5244784239371cb00591 | |
846 | diff -r 9d5af5072dbd -r 4355d653f84f normal3 |
|
846 | diff -r 9d5af5072dbd -r 4355d653f84f normal3 | |
847 | --- a/normal3 Thu Jan 01 00:00:00 1970 +0000 |
|
847 | --- a/normal3 Thu Jan 01 00:00:00 1970 +0000 | |
848 | +++ b/normal3 Thu Jan 01 00:00:00 1970 +0000 |
|
848 | +++ b/normal3 Thu Jan 01 00:00:00 1970 +0000 | |
849 | @@ -1,1 +1,1 @@ |
|
849 | @@ -1,1 +1,1 @@ | |
850 | -normal3 |
|
850 | -normal3 | |
851 | +normal33 |
|
851 | +normal33 | |
852 | diff -r 9d5af5072dbd -r 4355d653f84f sub/normal4 |
|
852 | diff -r 9d5af5072dbd -r 4355d653f84f sub/normal4 | |
853 | --- a/sub/normal4 Thu Jan 01 00:00:00 1970 +0000 |
|
853 | --- a/sub/normal4 Thu Jan 01 00:00:00 1970 +0000 | |
854 | +++ b/sub/normal4 Thu Jan 01 00:00:00 1970 +0000 |
|
854 | +++ b/sub/normal4 Thu Jan 01 00:00:00 1970 +0000 | |
855 | @@ -1,1 +1,1 @@ |
|
855 | @@ -1,1 +1,1 @@ | |
856 | -normal4 |
|
856 | -normal4 | |
857 | +normal44 |
|
857 | +normal44 | |
858 |
|
858 | |||
859 | $ hg log --follow --patch sub/large4 |
|
859 | $ hg log --follow --patch sub/large4 | |
860 | changeset: 6:4355d653f84f |
|
860 | changeset: 6:4355d653f84f | |
861 | user: test |
|
861 | user: test | |
862 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
862 | date: Thu Jan 01 00:00:00 1970 +0000 | |
863 | summary: edit files yet again |
|
863 | summary: edit files yet again | |
864 |
|
864 | |||
865 | diff -r 9d5af5072dbd -r 4355d653f84f .hglf/sub/large4 |
|
865 | diff -r 9d5af5072dbd -r 4355d653f84f .hglf/sub/large4 | |
866 | --- a/.hglf/sub/large4 Thu Jan 01 00:00:00 1970 +0000 |
|
866 | --- a/.hglf/sub/large4 Thu Jan 01 00:00:00 1970 +0000 | |
867 | +++ b/.hglf/sub/large4 Thu Jan 01 00:00:00 1970 +0000 |
|
867 | +++ b/.hglf/sub/large4 Thu Jan 01 00:00:00 1970 +0000 | |
868 | @@ -1,1 +1,1 @@ |
|
868 | @@ -1,1 +1,1 @@ | |
869 | -aeb2210d19f02886dde00dac279729a48471e2f9 |
|
869 | -aeb2210d19f02886dde00dac279729a48471e2f9 | |
870 | +971fb41e78fea4f8e0ba5244784239371cb00591 |
|
870 | +971fb41e78fea4f8e0ba5244784239371cb00591 | |
871 |
|
871 | |||
872 | changeset: 5:9d5af5072dbd |
|
872 | changeset: 5:9d5af5072dbd | |
873 | user: test |
|
873 | user: test | |
874 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
874 | date: Thu Jan 01 00:00:00 1970 +0000 | |
875 | summary: edit files again |
|
875 | summary: edit files again | |
876 |
|
876 | |||
877 | diff -r 74c02385b94c -r 9d5af5072dbd .hglf/sub/large4 |
|
877 | diff -r 74c02385b94c -r 9d5af5072dbd .hglf/sub/large4 | |
878 | --- a/.hglf/sub/large4 Thu Jan 01 00:00:00 1970 +0000 |
|
878 | --- a/.hglf/sub/large4 Thu Jan 01 00:00:00 1970 +0000 | |
879 | +++ b/.hglf/sub/large4 Thu Jan 01 00:00:00 1970 +0000 |
|
879 | +++ b/.hglf/sub/large4 Thu Jan 01 00:00:00 1970 +0000 | |
880 | @@ -1,1 +1,1 @@ |
|
880 | @@ -1,1 +1,1 @@ | |
881 | -eb7338044dc27f9bc59b8dd5a246b065ead7a9c4 |
|
881 | -eb7338044dc27f9bc59b8dd5a246b065ead7a9c4 | |
882 | +aeb2210d19f02886dde00dac279729a48471e2f9 |
|
882 | +aeb2210d19f02886dde00dac279729a48471e2f9 | |
883 |
|
883 | |||
884 | changeset: 4:74c02385b94c |
|
884 | changeset: 4:74c02385b94c | |
885 | user: test |
|
885 | user: test | |
886 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
886 | date: Thu Jan 01 00:00:00 1970 +0000 | |
887 | summary: move files |
|
887 | summary: move files | |
888 |
|
888 | |||
889 | diff -r 9e8fbc4bce62 -r 74c02385b94c .hglf/sub/large4 |
|
889 | diff -r 9e8fbc4bce62 -r 74c02385b94c .hglf/sub/large4 | |
890 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 |
|
890 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 | |
891 | +++ b/.hglf/sub/large4 Thu Jan 01 00:00:00 1970 +0000 |
|
891 | +++ b/.hglf/sub/large4 Thu Jan 01 00:00:00 1970 +0000 | |
892 | @@ -0,0 +1,1 @@ |
|
892 | @@ -0,0 +1,1 @@ | |
893 | +eb7338044dc27f9bc59b8dd5a246b065ead7a9c4 |
|
893 | +eb7338044dc27f9bc59b8dd5a246b065ead7a9c4 | |
894 |
|
894 | |||
895 | changeset: 1:ce8896473775 |
|
895 | changeset: 1:ce8896473775 | |
896 | user: test |
|
896 | user: test | |
897 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
897 | date: Thu Jan 01 00:00:00 1970 +0000 | |
898 | summary: edit files |
|
898 | summary: edit files | |
899 |
|
899 | |||
900 | diff -r 30d30fe6a5be -r ce8896473775 .hglf/sub/large2 |
|
900 | diff -r 30d30fe6a5be -r ce8896473775 .hglf/sub/large2 | |
901 | --- a/.hglf/sub/large2 Thu Jan 01 00:00:00 1970 +0000 |
|
901 | --- a/.hglf/sub/large2 Thu Jan 01 00:00:00 1970 +0000 | |
902 | +++ b/.hglf/sub/large2 Thu Jan 01 00:00:00 1970 +0000 |
|
902 | +++ b/.hglf/sub/large2 Thu Jan 01 00:00:00 1970 +0000 | |
903 | @@ -1,1 +1,1 @@ |
|
903 | @@ -1,1 +1,1 @@ | |
904 | -1deebade43c8c498a3c8daddac0244dc55d1331d |
|
904 | -1deebade43c8c498a3c8daddac0244dc55d1331d | |
905 | +eb7338044dc27f9bc59b8dd5a246b065ead7a9c4 |
|
905 | +eb7338044dc27f9bc59b8dd5a246b065ead7a9c4 | |
906 |
|
906 | |||
907 | changeset: 0:30d30fe6a5be |
|
907 | changeset: 0:30d30fe6a5be | |
908 | user: test |
|
908 | user: test | |
909 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
909 | date: Thu Jan 01 00:00:00 1970 +0000 | |
910 | summary: add files |
|
910 | summary: add files | |
911 |
|
911 | |||
912 | diff -r 000000000000 -r 30d30fe6a5be .hglf/sub/large2 |
|
912 | diff -r 000000000000 -r 30d30fe6a5be .hglf/sub/large2 | |
913 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 |
|
913 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 | |
914 | +++ b/.hglf/sub/large2 Thu Jan 01 00:00:00 1970 +0000 |
|
914 | +++ b/.hglf/sub/large2 Thu Jan 01 00:00:00 1970 +0000 | |
915 | @@ -0,0 +1,1 @@ |
|
915 | @@ -0,0 +1,1 @@ | |
916 | +1deebade43c8c498a3c8daddac0244dc55d1331d |
|
916 | +1deebade43c8c498a3c8daddac0244dc55d1331d | |
917 |
|
917 | |||
918 | $ cat sub/normal4 |
|
918 | $ cat sub/normal4 | |
919 | normal44 |
|
919 | normal44 | |
920 | $ cat sub/large4 |
|
920 | $ cat sub/large4 | |
921 | large44 |
|
921 | large44 | |
922 | $ cat sub2/large6 |
|
922 | $ cat sub2/large6 | |
923 | large6 |
|
923 | large6 | |
924 | $ cat sub2/large7 |
|
924 | $ cat sub2/large7 | |
925 | large7 |
|
925 | large7 | |
926 | $ hg log -qf sub2/large7 |
|
926 | $ hg log -qf sub2/large7 | |
927 | 7:daea875e9014 |
|
927 | 7:daea875e9014 | |
928 | $ hg log -Gqf sub2/large7 |
|
928 | $ hg log -Gqf sub2/large7 | |
929 | @ 7:daea875e9014 |
|
929 | @ 7:daea875e9014 | |
930 | | |
|
930 | | | |
931 | $ cd .. |
|
931 | $ cd .. | |
932 |
|
932 | |||
933 | Test log from outside repo |
|
933 | Test log from outside repo | |
934 |
|
934 | |||
935 | $ hg log b/sub -T '{rev}:{node|short} {desc|firstline}\n' |
|
935 | $ hg log b/sub -T '{rev}:{node|short} {desc|firstline}\n' | |
936 | 6:4355d653f84f edit files yet again |
|
936 | 6:4355d653f84f edit files yet again | |
937 | 5:9d5af5072dbd edit files again |
|
937 | 5:9d5af5072dbd edit files again | |
938 | 4:74c02385b94c move files |
|
938 | 4:74c02385b94c move files | |
939 | 1:ce8896473775 edit files |
|
939 | 1:ce8896473775 edit files | |
940 | 0:30d30fe6a5be add files |
|
940 | 0:30d30fe6a5be add files | |
941 |
|
941 | |||
942 | Test clone at revision |
|
942 | Test clone at revision | |
943 |
|
943 | |||
944 | $ hg clone a -r 3 c |
|
944 | $ hg clone a -r 3 c | |
945 | adding changesets |
|
945 | adding changesets | |
946 | adding manifests |
|
946 | adding manifests | |
947 | adding file changes |
|
947 | adding file changes | |
948 | added 4 changesets with 10 changes to 4 files |
|
948 | added 4 changesets with 10 changes to 4 files | |
949 | updating to branch default |
|
949 | updating to branch default | |
950 | getting changed largefiles |
|
950 | getting changed largefiles | |
951 | 2 largefiles updated, 0 removed |
|
951 | 2 largefiles updated, 0 removed | |
952 | 4 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
952 | 4 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
953 | $ cd c |
|
953 | $ cd c | |
954 | $ hg log --template '{rev}:{node|short} {desc|firstline}\n' |
|
954 | $ hg log --template '{rev}:{node|short} {desc|firstline}\n' | |
955 | 3:9e8fbc4bce62 copy files |
|
955 | 3:9e8fbc4bce62 copy files | |
956 | 2:51a0ae4d5864 remove files |
|
956 | 2:51a0ae4d5864 remove files | |
957 | 1:ce8896473775 edit files |
|
957 | 1:ce8896473775 edit files | |
958 | 0:30d30fe6a5be add files |
|
958 | 0:30d30fe6a5be add files | |
959 | $ cat normal1 |
|
959 | $ cat normal1 | |
960 | normal22 |
|
960 | normal22 | |
961 | $ cat large1 |
|
961 | $ cat large1 | |
962 | large22 |
|
962 | large22 | |
963 | $ cat sub/normal2 |
|
963 | $ cat sub/normal2 | |
964 | normal22 |
|
964 | normal22 | |
965 | $ cat sub/large2 |
|
965 | $ cat sub/large2 | |
966 | large22 |
|
966 | large22 | |
967 |
|
967 | |||
968 | Old revisions of a clone have correct largefiles content (this also |
|
968 | Old revisions of a clone have correct largefiles content (this also | |
969 | tests update). |
|
969 | tests update). | |
970 |
|
970 | |||
971 | $ hg update -r 1 |
|
971 | $ hg update -r 1 | |
972 | getting changed largefiles |
|
972 | getting changed largefiles | |
973 | 1 largefiles updated, 0 removed |
|
973 | 1 largefiles updated, 0 removed | |
974 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
974 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
975 | $ cat large1 |
|
975 | $ cat large1 | |
976 | large11 |
|
976 | large11 | |
977 | $ cat sub/large2 |
|
977 | $ cat sub/large2 | |
978 | large22 |
|
978 | large22 | |
979 | $ cd .. |
|
979 | $ cd .. | |
980 |
|
980 | |||
981 | Test cloning with --all-largefiles flag |
|
981 | Test cloning with --all-largefiles flag | |
982 |
|
982 | |||
983 | $ rm "${USERCACHE}"/* |
|
983 | $ rm "${USERCACHE}"/* | |
984 | $ hg clone --all-largefiles a a-backup |
|
984 | $ hg clone --all-largefiles a a-backup | |
985 | updating to branch default |
|
985 | updating to branch default | |
986 | getting changed largefiles |
|
986 | getting changed largefiles | |
987 | 3 largefiles updated, 0 removed |
|
987 | 3 largefiles updated, 0 removed | |
988 | 5 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
988 | 5 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
989 | 8 additional largefiles cached |
|
989 | 8 additional largefiles cached | |
990 |
|
990 | |||
991 | $ rm "${USERCACHE}"/* |
|
991 | $ rm "${USERCACHE}"/* | |
992 | $ hg clone --all-largefiles -u 0 a a-clone0 |
|
992 | $ hg clone --all-largefiles -u 0 a a-clone0 | |
993 | updating to branch default |
|
993 | updating to branch default | |
994 | getting changed largefiles |
|
994 | getting changed largefiles | |
995 | 2 largefiles updated, 0 removed |
|
995 | 2 largefiles updated, 0 removed | |
996 | 4 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
996 | 4 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
997 | 9 additional largefiles cached |
|
997 | 9 additional largefiles cached | |
998 | $ hg -R a-clone0 sum |
|
998 | $ hg -R a-clone0 sum | |
999 | parent: 0:30d30fe6a5be |
|
999 | parent: 0:30d30fe6a5be | |
1000 | add files |
|
1000 | add files | |
1001 | branch: default |
|
1001 | branch: default | |
1002 | commit: (clean) |
|
1002 | commit: (clean) | |
1003 | update: 7 new changesets (update) |
|
1003 | update: 7 new changesets (update) | |
1004 |
|
1004 | |||
1005 | $ rm "${USERCACHE}"/* |
|
1005 | $ rm "${USERCACHE}"/* | |
1006 | $ hg clone --all-largefiles -u 1 a a-clone1 |
|
1006 | $ hg clone --all-largefiles -u 1 a a-clone1 | |
1007 | updating to branch default |
|
1007 | updating to branch default | |
1008 | getting changed largefiles |
|
1008 | getting changed largefiles | |
1009 | 2 largefiles updated, 0 removed |
|
1009 | 2 largefiles updated, 0 removed | |
1010 | 4 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
1010 | 4 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
1011 | 8 additional largefiles cached |
|
1011 | 8 additional largefiles cached | |
1012 | $ hg -R a-clone1 verify --large --lfa --lfc |
|
1012 | $ hg -R a-clone1 verify --large --lfa --lfc | |
1013 | checking changesets |
|
1013 | checking changesets | |
1014 | checking manifests |
|
1014 | checking manifests | |
1015 | crosschecking files in changesets and manifests |
|
1015 | crosschecking files in changesets and manifests | |
1016 | checking files |
|
1016 | checking files | |
1017 | 10 files, 8 changesets, 24 total revisions |
|
1017 | 10 files, 8 changesets, 24 total revisions | |
1018 | searching 8 changesets for largefiles |
|
1018 | searching 8 changesets for largefiles | |
1019 | verified contents of 13 revisions of 6 largefiles |
|
1019 | verified contents of 13 revisions of 6 largefiles | |
1020 | $ hg -R a-clone1 sum |
|
1020 | $ hg -R a-clone1 sum | |
1021 | parent: 1:ce8896473775 |
|
1021 | parent: 1:ce8896473775 | |
1022 | edit files |
|
1022 | edit files | |
1023 | branch: default |
|
1023 | branch: default | |
1024 | commit: (clean) |
|
1024 | commit: (clean) | |
1025 | update: 6 new changesets (update) |
|
1025 | update: 6 new changesets (update) | |
1026 |
|
1026 | |||
1027 | $ rm "${USERCACHE}"/* |
|
1027 | $ rm "${USERCACHE}"/* | |
1028 | $ hg clone --all-largefiles -U a a-clone-u |
|
1028 | $ hg clone --all-largefiles -U a a-clone-u | |
1029 | 11 additional largefiles cached |
|
1029 | 11 additional largefiles cached | |
1030 | $ hg -R a-clone-u sum |
|
1030 | $ hg -R a-clone-u sum | |
1031 | parent: -1:000000000000 (no revision checked out) |
|
1031 | parent: -1:000000000000 (no revision checked out) | |
1032 | branch: default |
|
1032 | branch: default | |
1033 | commit: (clean) |
|
1033 | commit: (clean) | |
1034 | update: 8 new changesets (update) |
|
1034 | update: 8 new changesets (update) | |
1035 |
|
1035 | |||
1036 | Show computed destination directory: |
|
1036 | Show computed destination directory: | |
1037 |
|
1037 | |||
1038 | $ mkdir xyz |
|
1038 | $ mkdir xyz | |
1039 | $ cd xyz |
|
1039 | $ cd xyz | |
1040 | $ hg clone ../a |
|
1040 | $ hg clone ../a | |
1041 | destination directory: a |
|
1041 | destination directory: a | |
1042 | updating to branch default |
|
1042 | updating to branch default | |
1043 | getting changed largefiles |
|
1043 | getting changed largefiles | |
1044 | 3 largefiles updated, 0 removed |
|
1044 | 3 largefiles updated, 0 removed | |
1045 | 5 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
1045 | 5 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
1046 | $ cd .. |
|
1046 | $ cd .. | |
1047 |
|
1047 | |||
1048 | Clone URL without path: |
|
1048 | Clone URL without path: | |
1049 |
|
1049 | |||
1050 | $ hg clone file:// |
|
1050 | $ hg clone file:// | |
1051 | abort: repository / not found! |
|
1051 | abort: repository / not found! | |
1052 | [255] |
|
1052 | [255] | |
1053 |
|
1053 | |||
1054 | Ensure base clone command argument validation |
|
1054 | Ensure base clone command argument validation | |
1055 |
|
1055 | |||
1056 | $ hg clone -U -u 0 a a-clone-failure |
|
1056 | $ hg clone -U -u 0 a a-clone-failure | |
1057 | abort: cannot specify both --noupdate and --updaterev |
|
1057 | abort: cannot specify both --noupdate and --updaterev | |
1058 | [255] |
|
1058 | [255] | |
1059 |
|
1059 | |||
1060 | $ hg clone --all-largefiles a ssh://localhost/a |
|
1060 | $ hg clone --all-largefiles a ssh://localhost/a | |
1061 | abort: --all-largefiles is incompatible with non-local destination ssh://localhost/a |
|
1061 | abort: --all-largefiles is incompatible with non-local destination ssh://localhost/a | |
1062 | [255] |
|
1062 | [255] | |
1063 |
|
1063 | |||
1064 | Test pulling with --all-largefiles flag. Also test that the largefiles are |
|
1064 | Test pulling with --all-largefiles flag. Also test that the largefiles are | |
1065 | downloaded from 'default' instead of 'default-push' when no source is specified |
|
1065 | downloaded from 'default' instead of 'default-push' when no source is specified | |
1066 | (issue3584) |
|
1066 | (issue3584) | |
1067 |
|
1067 | |||
1068 | $ rm -Rf a-backup |
|
1068 | $ rm -Rf a-backup | |
1069 | $ hg clone -r 1 a a-backup |
|
1069 | $ hg clone -r 1 a a-backup | |
1070 | adding changesets |
|
1070 | adding changesets | |
1071 | adding manifests |
|
1071 | adding manifests | |
1072 | adding file changes |
|
1072 | adding file changes | |
1073 | added 2 changesets with 8 changes to 4 files |
|
1073 | added 2 changesets with 8 changes to 4 files | |
1074 | updating to branch default |
|
1074 | updating to branch default | |
1075 | getting changed largefiles |
|
1075 | getting changed largefiles | |
1076 | 2 largefiles updated, 0 removed |
|
1076 | 2 largefiles updated, 0 removed | |
1077 | 4 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
1077 | 4 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
1078 | $ rm "${USERCACHE}"/* |
|
1078 | $ rm "${USERCACHE}"/* | |
1079 | $ cd a-backup |
|
1079 | $ cd a-backup | |
1080 | $ hg pull --all-largefiles --config paths.default-push=bogus/path |
|
1080 | $ hg pull --all-largefiles --config paths.default-push=bogus/path | |
1081 | pulling from $TESTTMP/a (glob) |
|
1081 | pulling from $TESTTMP/a (glob) | |
1082 | searching for changes |
|
1082 | searching for changes | |
1083 | adding changesets |
|
1083 | adding changesets | |
1084 | adding manifests |
|
1084 | adding manifests | |
1085 | adding file changes |
|
1085 | adding file changes | |
1086 | added 6 changesets with 16 changes to 8 files |
|
1086 | added 6 changesets with 16 changes to 8 files | |
1087 | (run 'hg update' to get a working copy) |
|
1087 | (run 'hg update' to get a working copy) | |
1088 | 6 largefiles cached |
|
1088 | 6 largefiles cached | |
1089 |
|
1089 | |||
1090 | redo pull with --lfrev and check it pulls largefiles for the right revs |
|
1090 | redo pull with --lfrev and check it pulls largefiles for the right revs | |
1091 |
|
1091 | |||
1092 | $ hg rollback |
|
1092 | $ hg rollback | |
1093 | repository tip rolled back to revision 1 (undo pull) |
|
1093 | repository tip rolled back to revision 1 (undo pull) | |
1094 | $ hg pull -v --lfrev 'heads(pulled())+min(pulled())' |
|
1094 | $ hg pull -v --lfrev 'heads(pulled())+min(pulled())' | |
1095 | pulling from $TESTTMP/a (glob) |
|
1095 | pulling from $TESTTMP/a (glob) | |
1096 | searching for changes |
|
1096 | searching for changes | |
1097 | all local heads known remotely |
|
1097 | all local heads known remotely | |
1098 | 6 changesets found |
|
1098 | 6 changesets found | |
1099 | adding changesets |
|
1099 | adding changesets | |
1100 | uncompressed size of bundle content: |
|
1100 | uncompressed size of bundle content: | |
1101 | 1213 (changelog) |
|
1101 | 1213 (changelog) | |
1102 | 1479 (manifests) |
|
1102 | 1479 (manifests) | |
1103 | 234 .hglf/large1 |
|
1103 | 234 .hglf/large1 | |
1104 | 504 .hglf/large3 |
|
1104 | 504 .hglf/large3 | |
1105 | 512 .hglf/sub/large4 |
|
1105 | 512 .hglf/sub/large4 | |
1106 | 162 .hglf/sub2/large6 |
|
1106 | 162 .hglf/sub2/large6 | |
1107 | 162 .hglf/sub2/large7 |
|
1107 | 162 .hglf/sub2/large7 | |
1108 | 192 normal1 |
|
1108 | 192 normal1 | |
1109 | 397 normal3 |
|
1109 | 397 normal3 | |
1110 | 405 sub/normal4 |
|
1110 | 405 sub/normal4 | |
1111 | adding manifests |
|
1111 | adding manifests | |
1112 | adding file changes |
|
1112 | adding file changes | |
1113 | added 6 changesets with 16 changes to 8 files |
|
1113 | added 6 changesets with 16 changes to 8 files | |
1114 | calling hook changegroup.lfiles: hgext.largefiles.reposetup.checkrequireslfiles |
|
1114 | calling hook changegroup.lfiles: hgext.largefiles.reposetup.checkrequireslfiles | |
1115 | (run 'hg update' to get a working copy) |
|
1115 | (run 'hg update' to get a working copy) | |
1116 | pulling largefiles for revision 7 |
|
1116 | pulling largefiles for revision 7 | |
1117 | found 971fb41e78fea4f8e0ba5244784239371cb00591 in store |
|
1117 | found 971fb41e78fea4f8e0ba5244784239371cb00591 in store | |
1118 | found 0d6d75887db61b2c7e6c74b5dd8fc6ad50c0cc30 in store |
|
1118 | found 0d6d75887db61b2c7e6c74b5dd8fc6ad50c0cc30 in store | |
1119 | found bb3151689acb10f0c3125c560d5e63df914bc1af in store |
|
1119 | found bb3151689acb10f0c3125c560d5e63df914bc1af in store | |
1120 | pulling largefiles for revision 2 |
|
1120 | pulling largefiles for revision 2 | |
1121 | found eb7338044dc27f9bc59b8dd5a246b065ead7a9c4 in store |
|
1121 | found eb7338044dc27f9bc59b8dd5a246b065ead7a9c4 in store | |
1122 | 0 largefiles cached |
|
1122 | 0 largefiles cached | |
1123 |
|
1123 | |||
1124 | lfpull |
|
1124 | lfpull | |
1125 |
|
1125 | |||
1126 | $ hg lfpull -r : --config largefiles.usercache=usercache-lfpull |
|
1126 | $ hg lfpull -r : --config largefiles.usercache=usercache-lfpull | |
1127 | 2 largefiles cached |
|
1127 | 2 largefiles cached | |
1128 | $ hg lfpull -v -r 4+2 --config largefiles.usercache=usercache-lfpull |
|
1128 | $ hg lfpull -v -r 4+2 --config largefiles.usercache=usercache-lfpull | |
1129 | pulling largefiles for revision 4 |
|
1129 | pulling largefiles for revision 4 | |
1130 | found eb7338044dc27f9bc59b8dd5a246b065ead7a9c4 in store |
|
1130 | found eb7338044dc27f9bc59b8dd5a246b065ead7a9c4 in store | |
1131 | found eb7338044dc27f9bc59b8dd5a246b065ead7a9c4 in store |
|
1131 | found eb7338044dc27f9bc59b8dd5a246b065ead7a9c4 in store | |
1132 | pulling largefiles for revision 2 |
|
1132 | pulling largefiles for revision 2 | |
1133 | found eb7338044dc27f9bc59b8dd5a246b065ead7a9c4 in store |
|
1133 | found eb7338044dc27f9bc59b8dd5a246b065ead7a9c4 in store | |
1134 | 0 largefiles cached |
|
1134 | 0 largefiles cached | |
1135 |
|
1135 | |||
1136 | $ ls usercache-lfpull/* | sort |
|
1136 | $ ls usercache-lfpull/* | sort | |
1137 | usercache-lfpull/1deebade43c8c498a3c8daddac0244dc55d1331d |
|
1137 | usercache-lfpull/1deebade43c8c498a3c8daddac0244dc55d1331d | |
1138 | usercache-lfpull/4669e532d5b2c093a78eca010077e708a071bb64 |
|
1138 | usercache-lfpull/4669e532d5b2c093a78eca010077e708a071bb64 | |
1139 |
|
1139 | |||
1140 | $ cd .. |
|
1140 | $ cd .. | |
1141 |
|
1141 | |||
1142 | Rebasing between two repositories does not revert largefiles to old |
|
1142 | Rebasing between two repositories does not revert largefiles to old | |
1143 | revisions (this was a very bad bug that took a lot of work to fix). |
|
1143 | revisions (this was a very bad bug that took a lot of work to fix). | |
1144 |
|
1144 | |||
1145 | $ hg clone a d |
|
1145 | $ hg clone a d | |
1146 | updating to branch default |
|
1146 | updating to branch default | |
1147 | getting changed largefiles |
|
1147 | getting changed largefiles | |
1148 | 3 largefiles updated, 0 removed |
|
1148 | 3 largefiles updated, 0 removed | |
1149 | 5 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
1149 | 5 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
1150 | $ cd b |
|
1150 | $ cd b | |
1151 | $ echo large4-modified > sub/large4 |
|
1151 | $ echo large4-modified > sub/large4 | |
1152 | $ echo normal3-modified > normal3 |
|
1152 | $ echo normal3-modified > normal3 | |
1153 | $ hg commit -m "modify normal file and largefile in repo b" |
|
1153 | $ hg commit -m "modify normal file and largefile in repo b" | |
1154 | Invoking status precommit hook |
|
1154 | Invoking status precommit hook | |
1155 | M normal3 |
|
1155 | M normal3 | |
1156 | M sub/large4 |
|
1156 | M sub/large4 | |
1157 | $ cd ../d |
|
1157 | $ cd ../d | |
1158 | $ echo large6-modified > sub2/large6 |
|
1158 | $ echo large6-modified > sub2/large6 | |
1159 | $ echo normal4-modified > sub/normal4 |
|
1159 | $ echo normal4-modified > sub/normal4 | |
1160 | $ hg commit -m "modify normal file largefile in repo d" |
|
1160 | $ hg commit -m "modify normal file largefile in repo d" | |
1161 | Invoking status precommit hook |
|
1161 | Invoking status precommit hook | |
1162 | M sub/normal4 |
|
1162 | M sub/normal4 | |
1163 | M sub2/large6 |
|
1163 | M sub2/large6 | |
1164 | $ cd .. |
|
1164 | $ cd .. | |
1165 | $ hg clone d e |
|
1165 | $ hg clone d e | |
1166 | updating to branch default |
|
1166 | updating to branch default | |
1167 | getting changed largefiles |
|
1167 | getting changed largefiles | |
1168 | 3 largefiles updated, 0 removed |
|
1168 | 3 largefiles updated, 0 removed | |
1169 | 5 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
1169 | 5 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
1170 | $ cd d |
|
1170 | $ cd d | |
1171 |
|
1171 | |||
1172 | More rebase testing, but also test that the largefiles are downloaded from |
|
1172 | More rebase testing, but also test that the largefiles are downloaded from | |
1173 | 'default-push' when no source is specified (issue3584). (The largefile from the |
|
1173 | 'default-push' when no source is specified (issue3584). (The largefile from the | |
1174 | pulled revision is however not downloaded but found in the local cache.) |
|
1174 | pulled revision is however not downloaded but found in the local cache.) | |
1175 | Largefiles are fetched for the new pulled revision, not for existing revisions, |
|
1175 | Largefiles are fetched for the new pulled revision, not for existing revisions, | |
1176 | rebased or not. |
|
1176 | rebased or not. | |
1177 |
|
1177 | |||
1178 | $ [ ! -f .hg/largefiles/e166e74c7303192238d60af5a9c4ce9bef0b7928 ] |
|
1178 | $ [ ! -f .hg/largefiles/e166e74c7303192238d60af5a9c4ce9bef0b7928 ] | |
1179 | $ hg pull --rebase --all-largefiles --config paths.default-push=bogus/path --config paths.default=../b |
|
1179 | $ hg pull --rebase --all-largefiles --config paths.default-push=bogus/path --config paths.default=../b | |
1180 | pulling from $TESTTMP/b (glob) |
|
1180 | pulling from $TESTTMP/b (glob) | |
1181 | searching for changes |
|
1181 | searching for changes | |
1182 | adding changesets |
|
1182 | adding changesets | |
1183 | adding manifests |
|
1183 | adding manifests | |
1184 | adding file changes |
|
1184 | adding file changes | |
1185 | added 1 changesets with 2 changes to 2 files (+1 heads) |
|
1185 | added 1 changesets with 2 changes to 2 files (+1 heads) | |
1186 | 0 largefiles cached |
|
1186 | 0 largefiles cached | |
1187 | rebasing 8:f574fb32bb45 "modify normal file largefile in repo d" |
|
1187 | rebasing 8:f574fb32bb45 "modify normal file largefile in repo d" | |
1188 | Invoking status precommit hook |
|
1188 | Invoking status precommit hook | |
1189 | M sub/normal4 |
|
1189 | M sub/normal4 | |
1190 | M sub2/large6 |
|
1190 | M sub2/large6 | |
1191 | saved backup bundle to $TESTTMP/d/.hg/strip-backup/f574fb32bb45-backup.hg (glob) |
|
1191 | saved backup bundle to $TESTTMP/d/.hg/strip-backup/f574fb32bb45-backup.hg (glob) | |
1192 | $ [ -f .hg/largefiles/e166e74c7303192238d60af5a9c4ce9bef0b7928 ] |
|
1192 | $ [ -f .hg/largefiles/e166e74c7303192238d60af5a9c4ce9bef0b7928 ] | |
1193 | $ hg log --template '{rev}:{node|short} {desc|firstline}\n' |
|
1193 | $ hg log --template '{rev}:{node|short} {desc|firstline}\n' | |
1194 | 9:598410d3eb9a modify normal file largefile in repo d |
|
1194 | 9:598410d3eb9a modify normal file largefile in repo d | |
1195 | 8:a381d2c8c80e modify normal file and largefile in repo b |
|
1195 | 8:a381d2c8c80e modify normal file and largefile in repo b | |
1196 | 7:daea875e9014 add/edit more largefiles |
|
1196 | 7:daea875e9014 add/edit more largefiles | |
1197 | 6:4355d653f84f edit files yet again |
|
1197 | 6:4355d653f84f edit files yet again | |
1198 | 5:9d5af5072dbd edit files again |
|
1198 | 5:9d5af5072dbd edit files again | |
1199 | 4:74c02385b94c move files |
|
1199 | 4:74c02385b94c move files | |
1200 | 3:9e8fbc4bce62 copy files |
|
1200 | 3:9e8fbc4bce62 copy files | |
1201 | 2:51a0ae4d5864 remove files |
|
1201 | 2:51a0ae4d5864 remove files | |
1202 | 1:ce8896473775 edit files |
|
1202 | 1:ce8896473775 edit files | |
1203 | 0:30d30fe6a5be add files |
|
1203 | 0:30d30fe6a5be add files | |
1204 | $ hg log -G --template '{rev}:{node|short} {desc|firstline}\n' |
|
1204 | $ hg log -G --template '{rev}:{node|short} {desc|firstline}\n' | |
1205 | @ 9:598410d3eb9a modify normal file largefile in repo d |
|
1205 | @ 9:598410d3eb9a modify normal file largefile in repo d | |
1206 | | |
|
1206 | | | |
1207 | o 8:a381d2c8c80e modify normal file and largefile in repo b |
|
1207 | o 8:a381d2c8c80e modify normal file and largefile in repo b | |
1208 | | |
|
1208 | | | |
1209 | o 7:daea875e9014 add/edit more largefiles |
|
1209 | o 7:daea875e9014 add/edit more largefiles | |
1210 | | |
|
1210 | | | |
1211 | o 6:4355d653f84f edit files yet again |
|
1211 | o 6:4355d653f84f edit files yet again | |
1212 | | |
|
1212 | | | |
1213 | o 5:9d5af5072dbd edit files again |
|
1213 | o 5:9d5af5072dbd edit files again | |
1214 | | |
|
1214 | | | |
1215 | o 4:74c02385b94c move files |
|
1215 | o 4:74c02385b94c move files | |
1216 | | |
|
1216 | | | |
1217 | o 3:9e8fbc4bce62 copy files |
|
1217 | o 3:9e8fbc4bce62 copy files | |
1218 | | |
|
1218 | | | |
1219 | o 2:51a0ae4d5864 remove files |
|
1219 | o 2:51a0ae4d5864 remove files | |
1220 | | |
|
1220 | | | |
1221 | o 1:ce8896473775 edit files |
|
1221 | o 1:ce8896473775 edit files | |
1222 | | |
|
1222 | | | |
1223 | o 0:30d30fe6a5be add files |
|
1223 | o 0:30d30fe6a5be add files | |
1224 |
|
1224 | |||
1225 | $ cat normal3 |
|
1225 | $ cat normal3 | |
1226 | normal3-modified |
|
1226 | normal3-modified | |
1227 | $ cat sub/normal4 |
|
1227 | $ cat sub/normal4 | |
1228 | normal4-modified |
|
1228 | normal4-modified | |
1229 | $ cat sub/large4 |
|
1229 | $ cat sub/large4 | |
1230 | large4-modified |
|
1230 | large4-modified | |
1231 | $ cat sub2/large6 |
|
1231 | $ cat sub2/large6 | |
1232 | large6-modified |
|
1232 | large6-modified | |
1233 | $ cat sub2/large7 |
|
1233 | $ cat sub2/large7 | |
1234 | large7 |
|
1234 | large7 | |
1235 | $ cd ../e |
|
1235 | $ cd ../e | |
1236 | $ hg pull ../b |
|
1236 | $ hg pull ../b | |
1237 | pulling from ../b |
|
1237 | pulling from ../b | |
1238 | searching for changes |
|
1238 | searching for changes | |
1239 | adding changesets |
|
1239 | adding changesets | |
1240 | adding manifests |
|
1240 | adding manifests | |
1241 | adding file changes |
|
1241 | adding file changes | |
1242 | added 1 changesets with 2 changes to 2 files (+1 heads) |
|
1242 | added 1 changesets with 2 changes to 2 files (+1 heads) | |
1243 | (run 'hg heads' to see heads, 'hg merge' to merge) |
|
1243 | (run 'hg heads' to see heads, 'hg merge' to merge) | |
1244 | $ hg rebase |
|
1244 | $ hg rebase | |
1245 | rebasing 8:f574fb32bb45 "modify normal file largefile in repo d" |
|
1245 | rebasing 8:f574fb32bb45 "modify normal file largefile in repo d" | |
1246 | Invoking status precommit hook |
|
1246 | Invoking status precommit hook | |
1247 | M sub/normal4 |
|
1247 | M sub/normal4 | |
1248 | M sub2/large6 |
|
1248 | M sub2/large6 | |
1249 | saved backup bundle to $TESTTMP/e/.hg/strip-backup/f574fb32bb45-backup.hg (glob) |
|
1249 | saved backup bundle to $TESTTMP/e/.hg/strip-backup/f574fb32bb45-backup.hg (glob) | |
1250 | $ hg log --template '{rev}:{node|short} {desc|firstline}\n' |
|
1250 | $ hg log --template '{rev}:{node|short} {desc|firstline}\n' | |
1251 | 9:598410d3eb9a modify normal file largefile in repo d |
|
1251 | 9:598410d3eb9a modify normal file largefile in repo d | |
1252 | 8:a381d2c8c80e modify normal file and largefile in repo b |
|
1252 | 8:a381d2c8c80e modify normal file and largefile in repo b | |
1253 | 7:daea875e9014 add/edit more largefiles |
|
1253 | 7:daea875e9014 add/edit more largefiles | |
1254 | 6:4355d653f84f edit files yet again |
|
1254 | 6:4355d653f84f edit files yet again | |
1255 | 5:9d5af5072dbd edit files again |
|
1255 | 5:9d5af5072dbd edit files again | |
1256 | 4:74c02385b94c move files |
|
1256 | 4:74c02385b94c move files | |
1257 | 3:9e8fbc4bce62 copy files |
|
1257 | 3:9e8fbc4bce62 copy files | |
1258 | 2:51a0ae4d5864 remove files |
|
1258 | 2:51a0ae4d5864 remove files | |
1259 | 1:ce8896473775 edit files |
|
1259 | 1:ce8896473775 edit files | |
1260 | 0:30d30fe6a5be add files |
|
1260 | 0:30d30fe6a5be add files | |
1261 | $ cat normal3 |
|
1261 | $ cat normal3 | |
1262 | normal3-modified |
|
1262 | normal3-modified | |
1263 | $ cat sub/normal4 |
|
1263 | $ cat sub/normal4 | |
1264 | normal4-modified |
|
1264 | normal4-modified | |
1265 | $ cat sub/large4 |
|
1265 | $ cat sub/large4 | |
1266 | large4-modified |
|
1266 | large4-modified | |
1267 | $ cat sub2/large6 |
|
1267 | $ cat sub2/large6 | |
1268 | large6-modified |
|
1268 | large6-modified | |
1269 | $ cat sub2/large7 |
|
1269 | $ cat sub2/large7 | |
1270 | large7 |
|
1270 | large7 | |
1271 |
|
1271 | |||
1272 | Log on largefiles |
|
1272 | Log on largefiles | |
1273 |
|
1273 | |||
1274 | - same output |
|
1274 | - same output | |
1275 | $ hg log --template '{rev}:{node|short} {desc|firstline}\n' .hglf/sub/large4 |
|
1275 | $ hg log --template '{rev}:{node|short} {desc|firstline}\n' .hglf/sub/large4 | |
1276 | 8:a381d2c8c80e modify normal file and largefile in repo b |
|
1276 | 8:a381d2c8c80e modify normal file and largefile in repo b | |
1277 | 6:4355d653f84f edit files yet again |
|
1277 | 6:4355d653f84f edit files yet again | |
1278 | 5:9d5af5072dbd edit files again |
|
1278 | 5:9d5af5072dbd edit files again | |
1279 | 4:74c02385b94c move files |
|
1279 | 4:74c02385b94c move files | |
1280 | $ hg log -G --template '{rev}:{node|short} {desc|firstline}\n' .hglf/sub/large4 |
|
1280 | $ hg log -G --template '{rev}:{node|short} {desc|firstline}\n' .hglf/sub/large4 | |
1281 | o 8:a381d2c8c80e modify normal file and largefile in repo b |
|
1281 | o 8:a381d2c8c80e modify normal file and largefile in repo b | |
1282 | | |
|
1282 | | | |
1283 | o 6:4355d653f84f edit files yet again |
|
1283 | o 6:4355d653f84f edit files yet again | |
1284 | | |
|
1284 | | | |
1285 | o 5:9d5af5072dbd edit files again |
|
1285 | o 5:9d5af5072dbd edit files again | |
1286 | | |
|
1286 | | | |
1287 | o 4:74c02385b94c move files |
|
1287 | o 4:74c02385b94c move files | |
1288 | | |
|
1288 | | | |
1289 | $ hg log --template '{rev}:{node|short} {desc|firstline}\n' sub/large4 |
|
1289 | $ hg log --template '{rev}:{node|short} {desc|firstline}\n' sub/large4 | |
1290 | 8:a381d2c8c80e modify normal file and largefile in repo b |
|
1290 | 8:a381d2c8c80e modify normal file and largefile in repo b | |
1291 | 6:4355d653f84f edit files yet again |
|
1291 | 6:4355d653f84f edit files yet again | |
1292 | 5:9d5af5072dbd edit files again |
|
1292 | 5:9d5af5072dbd edit files again | |
1293 | 4:74c02385b94c move files |
|
1293 | 4:74c02385b94c move files | |
1294 | $ hg log -G --template '{rev}:{node|short} {desc|firstline}\n' .hglf/sub/large4 |
|
1294 | $ hg log -G --template '{rev}:{node|short} {desc|firstline}\n' .hglf/sub/large4 | |
1295 | o 8:a381d2c8c80e modify normal file and largefile in repo b |
|
1295 | o 8:a381d2c8c80e modify normal file and largefile in repo b | |
1296 | | |
|
1296 | | | |
1297 | o 6:4355d653f84f edit files yet again |
|
1297 | o 6:4355d653f84f edit files yet again | |
1298 | | |
|
1298 | | | |
1299 | o 5:9d5af5072dbd edit files again |
|
1299 | o 5:9d5af5072dbd edit files again | |
1300 | | |
|
1300 | | | |
1301 | o 4:74c02385b94c move files |
|
1301 | o 4:74c02385b94c move files | |
1302 | | |
|
1302 | | | |
1303 |
|
1303 | |||
1304 | - .hglf only matches largefiles, without .hglf it matches 9 bco sub/normal |
|
1304 | - .hglf only matches largefiles, without .hglf it matches 9 bco sub/normal | |
1305 | $ hg log --template '{rev}:{node|short} {desc|firstline}\n' .hglf/sub |
|
1305 | $ hg log --template '{rev}:{node|short} {desc|firstline}\n' .hglf/sub | |
1306 | 8:a381d2c8c80e modify normal file and largefile in repo b |
|
1306 | 8:a381d2c8c80e modify normal file and largefile in repo b | |
1307 | 6:4355d653f84f edit files yet again |
|
1307 | 6:4355d653f84f edit files yet again | |
1308 | 5:9d5af5072dbd edit files again |
|
1308 | 5:9d5af5072dbd edit files again | |
1309 | 4:74c02385b94c move files |
|
1309 | 4:74c02385b94c move files | |
1310 | 1:ce8896473775 edit files |
|
1310 | 1:ce8896473775 edit files | |
1311 | 0:30d30fe6a5be add files |
|
1311 | 0:30d30fe6a5be add files | |
1312 | $ hg log -G --template '{rev}:{node|short} {desc|firstline}\n' .hglf/sub |
|
1312 | $ hg log -G --template '{rev}:{node|short} {desc|firstline}\n' .hglf/sub | |
1313 | o 8:a381d2c8c80e modify normal file and largefile in repo b |
|
1313 | o 8:a381d2c8c80e modify normal file and largefile in repo b | |
1314 | | |
|
1314 | | | |
1315 | o 6:4355d653f84f edit files yet again |
|
1315 | o 6:4355d653f84f edit files yet again | |
1316 | | |
|
1316 | | | |
1317 | o 5:9d5af5072dbd edit files again |
|
1317 | o 5:9d5af5072dbd edit files again | |
1318 | | |
|
1318 | | | |
1319 | o 4:74c02385b94c move files |
|
1319 | o 4:74c02385b94c move files | |
1320 | | |
|
1320 | | | |
1321 | o 1:ce8896473775 edit files |
|
1321 | o 1:ce8896473775 edit files | |
1322 | | |
|
1322 | | | |
1323 | o 0:30d30fe6a5be add files |
|
1323 | o 0:30d30fe6a5be add files | |
1324 |
|
1324 | |||
1325 | $ hg log --template '{rev}:{node|short} {desc|firstline}\n' sub |
|
1325 | $ hg log --template '{rev}:{node|short} {desc|firstline}\n' sub | |
1326 | 9:598410d3eb9a modify normal file largefile in repo d |
|
1326 | 9:598410d3eb9a modify normal file largefile in repo d | |
1327 | 8:a381d2c8c80e modify normal file and largefile in repo b |
|
1327 | 8:a381d2c8c80e modify normal file and largefile in repo b | |
1328 | 6:4355d653f84f edit files yet again |
|
1328 | 6:4355d653f84f edit files yet again | |
1329 | 5:9d5af5072dbd edit files again |
|
1329 | 5:9d5af5072dbd edit files again | |
1330 | 4:74c02385b94c move files |
|
1330 | 4:74c02385b94c move files | |
1331 | 1:ce8896473775 edit files |
|
1331 | 1:ce8896473775 edit files | |
1332 | 0:30d30fe6a5be add files |
|
1332 | 0:30d30fe6a5be add files | |
1333 | $ hg log -G --template '{rev}:{node|short} {desc|firstline}\n' sub |
|
1333 | $ hg log -G --template '{rev}:{node|short} {desc|firstline}\n' sub | |
1334 | @ 9:598410d3eb9a modify normal file largefile in repo d |
|
1334 | @ 9:598410d3eb9a modify normal file largefile in repo d | |
1335 | | |
|
1335 | | | |
1336 | o 8:a381d2c8c80e modify normal file and largefile in repo b |
|
1336 | o 8:a381d2c8c80e modify normal file and largefile in repo b | |
1337 | | |
|
1337 | | | |
1338 | o 6:4355d653f84f edit files yet again |
|
1338 | o 6:4355d653f84f edit files yet again | |
1339 | | |
|
1339 | | | |
1340 | o 5:9d5af5072dbd edit files again |
|
1340 | o 5:9d5af5072dbd edit files again | |
1341 | | |
|
1341 | | | |
1342 | o 4:74c02385b94c move files |
|
1342 | o 4:74c02385b94c move files | |
1343 | | |
|
1343 | | | |
1344 | o 1:ce8896473775 edit files |
|
1344 | o 1:ce8896473775 edit files | |
1345 | | |
|
1345 | | | |
1346 | o 0:30d30fe6a5be add files |
|
1346 | o 0:30d30fe6a5be add files | |
1347 |
|
1347 | |||
1348 | - globbing gives same result |
|
1348 | - globbing gives same result | |
1349 | $ hg log --template '{rev}:{node|short} {desc|firstline}\n' 'glob:sub/*' |
|
1349 | $ hg log --template '{rev}:{node|short} {desc|firstline}\n' 'glob:sub/*' | |
1350 | 9:598410d3eb9a modify normal file largefile in repo d |
|
1350 | 9:598410d3eb9a modify normal file largefile in repo d | |
1351 | 8:a381d2c8c80e modify normal file and largefile in repo b |
|
1351 | 8:a381d2c8c80e modify normal file and largefile in repo b | |
1352 | 6:4355d653f84f edit files yet again |
|
1352 | 6:4355d653f84f edit files yet again | |
1353 | 5:9d5af5072dbd edit files again |
|
1353 | 5:9d5af5072dbd edit files again | |
1354 | 4:74c02385b94c move files |
|
1354 | 4:74c02385b94c move files | |
1355 | 1:ce8896473775 edit files |
|
1355 | 1:ce8896473775 edit files | |
1356 | 0:30d30fe6a5be add files |
|
1356 | 0:30d30fe6a5be add files | |
1357 | $ hg log -G --template '{rev}:{node|short} {desc|firstline}\n' 'glob:sub/*' |
|
1357 | $ hg log -G --template '{rev}:{node|short} {desc|firstline}\n' 'glob:sub/*' | |
1358 | @ 9:598410d3eb9a modify normal file largefile in repo d |
|
1358 | @ 9:598410d3eb9a modify normal file largefile in repo d | |
1359 | | |
|
1359 | | | |
1360 | o 8:a381d2c8c80e modify normal file and largefile in repo b |
|
1360 | o 8:a381d2c8c80e modify normal file and largefile in repo b | |
1361 | | |
|
1361 | | | |
1362 | o 6:4355d653f84f edit files yet again |
|
1362 | o 6:4355d653f84f edit files yet again | |
1363 | | |
|
1363 | | | |
1364 | o 5:9d5af5072dbd edit files again |
|
1364 | o 5:9d5af5072dbd edit files again | |
1365 | | |
|
1365 | | | |
1366 | o 4:74c02385b94c move files |
|
1366 | o 4:74c02385b94c move files | |
1367 | | |
|
1367 | | | |
1368 | o 1:ce8896473775 edit files |
|
1368 | o 1:ce8896473775 edit files | |
1369 | | |
|
1369 | | | |
1370 | o 0:30d30fe6a5be add files |
|
1370 | o 0:30d30fe6a5be add files | |
1371 |
|
1371 | |||
1372 | Rollback on largefiles. |
|
1372 | Rollback on largefiles. | |
1373 |
|
1373 | |||
1374 | $ echo large4-modified-again > sub/large4 |
|
1374 | $ echo large4-modified-again > sub/large4 | |
1375 | $ hg commit -m "Modify large4 again" |
|
1375 | $ hg commit -m "Modify large4 again" | |
1376 | Invoking status precommit hook |
|
1376 | Invoking status precommit hook | |
1377 | M sub/large4 |
|
1377 | M sub/large4 | |
1378 | $ hg rollback |
|
1378 | $ hg rollback | |
1379 | repository tip rolled back to revision 9 (undo commit) |
|
1379 | repository tip rolled back to revision 9 (undo commit) | |
1380 | working directory now based on revision 9 |
|
1380 | working directory now based on revision 9 | |
1381 | $ hg st |
|
1381 | $ hg st | |
1382 | M sub/large4 |
|
1382 | M sub/large4 | |
1383 | $ hg log --template '{rev}:{node|short} {desc|firstline}\n' |
|
1383 | $ hg log --template '{rev}:{node|short} {desc|firstline}\n' | |
1384 | 9:598410d3eb9a modify normal file largefile in repo d |
|
1384 | 9:598410d3eb9a modify normal file largefile in repo d | |
1385 | 8:a381d2c8c80e modify normal file and largefile in repo b |
|
1385 | 8:a381d2c8c80e modify normal file and largefile in repo b | |
1386 | 7:daea875e9014 add/edit more largefiles |
|
1386 | 7:daea875e9014 add/edit more largefiles | |
1387 | 6:4355d653f84f edit files yet again |
|
1387 | 6:4355d653f84f edit files yet again | |
1388 | 5:9d5af5072dbd edit files again |
|
1388 | 5:9d5af5072dbd edit files again | |
1389 | 4:74c02385b94c move files |
|
1389 | 4:74c02385b94c move files | |
1390 | 3:9e8fbc4bce62 copy files |
|
1390 | 3:9e8fbc4bce62 copy files | |
1391 | 2:51a0ae4d5864 remove files |
|
1391 | 2:51a0ae4d5864 remove files | |
1392 | 1:ce8896473775 edit files |
|
1392 | 1:ce8896473775 edit files | |
1393 | 0:30d30fe6a5be add files |
|
1393 | 0:30d30fe6a5be add files | |
1394 | $ cat sub/large4 |
|
1394 | $ cat sub/large4 | |
1395 | large4-modified-again |
|
1395 | large4-modified-again | |
1396 |
|
1396 | |||
1397 | "update --check" refuses to update with uncommitted changes. |
|
1397 | "update --check" refuses to update with uncommitted changes. | |
1398 | $ hg update --check 8 |
|
1398 | $ hg update --check 8 | |
1399 | abort: uncommitted changes |
|
1399 | abort: uncommitted changes | |
1400 | [255] |
|
1400 | [255] | |
1401 |
|
1401 | |||
1402 | "update --clean" leaves correct largefiles in working copy, even when there is |
|
1402 | "update --clean" leaves correct largefiles in working copy, even when there is | |
1403 | .orig files from revert in .hglf. |
|
1403 | .orig files from revert in .hglf. | |
1404 |
|
1404 | |||
1405 | $ echo mistake > sub2/large7 |
|
1405 | $ echo mistake > sub2/large7 | |
1406 | $ hg revert sub2/large7 |
|
1406 | $ hg revert sub2/large7 | |
1407 | $ cat sub2/large7 |
|
1407 | $ cat sub2/large7 | |
1408 | large7 |
|
1408 | large7 | |
1409 | $ cat sub2/large7.orig |
|
1409 | $ cat sub2/large7.orig | |
1410 | mistake |
|
1410 | mistake | |
1411 | $ test ! -f .hglf/sub2/large7.orig |
|
1411 | $ test ! -f .hglf/sub2/large7.orig | |
1412 |
|
1412 | |||
1413 | $ hg -q update --clean -r null |
|
1413 | $ hg -q update --clean -r null | |
1414 | $ hg update --clean |
|
1414 | $ hg update --clean | |
1415 | getting changed largefiles |
|
1415 | getting changed largefiles | |
1416 | 3 largefiles updated, 0 removed |
|
1416 | 3 largefiles updated, 0 removed | |
1417 | 5 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
1417 | 5 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
1418 | $ cat normal3 |
|
1418 | $ cat normal3 | |
1419 | normal3-modified |
|
1419 | normal3-modified | |
1420 | $ cat sub/normal4 |
|
1420 | $ cat sub/normal4 | |
1421 | normal4-modified |
|
1421 | normal4-modified | |
1422 | $ cat sub/large4 |
|
1422 | $ cat sub/large4 | |
1423 | large4-modified |
|
1423 | large4-modified | |
1424 | $ cat sub2/large6 |
|
1424 | $ cat sub2/large6 | |
1425 | large6-modified |
|
1425 | large6-modified | |
1426 | $ cat sub2/large7 |
|
1426 | $ cat sub2/large7 | |
1427 | large7 |
|
1427 | large7 | |
1428 | $ cat sub2/large7.orig |
|
1428 | $ cat sub2/large7.orig | |
1429 | mistake |
|
1429 | mistake | |
1430 | $ test ! -f .hglf/sub2/large7.orig |
|
1430 | $ test ! -f .hglf/sub2/large7.orig | |
1431 |
|
1431 | |||
1432 | verify that largefile .orig file no longer is overwritten on every update -C: |
|
1432 | verify that largefile .orig file no longer is overwritten on every update -C: | |
1433 | $ hg update --clean |
|
1433 | $ hg update --clean | |
1434 | getting changed largefiles |
|
1434 | getting changed largefiles | |
1435 | 0 largefiles updated, 0 removed |
|
1435 | 0 largefiles updated, 0 removed | |
1436 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
1436 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
1437 | $ cat sub2/large7.orig |
|
1437 | $ cat sub2/large7.orig | |
1438 | mistake |
|
1438 | mistake | |
1439 | $ rm sub2/large7.orig |
|
1439 | $ rm sub2/large7.orig | |
1440 |
|
1440 | |||
1441 | Now "update check" is happy. |
|
1441 | Now "update check" is happy. | |
1442 | $ hg update --check 8 |
|
1442 | $ hg update --check 8 | |
1443 | getting changed largefiles |
|
1443 | getting changed largefiles | |
1444 | 1 largefiles updated, 0 removed |
|
1444 | 1 largefiles updated, 0 removed | |
1445 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
1445 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
1446 | $ hg update --check |
|
1446 | $ hg update --check | |
1447 | getting changed largefiles |
|
1447 | getting changed largefiles | |
1448 | 1 largefiles updated, 0 removed |
|
1448 | 1 largefiles updated, 0 removed | |
1449 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
1449 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
1450 |
|
1450 | |||
1451 | Test removing empty largefiles directories on update |
|
1451 | Test removing empty largefiles directories on update | |
1452 | $ test -d sub2 && echo "sub2 exists" |
|
1452 | $ test -d sub2 && echo "sub2 exists" | |
1453 | sub2 exists |
|
1453 | sub2 exists | |
1454 | $ hg update -q null |
|
1454 | $ hg update -q null | |
1455 | $ test -d sub2 && echo "error: sub2 should not exist anymore" |
|
1455 | $ test -d sub2 && echo "error: sub2 should not exist anymore" | |
1456 | [1] |
|
1456 | [1] | |
1457 | $ hg update -q |
|
1457 | $ hg update -q | |
1458 |
|
1458 | |||
1459 | Test hg remove removes empty largefiles directories |
|
1459 | Test hg remove removes empty largefiles directories | |
1460 | $ test -d sub2 && echo "sub2 exists" |
|
1460 | $ test -d sub2 && echo "sub2 exists" | |
1461 | sub2 exists |
|
1461 | sub2 exists | |
1462 | $ hg remove sub2/* |
|
1462 | $ hg remove sub2/* | |
1463 | $ test -d sub2 && echo "error: sub2 should not exist anymore" |
|
1463 | $ test -d sub2 && echo "error: sub2 should not exist anymore" | |
1464 | [1] |
|
1464 | [1] | |
1465 | $ hg revert sub2/large6 sub2/large7 |
|
1465 | $ hg revert sub2/large6 sub2/large7 | |
1466 |
|
1466 | |||
1467 | "revert" works on largefiles (and normal files too). |
|
1467 | "revert" works on largefiles (and normal files too). | |
1468 | $ echo hack3 >> normal3 |
|
1468 | $ echo hack3 >> normal3 | |
1469 | $ echo hack4 >> sub/normal4 |
|
1469 | $ echo hack4 >> sub/normal4 | |
1470 | $ echo hack4 >> sub/large4 |
|
1470 | $ echo hack4 >> sub/large4 | |
1471 | $ rm sub2/large6 |
|
1471 | $ rm sub2/large6 | |
1472 | $ hg revert sub2/large6 |
|
1472 | $ hg revert sub2/large6 | |
1473 | $ hg rm sub2/large6 |
|
1473 | $ hg rm sub2/large6 | |
1474 | $ echo new >> sub2/large8 |
|
1474 | $ echo new >> sub2/large8 | |
1475 | $ hg add --large sub2/large8 |
|
1475 | $ hg add --large sub2/large8 | |
1476 | # XXX we don't really want to report that we're reverting the standin; |
|
1476 | # XXX we don't really want to report that we're reverting the standin; | |
1477 | # that's just an implementation detail. But I don't see an obvious fix. ;-( |
|
1477 | # that's just an implementation detail. But I don't see an obvious fix. ;-( | |
1478 | $ hg revert sub |
|
1478 | $ hg revert sub | |
1479 | reverting .hglf/sub/large4 (glob) |
|
1479 | reverting .hglf/sub/large4 (glob) | |
1480 | reverting sub/normal4 (glob) |
|
1480 | reverting sub/normal4 (glob) | |
1481 | $ hg status |
|
1481 | $ hg status | |
1482 | M normal3 |
|
1482 | M normal3 | |
1483 | A sub2/large8 |
|
1483 | A sub2/large8 | |
1484 | R sub2/large6 |
|
1484 | R sub2/large6 | |
1485 | ? sub/large4.orig |
|
1485 | ? sub/large4.orig | |
1486 | ? sub/normal4.orig |
|
1486 | ? sub/normal4.orig | |
1487 | $ cat sub/normal4 |
|
1487 | $ cat sub/normal4 | |
1488 | normal4-modified |
|
1488 | normal4-modified | |
1489 | $ cat sub/large4 |
|
1489 | $ cat sub/large4 | |
1490 | large4-modified |
|
1490 | large4-modified | |
1491 | $ hg revert -a --no-backup |
|
1491 | $ hg revert -a --no-backup | |
1492 | undeleting .hglf/sub2/large6 (glob) |
|
1492 | undeleting .hglf/sub2/large6 (glob) | |
1493 | forgetting .hglf/sub2/large8 (glob) |
|
1493 | forgetting .hglf/sub2/large8 (glob) | |
1494 | reverting normal3 |
|
1494 | reverting normal3 | |
1495 | $ hg status |
|
1495 | $ hg status | |
1496 | ? sub/large4.orig |
|
1496 | ? sub/large4.orig | |
1497 | ? sub/normal4.orig |
|
1497 | ? sub/normal4.orig | |
1498 | ? sub2/large8 |
|
1498 | ? sub2/large8 | |
1499 | $ cat normal3 |
|
1499 | $ cat normal3 | |
1500 | normal3-modified |
|
1500 | normal3-modified | |
1501 | $ cat sub2/large6 |
|
1501 | $ cat sub2/large6 | |
1502 | large6-modified |
|
1502 | large6-modified | |
1503 | $ rm sub/*.orig sub2/large8 |
|
1503 | $ rm sub/*.orig sub2/large8 | |
1504 |
|
1504 | |||
1505 | revert some files to an older revision |
|
1505 | revert some files to an older revision | |
1506 | $ hg revert --no-backup -r 8 sub2 |
|
1506 | $ hg revert --no-backup -r 8 sub2 | |
1507 | reverting .hglf/sub2/large6 (glob) |
|
1507 | reverting .hglf/sub2/large6 (glob) | |
1508 | $ cat sub2/large6 |
|
1508 | $ cat sub2/large6 | |
1509 | large6 |
|
1509 | large6 | |
1510 | $ hg revert --no-backup -C -r '.^' sub2 |
|
1510 | $ hg revert --no-backup -C -r '.^' sub2 | |
1511 | $ hg revert --no-backup sub2 |
|
1511 | $ hg revert --no-backup sub2 | |
1512 | reverting .hglf/sub2/large6 (glob) |
|
1512 | reverting .hglf/sub2/large6 (glob) | |
1513 | $ hg status |
|
1513 | $ hg status | |
1514 |
|
1514 | |||
1515 | "verify --large" actually verifies largefiles |
|
1515 | "verify --large" actually verifies largefiles | |
1516 |
|
1516 | |||
1517 | - Where Do We Come From? What Are We? Where Are We Going? |
|
1517 | - Where Do We Come From? What Are We? Where Are We Going? | |
1518 | $ pwd |
|
1518 | $ pwd | |
1519 | $TESTTMP/e |
|
1519 | $TESTTMP/e | |
1520 | $ hg paths |
|
1520 | $ hg paths | |
1521 | default = $TESTTMP/d (glob) |
|
1521 | default = $TESTTMP/d (glob) | |
1522 |
|
1522 | |||
1523 | $ hg verify --large |
|
1523 | $ hg verify --large | |
1524 | checking changesets |
|
1524 | checking changesets | |
1525 | checking manifests |
|
1525 | checking manifests | |
1526 | crosschecking files in changesets and manifests |
|
1526 | crosschecking files in changesets and manifests | |
1527 | checking files |
|
1527 | checking files | |
1528 | 10 files, 10 changesets, 28 total revisions |
|
1528 | 10 files, 10 changesets, 28 total revisions | |
1529 | searching 1 changesets for largefiles |
|
1529 | searching 1 changesets for largefiles | |
1530 | verified existence of 3 revisions of 3 largefiles |
|
1530 | verified existence of 3 revisions of 3 largefiles | |
1531 |
|
1531 | |||
1532 | - introduce missing blob in local store repo and make sure that this is caught: |
|
1532 | - introduce missing blob in local store repo and make sure that this is caught: | |
1533 | $ mv $TESTTMP/d/.hg/largefiles/e166e74c7303192238d60af5a9c4ce9bef0b7928 . |
|
1533 | $ mv $TESTTMP/d/.hg/largefiles/e166e74c7303192238d60af5a9c4ce9bef0b7928 . | |
1534 | $ hg verify --large |
|
1534 | $ hg verify --large | |
1535 | checking changesets |
|
1535 | checking changesets | |
1536 | checking manifests |
|
1536 | checking manifests | |
1537 | crosschecking files in changesets and manifests |
|
1537 | crosschecking files in changesets and manifests | |
1538 | checking files |
|
1538 | checking files | |
1539 | 10 files, 10 changesets, 28 total revisions |
|
1539 | 10 files, 10 changesets, 28 total revisions | |
1540 | searching 1 changesets for largefiles |
|
1540 | searching 1 changesets for largefiles | |
1541 | changeset 9:598410d3eb9a: sub/large4 references missing $TESTTMP/d/.hg/largefiles/e166e74c7303192238d60af5a9c4ce9bef0b7928 (glob) |
|
1541 | changeset 9:598410d3eb9a: sub/large4 references missing $TESTTMP/d/.hg/largefiles/e166e74c7303192238d60af5a9c4ce9bef0b7928 (glob) | |
1542 | verified existence of 3 revisions of 3 largefiles |
|
1542 | verified existence of 3 revisions of 3 largefiles | |
1543 | [1] |
|
1543 | [1] | |
1544 |
|
1544 | |||
1545 | - introduce corruption and make sure that it is caught when checking content: |
|
1545 | - introduce corruption and make sure that it is caught when checking content: | |
1546 | $ echo '5 cents' > $TESTTMP/d/.hg/largefiles/e166e74c7303192238d60af5a9c4ce9bef0b7928 |
|
1546 | $ echo '5 cents' > $TESTTMP/d/.hg/largefiles/e166e74c7303192238d60af5a9c4ce9bef0b7928 | |
1547 | $ hg verify -q --large --lfc |
|
1547 | $ hg verify -q --large --lfc | |
1548 | changeset 9:598410d3eb9a: sub/large4 references corrupted $TESTTMP/d/.hg/largefiles/e166e74c7303192238d60af5a9c4ce9bef0b7928 (glob) |
|
1548 | changeset 9:598410d3eb9a: sub/large4 references corrupted $TESTTMP/d/.hg/largefiles/e166e74c7303192238d60af5a9c4ce9bef0b7928 (glob) | |
1549 | [1] |
|
1549 | [1] | |
1550 |
|
1550 | |||
1551 | - cleanup |
|
1551 | - cleanup | |
1552 | $ mv e166e74c7303192238d60af5a9c4ce9bef0b7928 $TESTTMP/d/.hg/largefiles/ |
|
1552 | $ mv e166e74c7303192238d60af5a9c4ce9bef0b7928 $TESTTMP/d/.hg/largefiles/ | |
1553 |
|
1553 | |||
1554 | - verifying all revisions will fail because we didn't clone all largefiles to d: |
|
1554 | - verifying all revisions will fail because we didn't clone all largefiles to d: | |
1555 | $ echo 'T-shirt' > $TESTTMP/d/.hg/largefiles/eb7338044dc27f9bc59b8dd5a246b065ead7a9c4 |
|
1555 | $ echo 'T-shirt' > $TESTTMP/d/.hg/largefiles/eb7338044dc27f9bc59b8dd5a246b065ead7a9c4 | |
1556 | $ hg verify -q --lfa --lfc |
|
1556 | $ hg verify -q --lfa --lfc | |
1557 | changeset 0:30d30fe6a5be: large1 references missing $TESTTMP/d/.hg/largefiles/4669e532d5b2c093a78eca010077e708a071bb64 (glob) |
|
1557 | changeset 0:30d30fe6a5be: large1 references missing $TESTTMP/d/.hg/largefiles/4669e532d5b2c093a78eca010077e708a071bb64 (glob) | |
1558 | changeset 0:30d30fe6a5be: sub/large2 references missing $TESTTMP/d/.hg/largefiles/1deebade43c8c498a3c8daddac0244dc55d1331d (glob) |
|
1558 | changeset 0:30d30fe6a5be: sub/large2 references missing $TESTTMP/d/.hg/largefiles/1deebade43c8c498a3c8daddac0244dc55d1331d (glob) | |
1559 | changeset 1:ce8896473775: large1 references missing $TESTTMP/d/.hg/largefiles/5f78770c0e77ba4287ad6ef3071c9bf9c379742f (glob) |
|
1559 | changeset 1:ce8896473775: large1 references missing $TESTTMP/d/.hg/largefiles/5f78770c0e77ba4287ad6ef3071c9bf9c379742f (glob) | |
1560 | changeset 1:ce8896473775: sub/large2 references corrupted $TESTTMP/d/.hg/largefiles/eb7338044dc27f9bc59b8dd5a246b065ead7a9c4 (glob) |
|
1560 | changeset 1:ce8896473775: sub/large2 references corrupted $TESTTMP/d/.hg/largefiles/eb7338044dc27f9bc59b8dd5a246b065ead7a9c4 (glob) | |
1561 | changeset 3:9e8fbc4bce62: large1 references corrupted $TESTTMP/d/.hg/largefiles/eb7338044dc27f9bc59b8dd5a246b065ead7a9c4 (glob) |
|
1561 | changeset 3:9e8fbc4bce62: large1 references corrupted $TESTTMP/d/.hg/largefiles/eb7338044dc27f9bc59b8dd5a246b065ead7a9c4 (glob) | |
1562 | changeset 4:74c02385b94c: large3 references corrupted $TESTTMP/d/.hg/largefiles/eb7338044dc27f9bc59b8dd5a246b065ead7a9c4 (glob) |
|
1562 | changeset 4:74c02385b94c: large3 references corrupted $TESTTMP/d/.hg/largefiles/eb7338044dc27f9bc59b8dd5a246b065ead7a9c4 (glob) | |
1563 | changeset 4:74c02385b94c: sub/large4 references corrupted $TESTTMP/d/.hg/largefiles/eb7338044dc27f9bc59b8dd5a246b065ead7a9c4 (glob) |
|
1563 | changeset 4:74c02385b94c: sub/large4 references corrupted $TESTTMP/d/.hg/largefiles/eb7338044dc27f9bc59b8dd5a246b065ead7a9c4 (glob) | |
1564 | changeset 5:9d5af5072dbd: large3 references missing $TESTTMP/d/.hg/largefiles/baaf12afde9d8d67f25dab6dced0d2bf77dba47c (glob) |
|
1564 | changeset 5:9d5af5072dbd: large3 references missing $TESTTMP/d/.hg/largefiles/baaf12afde9d8d67f25dab6dced0d2bf77dba47c (glob) | |
1565 | changeset 5:9d5af5072dbd: sub/large4 references missing $TESTTMP/d/.hg/largefiles/aeb2210d19f02886dde00dac279729a48471e2f9 (glob) |
|
1565 | changeset 5:9d5af5072dbd: sub/large4 references missing $TESTTMP/d/.hg/largefiles/aeb2210d19f02886dde00dac279729a48471e2f9 (glob) | |
1566 | changeset 6:4355d653f84f: large3 references missing $TESTTMP/d/.hg/largefiles/7838695e10da2bb75ac1156565f40a2595fa2fa0 (glob) |
|
1566 | changeset 6:4355d653f84f: large3 references missing $TESTTMP/d/.hg/largefiles/7838695e10da2bb75ac1156565f40a2595fa2fa0 (glob) | |
1567 | [1] |
|
1567 | [1] | |
1568 |
|
1568 | |||
1569 | - cleanup |
|
1569 | - cleanup | |
1570 | $ rm $TESTTMP/d/.hg/largefiles/eb7338044dc27f9bc59b8dd5a246b065ead7a9c4 |
|
1570 | $ rm $TESTTMP/d/.hg/largefiles/eb7338044dc27f9bc59b8dd5a246b065ead7a9c4 | |
1571 | $ rm -f .hglf/sub/*.orig |
|
1571 | $ rm -f .hglf/sub/*.orig | |
1572 |
|
1572 | |||
1573 | Update to revision with missing largefile - and make sure it really is missing |
|
1573 | Update to revision with missing largefile - and make sure it really is missing | |
1574 |
|
1574 | |||
1575 | $ rm ${USERCACHE}/7838695e10da2bb75ac1156565f40a2595fa2fa0 |
|
1575 | $ rm ${USERCACHE}/7838695e10da2bb75ac1156565f40a2595fa2fa0 | |
1576 | $ hg up -r 6 |
|
1576 | $ hg up -r 6 | |
1577 | getting changed largefiles |
|
1577 | getting changed largefiles | |
1578 | large3: largefile 7838695e10da2bb75ac1156565f40a2595fa2fa0 not available from file:/*/$TESTTMP/d (glob) |
|
1578 | large3: largefile 7838695e10da2bb75ac1156565f40a2595fa2fa0 not available from file:/*/$TESTTMP/d (glob) | |
1579 | 1 largefiles updated, 2 removed |
|
1579 | 1 largefiles updated, 2 removed | |
1580 | 4 files updated, 0 files merged, 2 files removed, 0 files unresolved |
|
1580 | 4 files updated, 0 files merged, 2 files removed, 0 files unresolved | |
1581 | $ rm normal3 |
|
1581 | $ rm normal3 | |
1582 | $ echo >> sub/normal4 |
|
1582 | $ echo >> sub/normal4 | |
1583 | $ hg ci -m 'commit with missing files' |
|
1583 | $ hg ci -m 'commit with missing files' | |
1584 | Invoking status precommit hook |
|
1584 | Invoking status precommit hook | |
1585 | M sub/normal4 |
|
1585 | M sub/normal4 | |
1586 | ! large3 |
|
1586 | ! large3 | |
1587 | ! normal3 |
|
1587 | ! normal3 | |
1588 | created new head |
|
1588 | created new head | |
1589 | $ hg st |
|
1589 | $ hg st | |
1590 | ! large3 |
|
1590 | ! large3 | |
1591 | ! normal3 |
|
1591 | ! normal3 | |
1592 | $ hg up -r. |
|
1592 | $ hg up -r. | |
1593 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
1593 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
1594 | $ hg st |
|
1594 | $ hg st | |
1595 | ! large3 |
|
1595 | ! large3 | |
1596 | ! normal3 |
|
1596 | ! normal3 | |
1597 | $ hg up -Cr. |
|
1597 | $ hg up -Cr. | |
1598 | getting changed largefiles |
|
1598 | getting changed largefiles | |
1599 | large3: largefile 7838695e10da2bb75ac1156565f40a2595fa2fa0 not available from file:/*/$TESTTMP/d (glob) |
|
1599 | large3: largefile 7838695e10da2bb75ac1156565f40a2595fa2fa0 not available from file:/*/$TESTTMP/d (glob) | |
1600 | 0 largefiles updated, 0 removed |
|
1600 | 0 largefiles updated, 0 removed | |
1601 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
1601 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
1602 | $ hg st |
|
1602 | $ hg st | |
1603 | ! large3 |
|
1603 | ! large3 | |
1604 | $ hg rollback |
|
1604 | $ hg rollback | |
1605 | repository tip rolled back to revision 9 (undo commit) |
|
1605 | repository tip rolled back to revision 9 (undo commit) | |
1606 | working directory now based on revision 6 |
|
1606 | working directory now based on revision 6 | |
1607 |
|
1607 | |||
1608 | Merge with revision with missing largefile - and make sure it tries to fetch it. |
|
1608 | Merge with revision with missing largefile - and make sure it tries to fetch it. | |
1609 |
|
1609 | |||
1610 | $ hg up -Cqr null |
|
1610 | $ hg up -Cqr null | |
1611 | $ echo f > f |
|
1611 | $ echo f > f | |
1612 | $ hg ci -Am branch |
|
1612 | $ hg ci -Am branch | |
1613 | adding f |
|
1613 | adding f | |
1614 | Invoking status precommit hook |
|
1614 | Invoking status precommit hook | |
1615 | A f |
|
1615 | A f | |
1616 | created new head |
|
1616 | created new head | |
1617 | $ hg merge -r 6 |
|
1617 | $ hg merge -r 6 | |
1618 | getting changed largefiles |
|
1618 | getting changed largefiles | |
1619 | large3: largefile 7838695e10da2bb75ac1156565f40a2595fa2fa0 not available from file:/*/$TESTTMP/d (glob) |
|
1619 | large3: largefile 7838695e10da2bb75ac1156565f40a2595fa2fa0 not available from file:/*/$TESTTMP/d (glob) | |
1620 | 1 largefiles updated, 0 removed |
|
1620 | 1 largefiles updated, 0 removed | |
1621 | 4 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
1621 | 4 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
1622 | (branch merge, don't forget to commit) |
|
1622 | (branch merge, don't forget to commit) | |
1623 |
|
1623 | |||
1624 | $ hg rollback -q |
|
1624 | $ hg rollback -q | |
1625 | $ hg up -Cq |
|
1625 | $ hg up -Cq | |
1626 |
|
1626 | |||
1627 | Pulling 0 revisions with --all-largefiles should not fetch for all revisions |
|
1627 | Pulling 0 revisions with --all-largefiles should not fetch for all revisions | |
1628 |
|
1628 | |||
1629 | $ hg pull --all-largefiles |
|
1629 | $ hg pull --all-largefiles | |
1630 | pulling from $TESTTMP/d (glob) |
|
1630 | pulling from $TESTTMP/d (glob) | |
1631 | searching for changes |
|
1631 | searching for changes | |
1632 | no changes found |
|
1632 | no changes found | |
1633 |
|
1633 | |||
1634 | Merging does not revert to old versions of largefiles and also check |
|
1634 | Merging does not revert to old versions of largefiles and also check | |
1635 | that merging after having pulled from a non-default remote works |
|
1635 | that merging after having pulled from a non-default remote works | |
1636 | correctly. |
|
1636 | correctly. | |
1637 |
|
1637 | |||
1638 | $ cd .. |
|
1638 | $ cd .. | |
1639 | $ hg clone -r 7 e temp |
|
1639 | $ hg clone -r 7 e temp | |
1640 | adding changesets |
|
1640 | adding changesets | |
1641 | adding manifests |
|
1641 | adding manifests | |
1642 | adding file changes |
|
1642 | adding file changes | |
1643 | added 8 changesets with 24 changes to 10 files |
|
1643 | added 8 changesets with 24 changes to 10 files | |
1644 | updating to branch default |
|
1644 | updating to branch default | |
1645 | getting changed largefiles |
|
1645 | getting changed largefiles | |
1646 | 3 largefiles updated, 0 removed |
|
1646 | 3 largefiles updated, 0 removed | |
1647 | 5 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
1647 | 5 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
1648 | $ hg clone temp f |
|
1648 | $ hg clone temp f | |
1649 | updating to branch default |
|
1649 | updating to branch default | |
1650 | getting changed largefiles |
|
1650 | getting changed largefiles | |
1651 | 3 largefiles updated, 0 removed |
|
1651 | 3 largefiles updated, 0 removed | |
1652 | 5 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
1652 | 5 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
1653 | # Delete the largefiles in the largefiles system cache so that we have an |
|
1653 | # Delete the largefiles in the largefiles system cache so that we have an | |
1654 | # opportunity to test that caching after a pull works. |
|
1654 | # opportunity to test that caching after a pull works. | |
1655 | $ rm "${USERCACHE}"/* |
|
1655 | $ rm "${USERCACHE}"/* | |
1656 | $ cd f |
|
1656 | $ cd f | |
1657 | $ echo "large4-merge-test" > sub/large4 |
|
1657 | $ echo "large4-merge-test" > sub/large4 | |
1658 | $ hg commit -m "Modify large4 to test merge" |
|
1658 | $ hg commit -m "Modify large4 to test merge" | |
1659 | Invoking status precommit hook |
|
1659 | Invoking status precommit hook | |
1660 | M sub/large4 |
|
1660 | M sub/large4 | |
1661 | # Test --cache-largefiles flag |
|
1661 | # Test --cache-largefiles flag | |
1662 | $ hg pull --lfrev 'heads(pulled())' ../e |
|
1662 | $ hg pull --lfrev 'heads(pulled())' ../e | |
1663 | pulling from ../e |
|
1663 | pulling from ../e | |
1664 | searching for changes |
|
1664 | searching for changes | |
1665 | adding changesets |
|
1665 | adding changesets | |
1666 | adding manifests |
|
1666 | adding manifests | |
1667 | adding file changes |
|
1667 | adding file changes | |
1668 | added 2 changesets with 4 changes to 4 files (+1 heads) |
|
1668 | added 2 changesets with 4 changes to 4 files (+1 heads) | |
1669 | (run 'hg heads' to see heads, 'hg merge' to merge) |
|
1669 | (run 'hg heads' to see heads, 'hg merge' to merge) | |
1670 | 2 largefiles cached |
|
1670 | 2 largefiles cached | |
1671 | $ hg merge |
|
1671 | $ hg merge | |
1672 | largefile sub/large4 has a merge conflict |
|
1672 | largefile sub/large4 has a merge conflict | |
1673 | ancestor was 971fb41e78fea4f8e0ba5244784239371cb00591 |
|
1673 | ancestor was 971fb41e78fea4f8e0ba5244784239371cb00591 | |
1674 | keep (l)ocal d846f26643bfa8ec210be40cc93cc6b7ff1128ea or |
|
1674 | keep (l)ocal d846f26643bfa8ec210be40cc93cc6b7ff1128ea or | |
1675 | take (o)ther e166e74c7303192238d60af5a9c4ce9bef0b7928? l |
|
1675 | take (o)ther e166e74c7303192238d60af5a9c4ce9bef0b7928? l | |
1676 | getting changed largefiles |
|
1676 | getting changed largefiles | |
1677 | 1 largefiles updated, 0 removed |
|
1677 | 1 largefiles updated, 0 removed | |
1678 | 3 files updated, 1 files merged, 0 files removed, 0 files unresolved |
|
1678 | 3 files updated, 1 files merged, 0 files removed, 0 files unresolved | |
1679 | (branch merge, don't forget to commit) |
|
1679 | (branch merge, don't forget to commit) | |
1680 | $ hg commit -m "Merge repos e and f" |
|
1680 | $ hg commit -m "Merge repos e and f" | |
1681 | Invoking status precommit hook |
|
1681 | Invoking status precommit hook | |
1682 | M normal3 |
|
1682 | M normal3 | |
1683 | M sub/normal4 |
|
1683 | M sub/normal4 | |
1684 | M sub2/large6 |
|
1684 | M sub2/large6 | |
1685 | $ cat normal3 |
|
1685 | $ cat normal3 | |
1686 | normal3-modified |
|
1686 | normal3-modified | |
1687 | $ cat sub/normal4 |
|
1687 | $ cat sub/normal4 | |
1688 | normal4-modified |
|
1688 | normal4-modified | |
1689 | $ cat sub/large4 |
|
1689 | $ cat sub/large4 | |
1690 | large4-merge-test |
|
1690 | large4-merge-test | |
1691 | $ cat sub2/large6 |
|
1691 | $ cat sub2/large6 | |
1692 | large6-modified |
|
1692 | large6-modified | |
1693 | $ cat sub2/large7 |
|
1693 | $ cat sub2/large7 | |
1694 | large7 |
|
1694 | large7 | |
1695 |
|
1695 | |||
1696 | Test status after merging with a branch that introduces a new largefile: |
|
1696 | Test status after merging with a branch that introduces a new largefile: | |
1697 |
|
1697 | |||
1698 | $ echo large > large |
|
1698 | $ echo large > large | |
1699 | $ hg add --large large |
|
1699 | $ hg add --large large | |
1700 | $ hg commit -m 'add largefile' |
|
1700 | $ hg commit -m 'add largefile' | |
1701 | Invoking status precommit hook |
|
1701 | Invoking status precommit hook | |
1702 | A large |
|
1702 | A large | |
1703 | $ hg update -q ".^" |
|
1703 | $ hg update -q ".^" | |
1704 | $ echo change >> normal3 |
|
1704 | $ echo change >> normal3 | |
1705 | $ hg commit -m 'some change' |
|
1705 | $ hg commit -m 'some change' | |
1706 | Invoking status precommit hook |
|
1706 | Invoking status precommit hook | |
1707 | M normal3 |
|
1707 | M normal3 | |
1708 | created new head |
|
1708 | created new head | |
1709 | $ hg merge |
|
1709 | $ hg merge | |
1710 | getting changed largefiles |
|
1710 | getting changed largefiles | |
1711 | 1 largefiles updated, 0 removed |
|
1711 | 1 largefiles updated, 0 removed | |
1712 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
1712 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
1713 | (branch merge, don't forget to commit) |
|
1713 | (branch merge, don't forget to commit) | |
1714 | $ hg status |
|
1714 | $ hg status | |
1715 | M large |
|
1715 | M large | |
1716 |
|
1716 | |||
1717 | - make sure update of merge with removed largefiles fails as expected |
|
1717 | - make sure update of merge with removed largefiles fails as expected | |
1718 | $ hg rm sub2/large6 |
|
1718 | $ hg rm sub2/large6 | |
1719 | $ hg up -r. |
|
1719 | $ hg up -r. | |
1720 | abort: outstanding uncommitted merge |
|
1720 | abort: outstanding uncommitted merge | |
1721 | [255] |
|
1721 | [255] | |
1722 |
|
1722 | |||
1723 | - revert should be able to revert files introduced in a pending merge |
|
1723 | - revert should be able to revert files introduced in a pending merge | |
1724 | $ hg revert --all -r . |
|
1724 | $ hg revert --all -r . | |
1725 | removing .hglf/large (glob) |
|
1725 | removing .hglf/large (glob) | |
1726 | undeleting .hglf/sub2/large6 (glob) |
|
1726 | undeleting .hglf/sub2/large6 (glob) | |
1727 |
|
1727 | |||
1728 | Test that a normal file and a largefile with the same name and path cannot |
|
1728 | Test that a normal file and a largefile with the same name and path cannot | |
1729 | coexist. |
|
1729 | coexist. | |
1730 |
|
1730 | |||
1731 | $ rm sub2/large7 |
|
1731 | $ rm sub2/large7 | |
1732 | $ echo "largeasnormal" > sub2/large7 |
|
1732 | $ echo "largeasnormal" > sub2/large7 | |
1733 | $ hg add sub2/large7 |
|
1733 | $ hg add sub2/large7 | |
1734 | sub2/large7 already a largefile |
|
1734 | sub2/large7 already a largefile (glob) | |
1735 |
|
1735 | |||
1736 | Test that transplanting a largefile change works correctly. |
|
1736 | Test that transplanting a largefile change works correctly. | |
1737 |
|
1737 | |||
1738 | $ cd .. |
|
1738 | $ cd .. | |
1739 | $ hg clone -r 8 d g |
|
1739 | $ hg clone -r 8 d g | |
1740 | adding changesets |
|
1740 | adding changesets | |
1741 | adding manifests |
|
1741 | adding manifests | |
1742 | adding file changes |
|
1742 | adding file changes | |
1743 | added 9 changesets with 26 changes to 10 files |
|
1743 | added 9 changesets with 26 changes to 10 files | |
1744 | updating to branch default |
|
1744 | updating to branch default | |
1745 | getting changed largefiles |
|
1745 | getting changed largefiles | |
1746 | 3 largefiles updated, 0 removed |
|
1746 | 3 largefiles updated, 0 removed | |
1747 | 5 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
1747 | 5 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
1748 | $ cd g |
|
1748 | $ cd g | |
1749 | $ hg transplant -s ../d 598410d3eb9a |
|
1749 | $ hg transplant -s ../d 598410d3eb9a | |
1750 | searching for changes |
|
1750 | searching for changes | |
1751 | searching for changes |
|
1751 | searching for changes | |
1752 | adding changesets |
|
1752 | adding changesets | |
1753 | adding manifests |
|
1753 | adding manifests | |
1754 | adding file changes |
|
1754 | adding file changes | |
1755 | added 1 changesets with 2 changes to 2 files |
|
1755 | added 1 changesets with 2 changes to 2 files | |
1756 | $ hg log --template '{rev}:{node|short} {desc|firstline}\n' |
|
1756 | $ hg log --template '{rev}:{node|short} {desc|firstline}\n' | |
1757 | 9:598410d3eb9a modify normal file largefile in repo d |
|
1757 | 9:598410d3eb9a modify normal file largefile in repo d | |
1758 | 8:a381d2c8c80e modify normal file and largefile in repo b |
|
1758 | 8:a381d2c8c80e modify normal file and largefile in repo b | |
1759 | 7:daea875e9014 add/edit more largefiles |
|
1759 | 7:daea875e9014 add/edit more largefiles | |
1760 | 6:4355d653f84f edit files yet again |
|
1760 | 6:4355d653f84f edit files yet again | |
1761 | 5:9d5af5072dbd edit files again |
|
1761 | 5:9d5af5072dbd edit files again | |
1762 | 4:74c02385b94c move files |
|
1762 | 4:74c02385b94c move files | |
1763 | 3:9e8fbc4bce62 copy files |
|
1763 | 3:9e8fbc4bce62 copy files | |
1764 | 2:51a0ae4d5864 remove files |
|
1764 | 2:51a0ae4d5864 remove files | |
1765 | 1:ce8896473775 edit files |
|
1765 | 1:ce8896473775 edit files | |
1766 | 0:30d30fe6a5be add files |
|
1766 | 0:30d30fe6a5be add files | |
1767 | $ cat normal3 |
|
1767 | $ cat normal3 | |
1768 | normal3-modified |
|
1768 | normal3-modified | |
1769 | $ cat sub/normal4 |
|
1769 | $ cat sub/normal4 | |
1770 | normal4-modified |
|
1770 | normal4-modified | |
1771 | $ cat sub/large4 |
|
1771 | $ cat sub/large4 | |
1772 | large4-modified |
|
1772 | large4-modified | |
1773 | $ cat sub2/large6 |
|
1773 | $ cat sub2/large6 | |
1774 | large6-modified |
|
1774 | large6-modified | |
1775 | $ cat sub2/large7 |
|
1775 | $ cat sub2/large7 | |
1776 | large7 |
|
1776 | large7 | |
1777 |
|
1777 | |||
1778 | Cat a largefile |
|
1778 | Cat a largefile | |
1779 | $ hg cat normal3 |
|
1779 | $ hg cat normal3 | |
1780 | normal3-modified |
|
1780 | normal3-modified | |
1781 | $ hg cat sub/large4 |
|
1781 | $ hg cat sub/large4 | |
1782 | large4-modified |
|
1782 | large4-modified | |
1783 | $ rm "${USERCACHE}"/* |
|
1783 | $ rm "${USERCACHE}"/* | |
1784 | $ hg cat -r a381d2c8c80e -o cat.out sub/large4 |
|
1784 | $ hg cat -r a381d2c8c80e -o cat.out sub/large4 | |
1785 | $ cat cat.out |
|
1785 | $ cat cat.out | |
1786 | large4-modified |
|
1786 | large4-modified | |
1787 | $ rm cat.out |
|
1787 | $ rm cat.out | |
1788 | $ hg cat -r a381d2c8c80e normal3 |
|
1788 | $ hg cat -r a381d2c8c80e normal3 | |
1789 | normal3-modified |
|
1789 | normal3-modified | |
1790 | $ hg cat -r '.^' normal3 |
|
1790 | $ hg cat -r '.^' normal3 | |
1791 | normal3-modified |
|
1791 | normal3-modified | |
1792 | $ hg cat -r '.^' sub/large4 doesntexist |
|
1792 | $ hg cat -r '.^' sub/large4 doesntexist | |
1793 | large4-modified |
|
1793 | large4-modified | |
1794 | doesntexist: no such file in rev a381d2c8c80e |
|
1794 | doesntexist: no such file in rev a381d2c8c80e | |
1795 | $ hg --cwd sub cat -r '.^' large4 |
|
1795 | $ hg --cwd sub cat -r '.^' large4 | |
1796 | large4-modified |
|
1796 | large4-modified | |
1797 | $ hg --cwd sub cat -r '.^' ../normal3 |
|
1797 | $ hg --cwd sub cat -r '.^' ../normal3 | |
1798 | normal3-modified |
|
1798 | normal3-modified | |
1799 | Cat a standin |
|
1799 | Cat a standin | |
1800 | $ hg cat .hglf/sub/large4 |
|
1800 | $ hg cat .hglf/sub/large4 | |
1801 | e166e74c7303192238d60af5a9c4ce9bef0b7928 |
|
1801 | e166e74c7303192238d60af5a9c4ce9bef0b7928 | |
1802 | $ hg cat .hglf/normal3 |
|
1802 | $ hg cat .hglf/normal3 | |
1803 | .hglf/normal3: no such file in rev 598410d3eb9a (glob) |
|
1803 | .hglf/normal3: no such file in rev 598410d3eb9a (glob) | |
1804 | [1] |
|
1804 | [1] | |
1805 |
|
1805 | |||
1806 | Test that renaming a largefile results in correct output for status |
|
1806 | Test that renaming a largefile results in correct output for status | |
1807 |
|
1807 | |||
1808 | $ hg rename sub/large4 large4-renamed |
|
1808 | $ hg rename sub/large4 large4-renamed | |
1809 | $ hg commit -m "test rename output" |
|
1809 | $ hg commit -m "test rename output" | |
1810 | Invoking status precommit hook |
|
1810 | Invoking status precommit hook | |
1811 | A large4-renamed |
|
1811 | A large4-renamed | |
1812 | R sub/large4 |
|
1812 | R sub/large4 | |
1813 | $ cat large4-renamed |
|
1813 | $ cat large4-renamed | |
1814 | large4-modified |
|
1814 | large4-modified | |
1815 | $ cd sub2 |
|
1815 | $ cd sub2 | |
1816 | $ hg rename large6 large6-renamed |
|
1816 | $ hg rename large6 large6-renamed | |
1817 | $ hg st |
|
1817 | $ hg st | |
1818 | A sub2/large6-renamed |
|
1818 | A sub2/large6-renamed | |
1819 | R sub2/large6 |
|
1819 | R sub2/large6 | |
1820 | $ cd .. |
|
1820 | $ cd .. | |
1821 |
|
1821 | |||
1822 | Test --normal flag |
|
1822 | Test --normal flag | |
1823 |
|
1823 | |||
1824 | $ dd if=/dev/zero bs=2k count=11k > new-largefile 2> /dev/null |
|
1824 | $ dd if=/dev/zero bs=2k count=11k > new-largefile 2> /dev/null | |
1825 | $ hg add --normal --large new-largefile |
|
1825 | $ hg add --normal --large new-largefile | |
1826 | abort: --normal cannot be used with --large |
|
1826 | abort: --normal cannot be used with --large | |
1827 | [255] |
|
1827 | [255] | |
1828 | $ hg add --normal new-largefile |
|
1828 | $ hg add --normal new-largefile | |
1829 | new-largefile: up to 69 MB of RAM may be required to manage this file |
|
1829 | new-largefile: up to 69 MB of RAM may be required to manage this file | |
1830 | (use 'hg revert new-largefile' to cancel the pending addition) |
|
1830 | (use 'hg revert new-largefile' to cancel the pending addition) | |
1831 | $ cd .. |
|
1831 | $ cd .. | |
1832 |
|
1832 | |||
1833 |
|
1833 | |||
1834 |
|
1834 |
General Comments 0
You need to be logged in to leave comments.
Login now