##// END OF EJS Templates
largefiles: port wrapped functions to exthelper...
largefiles: port wrapped functions to exthelper Things get interesting in the commit. I hadn't seen issue6033 on Windows, and yet it is now reproducible 100% of the time on Windows 10 with this commit. I didn't test Linux. (For comparison, after seeing this issue, I tested on the parent with --loop, and it failed 5 times out of over 1300 tests.) The strange thing is that largefiles has nothing to do with that test (it's not even mentioned there). It isn't autoloading run amuck- it occurs even if largefiles is explicitly disabled, and also if the entry in afterhgrcload() is commented out. It's also not the import of lfutil- I disabled that by copying the function into lfs and removing the import, and the problem still occurs. Experimenting further, it seems that the problem is isolated to 3 entries: exchange.pushoperation, hg.clone, and cmdutil.revert. If those decorators are all commented out, the test passes when run in a loop for awhile. (Obviously, some largefiles tests will fail.) But if any one is commented back in, the test fails immediately. I left one method related to wrapping the wire protocol, because it seemed more natural with the TODO. Also, exthelper doesn't support wrapping functions from another extension, only commands in another extension. I didn't try to figure out why rebase is both command wrapped and function wrapped.

File last commit:

r41092:0a7f582f default
r41092:0a7f582f default
Show More
uisetup.py
56 lines | 2.0 KiB | text/x-python | PythonLexer
various
hgext: add largefiles extension...
r15168 # Copyright 2009-2010 Gregory P. Ward
# Copyright 2009-2010 Intelerad Medical Systems Incorporated
# Copyright 2010-2011 Fog Creek Software
# Copyright 2010-2011 Unity Technologies
#
# This software may be used and distributed according to the terms of the
# GNU General Public License version 2 or any later version.
'''setup for largefiles extension: uisetup'''
liscju
py3: make largefiles/uisetup.py use absolute_import
r29315 from __future__ import absolute_import
various
hgext: add largefiles extension...
r15168
liscju
py3: make largefiles/uisetup.py use absolute_import
r29315 from mercurial import (
cmdutil,
extensions,
httppeer,
sshpeer,
Gregory Szorc
wireproto: rename wireproto to wireprotov1server (API)...
r37803 wireprotov1server,
liscju
py3: make largefiles/uisetup.py use absolute_import
r29315 )
from . import (
overrides,
proto,
)
various
hgext: add largefiles extension...
r15168
def uisetup(ui):
Matt Harbison
largefiles: fix status -S reporting of subrepos (issue3231)...
r16515
FUJIWARA Katsunori
largefiles: use "outgoinghooks" to avoid redundant outgoing check...
r21052 cmdutil.outgoinghooks.add('largefiles', overrides.outgoinghook)
FUJIWARA Katsunori
largefiles: use "summaryremotehooks" to avoid redundant outgoing check...
r21048 cmdutil.summaryremotehooks.add('largefiles', overrides.summaryremotehook)
various
hgext: add largefiles extension...
r15168
# create the new wireproto commands ...
Gregory Szorc
wireproto: rename wireproto to wireprotov1server (API)...
r37803 wireprotov1server.wireprotocommand('putlfile', 'sha', permission='push')(
Gregory Szorc
wireproto: declare permissions requirements in @wireprotocommand (API)...
r36818 proto.putlfile)
Gregory Szorc
wireproto: rename wireproto to wireprotov1server (API)...
r37803 wireprotov1server.wireprotocommand('getlfile', 'sha', permission='pull')(
Gregory Szorc
wireproto: declare permissions requirements in @wireprotocommand (API)...
r36818 proto.getlfile)
Gregory Szorc
wireproto: rename wireproto to wireprotov1server (API)...
r37803 wireprotov1server.wireprotocommand('statlfile', 'sha', permission='pull')(
Gregory Szorc
wireproto: declare permissions requirements in @wireprotocommand (API)...
r36818 proto.statlfile)
Gregory Szorc
wireproto: rename wireproto to wireprotov1server (API)...
r37803 wireprotov1server.wireprotocommand('lheads', '', permission='pull')(
wireprotov1server.heads)
various
hgext: add largefiles extension...
r15168
Gregory Szorc
wireproto: rename wireproto to wireprotov1server (API)...
r37803 extensions.wrapfunction(wireprotov1server.commands['heads'], 'func',
proto.heads)
Gregory Szorc
wireproto: separate commands tables for version 1 and 2 commands...
r37311 # TODO also wrap wireproto.commandsv2 once heads is implemented there.
various
hgext: add largefiles extension...
r15168
# can't do this in reposetup because it needs to have happened before
# wirerepo.__init__ is called
Gregory Szorc
sshpeer: rename sshpeer class to sshv1peer (API)...
r35995 proto.ssholdcallstream = sshpeer.sshv1peer._callstream
Peter Arrenbrecht
peer: introduce real peer classes...
r17192 proto.httpoldcallstream = httppeer.httppeer._callstream
Gregory Szorc
sshpeer: rename sshpeer class to sshv1peer (API)...
r35995 sshpeer.sshv1peer._callstream = proto.sshrepocallstream
Peter Arrenbrecht
peer: introduce real peer classes...
r17192 httppeer.httppeer._callstream = proto.httprepocallstream
various
hgext: add largefiles extension...
r15168
# override some extensions' stuff as well
for name, module in extensions.extensions():
if name == 'rebase':
Matt Harbison
largefiles: port wrapped functions to exthelper...
r41092 # TODO: teach exthelper to handle this
FUJIWARA Katsunori
largefiles: wrap "rebase.rebase" for functions using it directly...
r23182 extensions.wrapfunction(module, 'rebase',
overrides.overriderebase)