Show More
@@ -317,31 +317,31 b' def uisetup(ui):' | |||||
317 | changegroup.cgpacker = shallowbundle.shallowcg1packer |
|
317 | changegroup.cgpacker = shallowbundle.shallowcg1packer | |
318 |
|
318 | |||
319 | extensions.wrapfunction( |
|
319 | extensions.wrapfunction( | |
320 |
changegroup, |
|
320 | changegroup, '_addchangegroupfiles', shallowbundle.addchangegroupfiles | |
321 | ) |
|
321 | ) | |
322 | extensions.wrapfunction( |
|
322 | extensions.wrapfunction( | |
323 |
changegroup, |
|
323 | changegroup, 'makechangegroup', shallowbundle.makechangegroup | |
324 | ) |
|
324 | ) | |
325 |
extensions.wrapfunction(localrepo, |
|
325 | extensions.wrapfunction(localrepo, 'makestore', storewrapper) | |
326 |
extensions.wrapfunction(exchange, |
|
326 | extensions.wrapfunction(exchange, 'pull', exchangepull) | |
327 |
extensions.wrapfunction(merge, |
|
327 | extensions.wrapfunction(merge, 'applyupdates', applyupdates) | |
328 |
extensions.wrapfunction(merge, |
|
328 | extensions.wrapfunction(merge, '_checkunknownfiles', checkunknownfiles) | |
329 |
extensions.wrapfunction(context.workingctx, |
|
329 | extensions.wrapfunction(context.workingctx, '_checklookup', checklookup) | |
330 |
extensions.wrapfunction(scmutil, |
|
330 | extensions.wrapfunction(scmutil, '_findrenames', findrenames) | |
331 | extensions.wrapfunction( |
|
331 | extensions.wrapfunction( | |
332 |
copies, |
|
332 | copies, '_computeforwardmissing', computeforwardmissing | |
333 | ) |
|
333 | ) | |
334 |
extensions.wrapfunction(dispatch, |
|
334 | extensions.wrapfunction(dispatch, 'runcommand', runcommand) | |
335 |
extensions.wrapfunction(repair, |
|
335 | extensions.wrapfunction(repair, '_collectbrokencsets', _collectbrokencsets) | |
336 |
extensions.wrapfunction(context.changectx, |
|
336 | extensions.wrapfunction(context.changectx, 'filectx', filectx) | |
337 |
extensions.wrapfunction(context.workingctx, |
|
337 | extensions.wrapfunction(context.workingctx, 'filectx', workingfilectx) | |
338 |
extensions.wrapfunction(patch, |
|
338 | extensions.wrapfunction(patch, 'trydiff', trydiff) | |
339 |
extensions.wrapfunction(hg, |
|
339 | extensions.wrapfunction(hg, 'verify', _verify) | |
340 | scmutil.fileprefetchhooks.add(b'remotefilelog', _fileprefetchhook) |
|
340 | scmutil.fileprefetchhooks.add(b'remotefilelog', _fileprefetchhook) | |
341 |
|
341 | |||
342 | # disappointing hacks below |
|
342 | # disappointing hacks below | |
343 |
extensions.wrapfunction(scmutil, |
|
343 | extensions.wrapfunction(scmutil, 'getrenamedfn', getrenamedfn) | |
344 |
extensions.wrapfunction(revset, |
|
344 | extensions.wrapfunction(revset, 'filelog', filelogrevset) | |
345 | revset.symbols[b'filelog'] = revset.filelog |
|
345 | revset.symbols[b'filelog'] = revset.filelog | |
346 |
|
346 | |||
347 |
|
347 | |||
@@ -374,7 +374,7 b' def cloneshallow(orig, ui, repo, *args, ' | |||||
374 | else: |
|
374 | else: | |
375 | return orig(self, *args, **kwargs) |
|
375 | return orig(self, *args, **kwargs) | |
376 |
|
376 | |||
377 |
extensions.wrapfunction(exchange, |
|
377 | extensions.wrapfunction(exchange, 'pull', pull_shallow) | |
378 |
|
378 | |||
379 | # Wrap the stream logic to add requirements and to pass include/exclude |
|
379 | # Wrap the stream logic to add requirements and to pass include/exclude | |
380 | # patterns around. |
|
380 | # patterns around. | |
@@ -393,14 +393,14 b' def cloneshallow(orig, ui, repo, *args, ' | |||||
393 | else: |
|
393 | else: | |
394 | return orig() |
|
394 | return orig() | |
395 |
|
395 | |||
396 |
extensions.wrapfunction(remote, |
|
396 | extensions.wrapfunction(remote, 'stream_out', stream_out_shallow) | |
397 |
|
397 | |||
398 | def stream_wrap(orig, op): |
|
398 | def stream_wrap(orig, op): | |
399 | setup_streamout(op.repo, op.remote) |
|
399 | setup_streamout(op.repo, op.remote) | |
400 | return orig(op) |
|
400 | return orig(op) | |
401 |
|
401 | |||
402 | extensions.wrapfunction( |
|
402 | extensions.wrapfunction( | |
403 |
streamclone, |
|
403 | streamclone, 'maybeperformlegacystreamclone', stream_wrap | |
404 | ) |
|
404 | ) | |
405 |
|
405 | |||
406 | def canperformstreamclone(orig, pullop, bundle2=False): |
|
406 | def canperformstreamclone(orig, pullop, bundle2=False): | |
@@ -417,7 +417,7 b' def cloneshallow(orig, ui, repo, *args, ' | |||||
417 | return supported, requirements |
|
417 | return supported, requirements | |
418 |
|
418 | |||
419 | extensions.wrapfunction( |
|
419 | extensions.wrapfunction( | |
420 |
streamclone, |
|
420 | streamclone, 'canperformstreamclone', canperformstreamclone | |
421 | ) |
|
421 | ) | |
422 |
|
422 | |||
423 | try: |
|
423 | try: | |
@@ -721,7 +721,7 b' def onetimeclientsetup(ui):' | |||||
721 | ) |
|
721 | ) | |
722 |
|
722 | |||
723 | extensions.wrapfunction( |
|
723 | extensions.wrapfunction( | |
724 |
remotefilelog.remotefilelog, |
|
724 | remotefilelog.remotefilelog, 'addrawrevision', addrawrevision | |
725 | ) |
|
725 | ) | |
726 |
|
726 | |||
727 | def changelogadd(orig, self, *args, **kwargs): |
|
727 | def changelogadd(orig, self, *args, **kwargs): | |
@@ -749,7 +749,7 b' def onetimeclientsetup(ui):' | |||||
749 | del pendingfilecommits[:] |
|
749 | del pendingfilecommits[:] | |
750 | return node |
|
750 | return node | |
751 |
|
751 | |||
752 |
extensions.wrapfunction(changelog.changelog, |
|
752 | extensions.wrapfunction(changelog.changelog, 'add', changelogadd) | |
753 |
|
753 | |||
754 |
|
754 | |||
755 | def getrenamedfn(orig, repo, endrev=None): |
|
755 | def getrenamedfn(orig, repo, endrev=None): | |
@@ -1083,7 +1083,7 b' def exchangepull(orig, repo, remote, *ar' | |||||
1083 | if util.safehasattr(remote, b'_callstream'): |
|
1083 | if util.safehasattr(remote, b'_callstream'): | |
1084 | remote._localrepo = repo |
|
1084 | remote._localrepo = repo | |
1085 | elif util.safehasattr(remote, b'getbundle'): |
|
1085 | elif util.safehasattr(remote, b'getbundle'): | |
1086 |
extensions.wrapfunction(remote, |
|
1086 | extensions.wrapfunction(remote, 'getbundle', localgetbundle) | |
1087 |
|
1087 | |||
1088 | return orig(repo, remote, *args, **kwargs) |
|
1088 | return orig(repo, remote, *args, **kwargs) | |
1089 |
|
1089 |
@@ -67,7 +67,7 b' def setupserver(ui, repo):' | |||||
67 | ) |
|
67 | ) | |
68 |
|
68 | |||
69 | extensions.wrapfunction( |
|
69 | extensions.wrapfunction( | |
70 |
changegroup.cgpacker, |
|
70 | changegroup.cgpacker, 'generatefiles', generatefiles | |
71 | ) |
|
71 | ) | |
72 |
|
72 | |||
73 |
|
73 | |||
@@ -207,7 +207,7 b' def onetimesetup(ui):' | |||||
207 | ): |
|
207 | ): | |
208 | yield x |
|
208 | yield x | |
209 |
|
209 | |||
210 |
extensions.wrapfunction(streamclone, |
|
210 | extensions.wrapfunction(streamclone, '_walkstreamfiles', _walkstreamfiles) | |
211 |
|
211 | |||
212 | # expose remotefilelog capabilities |
|
212 | # expose remotefilelog capabilities | |
213 | def _capabilities(orig, repo, proto): |
|
213 | def _capabilities(orig, repo, proto): | |
@@ -222,7 +222,7 b' def onetimesetup(ui):' | |||||
222 | caps.append(b'x_rfl_getfile') |
|
222 | caps.append(b'x_rfl_getfile') | |
223 | return caps |
|
223 | return caps | |
224 |
|
224 | |||
225 |
extensions.wrapfunction(wireprotov1server, |
|
225 | extensions.wrapfunction(wireprotov1server, '_capabilities', _capabilities) | |
226 |
|
226 | |||
227 | def _adjustlinkrev(orig, self, *args, **kwargs): |
|
227 | def _adjustlinkrev(orig, self, *args, **kwargs): | |
228 | # When generating file blobs, taking the real path is too slow on large |
|
228 | # When generating file blobs, taking the real path is too slow on large | |
@@ -233,7 +233,7 b' def onetimesetup(ui):' | |||||
233 | return orig(self, *args, **kwargs) |
|
233 | return orig(self, *args, **kwargs) | |
234 |
|
234 | |||
235 | extensions.wrapfunction( |
|
235 | extensions.wrapfunction( | |
236 |
context.basefilectx, |
|
236 | context.basefilectx, '_adjustlinkrev', _adjustlinkrev | |
237 | ) |
|
237 | ) | |
238 |
|
238 | |||
239 | def _iscmd(orig, cmd): |
|
239 | def _iscmd(orig, cmd): | |
@@ -241,7 +241,7 b' def onetimesetup(ui):' | |||||
241 | return False |
|
241 | return False | |
242 | return orig(cmd) |
|
242 | return orig(cmd) | |
243 |
|
243 | |||
244 |
extensions.wrapfunction(wireprotoserver, |
|
244 | extensions.wrapfunction(wireprotoserver, 'iscmd', _iscmd) | |
245 |
|
245 | |||
246 |
|
246 | |||
247 | def _loadfileblob(repo, cachepath, path, node): |
|
247 | def _loadfileblob(repo, cachepath, path, node): |
General Comments 0
You need to be logged in to leave comments.
Login now