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