##// END OF EJS Templates
remotefilelog: move most setup from onetimesetup() to uisetup()...
Martin von Zweigbergk -
r42845:8a0e03f7 default
parent child Browse files
Show More
@@ -293,6 +293,35 b' def uisetup(ui):'
293 # debugdata needs remotefilelog.len to work
293 # debugdata needs remotefilelog.len to work
294 extensions.wrapcommand(commands.table, 'debugdata', debugdatashallow)
294 extensions.wrapcommand(commands.table, 'debugdata', debugdatashallow)
295
295
296 changegroup.cgpacker = shallowbundle.shallowcg1packer
297
298 extensions.wrapfunction(changegroup, '_addchangegroupfiles',
299 shallowbundle.addchangegroupfiles)
300 extensions.wrapfunction(
301 changegroup, 'makechangegroup', shallowbundle.makechangegroup)
302 extensions.wrapfunction(localrepo, 'makestore', storewrapper)
303 extensions.wrapfunction(exchange, 'pull', exchangepull)
304 extensions.wrapfunction(merge, 'applyupdates', applyupdates)
305 extensions.wrapfunction(merge, '_checkunknownfiles', checkunknownfiles)
306 extensions.wrapfunction(context.workingctx, '_checklookup', checklookup)
307 extensions.wrapfunction(scmutil, '_findrenames', findrenames)
308 extensions.wrapfunction(copies, '_computeforwardmissing',
309 computeforwardmissing)
310 extensions.wrapfunction(dispatch, 'runcommand', runcommand)
311 extensions.wrapfunction(repair, '_collectbrokencsets', _collectbrokencsets)
312 extensions.wrapfunction(context.changectx, 'filectx', filectx)
313 extensions.wrapfunction(context.workingctx, 'filectx', workingfilectx)
314 extensions.wrapfunction(patch, 'trydiff', trydiff)
315 extensions.wrapfunction(hg, 'verify', _verify)
316 scmutil.fileprefetchhooks.add('remotefilelog', _fileprefetchhook)
317
318 # disappointing hacks below
319 scmutil.getrenamedfn = getrenamedfn
320 extensions.wrapfunction(revset, 'filelog', filelogrevset)
321 revset.symbols['filelog'] = revset.filelog
322 extensions.wrapfunction(cmdutil, 'walkfilerevs', walkfilerevs)
323
324
296 def cloneshallow(orig, ui, repo, *args, **opts):
325 def cloneshallow(orig, ui, repo, *args, **opts):
297 if opts.get(r'shallow'):
326 if opts.get(r'shallow'):
298 repos = []
327 repos = []
@@ -562,38 +591,6 b' def onetimeclientsetup(ui):'
562 return
591 return
563 clientonetime = True
592 clientonetime = True
564
593
565 changegroup.cgpacker = shallowbundle.shallowcg1packer
566
567 extensions.wrapfunction(changegroup, '_addchangegroupfiles',
568 shallowbundle.addchangegroupfiles)
569 extensions.wrapfunction(
570 changegroup, 'makechangegroup', shallowbundle.makechangegroup)
571
572 extensions.wrapfunction(localrepo, 'makestore', storewrapper)
573
574 extensions.wrapfunction(exchange, 'pull', exchangepull)
575
576 extensions.wrapfunction(merge, 'applyupdates', applyupdates)
577
578 extensions.wrapfunction(merge, '_checkunknownfiles', checkunknownfiles)
579
580 extensions.wrapfunction(context.workingctx, '_checklookup', checklookup)
581
582 extensions.wrapfunction(scmutil, '_findrenames', findrenames)
583
584 extensions.wrapfunction(copies, '_computeforwardmissing',
585 computeforwardmissing)
586
587 extensions.wrapfunction(dispatch, 'runcommand', runcommand)
588
589 # disappointing hacks below
590 scmutil.getrenamedfn = getrenamedfn
591 extensions.wrapfunction(revset, 'filelog', filelogrevset)
592 revset.symbols['filelog'] = revset.filelog
593 extensions.wrapfunction(cmdutil, 'walkfilerevs', walkfilerevs)
594
595 extensions.wrapfunction(repair, '_collectbrokencsets', _collectbrokencsets)
596
597 # Don't commit filelogs until we know the commit hash, since the hash
594 # Don't commit filelogs until we know the commit hash, since the hash
598 # is present in the filelog blob.
595 # is present in the filelog blob.
599 # This violates Mercurial's filelog->manifest->changelog write order,
596 # This violates Mercurial's filelog->manifest->changelog write order,
@@ -636,16 +633,6 b' def onetimeclientsetup(ui):'
636 return node
633 return node
637 extensions.wrapfunction(changelog.changelog, 'add', changelogadd)
634 extensions.wrapfunction(changelog.changelog, 'add', changelogadd)
638
635
639 extensions.wrapfunction(context.changectx, 'filectx', filectx)
640
641 extensions.wrapfunction(context.workingctx, 'filectx', workingfilectx)
642
643 extensions.wrapfunction(patch, 'trydiff', trydiff)
644
645 extensions.wrapfunction(hg, 'verify', _verify)
646
647 scmutil.fileprefetchhooks.add('remotefilelog', _fileprefetchhook)
648
649 def getrenamedfn(repo, endrev=None):
636 def getrenamedfn(repo, endrev=None):
650 rcache = {}
637 rcache = {}
651
638
General Comments 0
You need to be logged in to leave comments. Login now