Show More
@@ -342,7 +342,7 b' def wrapfilelog(filelog):' | |||||
342 | wrapfunction(filelog, 'size', wrapper.filelogsize) |
|
342 | wrapfunction(filelog, 'size', wrapper.filelogsize) | |
343 |
|
343 | |||
344 |
|
344 | |||
345 |
@eh.wrapfunction(localrepo, |
|
345 | @eh.wrapfunction(localrepo, 'resolverevlogstorevfsoptions') | |
346 | def _resolverevlogstorevfsoptions(orig, ui, requirements, features): |
|
346 | def _resolverevlogstorevfsoptions(orig, ui, requirements, features): | |
347 | opts = orig(ui, requirements, features) |
|
347 | opts = orig(ui, requirements, features) | |
348 | for name, module in extensions.extensions(ui): |
|
348 | for name, module in extensions.extensions(ui): |
@@ -33,7 +33,7 b' HTTP_UNSUPPORTED_MEDIA_TYPE = hgwebcommo' | |||||
33 | eh = exthelper.exthelper() |
|
33 | eh = exthelper.exthelper() | |
34 |
|
34 | |||
35 |
|
35 | |||
36 |
@eh.wrapfunction(wireprotoserver, |
|
36 | @eh.wrapfunction(wireprotoserver, 'handlewsgirequest') | |
37 | def handlewsgirequest(orig, rctx, req, res, checkperm): |
|
37 | def handlewsgirequest(orig, rctx, req, res, checkperm): | |
38 | """Wrap wireprotoserver.handlewsgirequest() to possibly process an LFS |
|
38 | """Wrap wireprotoserver.handlewsgirequest() to possibly process an LFS | |
39 | request if it is left unprocessed by the wrapped method. |
|
39 | request if it is left unprocessed by the wrapped method. |
@@ -53,7 +53,7 b' from . import (' | |||||
53 | eh = exthelper.exthelper() |
|
53 | eh = exthelper.exthelper() | |
54 |
|
54 | |||
55 |
|
55 | |||
56 |
@eh.wrapfunction(localrepo, |
|
56 | @eh.wrapfunction(localrepo, 'makefilestorage') | |
57 | def localrepomakefilestorage(orig, requirements, features, **kwargs): |
|
57 | def localrepomakefilestorage(orig, requirements, features, **kwargs): | |
58 | if b'lfs' in requirements: |
|
58 | if b'lfs' in requirements: | |
59 | features.add(repository.REPO_FEATURE_LFS) |
|
59 | features.add(repository.REPO_FEATURE_LFS) | |
@@ -61,14 +61,14 b' def localrepomakefilestorage(orig, requi' | |||||
61 | return orig(requirements=requirements, features=features, **kwargs) |
|
61 | return orig(requirements=requirements, features=features, **kwargs) | |
62 |
|
62 | |||
63 |
|
63 | |||
64 |
@eh.wrapfunction(changegroup, |
|
64 | @eh.wrapfunction(changegroup, 'allsupportedversions') | |
65 | def allsupportedversions(orig, ui): |
|
65 | def allsupportedversions(orig, ui): | |
66 | versions = orig(ui) |
|
66 | versions = orig(ui) | |
67 | versions.add(b'03') |
|
67 | versions.add(b'03') | |
68 | return versions |
|
68 | return versions | |
69 |
|
69 | |||
70 |
|
70 | |||
71 |
@eh.wrapfunction(wireprotov1server, |
|
71 | @eh.wrapfunction(wireprotov1server, '_capabilities') | |
72 | def _capabilities(orig, repo, proto): |
|
72 | def _capabilities(orig, repo, proto): | |
73 | '''Wrap server command to announce lfs server capability''' |
|
73 | '''Wrap server command to announce lfs server capability''' | |
74 | caps = orig(repo, proto) |
|
74 | caps = orig(repo, proto) | |
@@ -227,7 +227,7 b' def filelogsize(orig, self, rev):' | |||||
227 | return orig(self, rev) |
|
227 | return orig(self, rev) | |
228 |
|
228 | |||
229 |
|
229 | |||
230 |
@eh.wrapfunction(revlog, |
|
230 | @eh.wrapfunction(revlog, '_verify_revision') | |
231 | def _verify_revision(orig, rl, skipflags, state, node): |
|
231 | def _verify_revision(orig, rl, skipflags, state, node): | |
232 | if _islfs(rl, node=node): |
|
232 | if _islfs(rl, node=node): | |
233 | rawtext = rl.rawdata(node) |
|
233 | rawtext = rl.rawdata(node) | |
@@ -246,7 +246,7 b' def _verify_revision(orig, rl, skipflags' | |||||
246 | orig(rl, skipflags, state, node) |
|
246 | orig(rl, skipflags, state, node) | |
247 |
|
247 | |||
248 |
|
248 | |||
249 |
@eh.wrapfunction(context.basefilectx, |
|
249 | @eh.wrapfunction(context.basefilectx, 'cmp') | |
250 | def filectxcmp(orig, self, fctx): |
|
250 | def filectxcmp(orig, self, fctx): | |
251 | """returns True if text is different than fctx""" |
|
251 | """returns True if text is different than fctx""" | |
252 | # some fctx (ex. hg-git) is not based on basefilectx and do not have islfs |
|
252 | # some fctx (ex. hg-git) is not based on basefilectx and do not have islfs | |
@@ -258,7 +258,7 b' def filectxcmp(orig, self, fctx):' | |||||
258 | return orig(self, fctx) |
|
258 | return orig(self, fctx) | |
259 |
|
259 | |||
260 |
|
260 | |||
261 |
@eh.wrapfunction(context.basefilectx, |
|
261 | @eh.wrapfunction(context.basefilectx, 'isbinary') | |
262 | def filectxisbinary(orig, self): |
|
262 | def filectxisbinary(orig, self): | |
263 | if self.islfs(): |
|
263 | if self.islfs(): | |
264 | # fast path: use lfs metadata to answer isbinary |
|
264 | # fast path: use lfs metadata to answer isbinary | |
@@ -272,13 +272,13 b' def filectxislfs(self):' | |||||
272 | return _islfs(self.filelog()._revlog, self.filenode()) |
|
272 | return _islfs(self.filelog()._revlog, self.filenode()) | |
273 |
|
273 | |||
274 |
|
274 | |||
275 |
@eh.wrapfunction(cmdutil, |
|
275 | @eh.wrapfunction(cmdutil, '_updatecatformatter') | |
276 | def _updatecatformatter(orig, fm, ctx, matcher, path, decode): |
|
276 | def _updatecatformatter(orig, fm, ctx, matcher, path, decode): | |
277 | orig(fm, ctx, matcher, path, decode) |
|
277 | orig(fm, ctx, matcher, path, decode) | |
278 | fm.data(rawdata=ctx[path].rawdata()) |
|
278 | fm.data(rawdata=ctx[path].rawdata()) | |
279 |
|
279 | |||
280 |
|
280 | |||
281 |
@eh.wrapfunction(scmutil, |
|
281 | @eh.wrapfunction(scmutil, 'wrapconvertsink') | |
282 | def convertsink(orig, sink): |
|
282 | def convertsink(orig, sink): | |
283 | sink = orig(sink) |
|
283 | sink = orig(sink) | |
284 | if sink.repotype == b'hg': |
|
284 | if sink.repotype == b'hg': | |
@@ -325,7 +325,7 b' def convertsink(orig, sink):' | |||||
325 |
|
325 | |||
326 | # bundlerepo uses "vfsmod.readonlyvfs(othervfs)", we need to make sure lfs |
|
326 | # bundlerepo uses "vfsmod.readonlyvfs(othervfs)", we need to make sure lfs | |
327 | # options and blob stores are passed from othervfs to the new readonlyvfs. |
|
327 | # options and blob stores are passed from othervfs to the new readonlyvfs. | |
328 |
@eh.wrapfunction(vfsmod.readonlyvfs, |
|
328 | @eh.wrapfunction(vfsmod.readonlyvfs, '__init__') | |
329 | def vfsinit(orig, self, othervfs): |
|
329 | def vfsinit(orig, self, othervfs): | |
330 | orig(self, othervfs) |
|
330 | orig(self, othervfs) | |
331 | # copy lfs related options |
|
331 | # copy lfs related options | |
@@ -403,7 +403,7 b' def prepush(pushop):' | |||||
403 | return uploadblobsfromrevs(pushop.repo, pushop.outgoing.missing) |
|
403 | return uploadblobsfromrevs(pushop.repo, pushop.outgoing.missing) | |
404 |
|
404 | |||
405 |
|
405 | |||
406 |
@eh.wrapfunction(exchange, |
|
406 | @eh.wrapfunction(exchange, 'push') | |
407 | def push(orig, repo, remote, *args, **kwargs): |
|
407 | def push(orig, repo, remote, *args, **kwargs): | |
408 | """bail on push if the extension isn't enabled on remote when needed, and |
|
408 | """bail on push if the extension isn't enabled on remote when needed, and | |
409 | update the remote store based on the destination path.""" |
|
409 | update the remote store based on the destination path.""" | |
@@ -433,7 +433,7 b' def push(orig, repo, remote, *args, **kw' | |||||
433 |
|
433 | |||
434 |
|
434 | |||
435 | # when writing a bundle via "hg bundle" command, upload related LFS blobs |
|
435 | # when writing a bundle via "hg bundle" command, upload related LFS blobs | |
436 |
@eh.wrapfunction(bundle2, |
|
436 | @eh.wrapfunction(bundle2, 'writenewbundle') | |
437 | def writenewbundle( |
|
437 | def writenewbundle( | |
438 | orig, ui, repo, source, filename, bundletype, outgoing, *args, **kwargs |
|
438 | orig, ui, repo, source, filename, bundletype, outgoing, *args, **kwargs | |
439 | ): |
|
439 | ): | |
@@ -522,7 +522,7 b' def uploadblobs(repo, pointers):' | |||||
522 | remoteblob.writebatch(pointers, repo.svfs.lfslocalblobstore) |
|
522 | remoteblob.writebatch(pointers, repo.svfs.lfslocalblobstore) | |
523 |
|
523 | |||
524 |
|
524 | |||
525 |
@eh.wrapfunction(upgrade_engine, |
|
525 | @eh.wrapfunction(upgrade_engine, 'finishdatamigration') | |
526 | def upgradefinishdatamigration(orig, ui, srcrepo, dstrepo, requirements): |
|
526 | def upgradefinishdatamigration(orig, ui, srcrepo, dstrepo, requirements): | |
527 | orig(ui, srcrepo, dstrepo, requirements) |
|
527 | orig(ui, srcrepo, dstrepo, requirements) | |
528 |
|
528 | |||
@@ -539,8 +539,8 b' def upgradefinishdatamigration(orig, ui,' | |||||
539 | lfutil.link(srclfsvfs.join(oid), dstlfsvfs.join(oid)) |
|
539 | lfutil.link(srclfsvfs.join(oid), dstlfsvfs.join(oid)) | |
540 |
|
540 | |||
541 |
|
541 | |||
542 |
@eh.wrapfunction(upgrade_actions, |
|
542 | @eh.wrapfunction(upgrade_actions, 'preservedrequirements') | |
543 |
@eh.wrapfunction(upgrade_actions, |
|
543 | @eh.wrapfunction(upgrade_actions, 'supporteddestrequirements') | |
544 | def upgraderequirements(orig, repo): |
|
544 | def upgraderequirements(orig, repo): | |
545 | reqs = orig(repo) |
|
545 | reqs = orig(repo) | |
546 | if b'lfs' in repo.requirements: |
|
546 | if b'lfs' in repo.requirements: |
General Comments 0
You need to be logged in to leave comments.
Login now