diff --git a/hgext/largefiles/reposetup.py b/hgext/largefiles/reposetup.py --- a/hgext/largefiles/reposetup.py +++ b/hgext/largefiles/reposetup.py @@ -8,7 +8,6 @@ '''setup for largefiles repositories: reposetup''' import copy -import types import os from mercurial import context, error, manifest, match as match_, util, \ @@ -27,16 +26,6 @@ def reposetup(ui, repo): if not repo.local(): return proto.wirereposetup(ui, repo) - origclass = localrepo.localrepository - repoclass = repo.__class__ - for name in ('status', 'commitctx', 'commit', 'push'): - if (getattr(origclass, name) != getattr(repoclass, name) or - isinstance(getattr(repo, name), types.FunctionType)): - ui.warn(_('largefiles: repo method %r appears to have already been' - ' wrapped by another extension: ' - 'largefiles may behave incorrectly\n') - % name) - class lfilesrepo(repo.__class__): lfstatus = False def status_nolfiles(self, *args, **kwargs): diff --git a/tests/test-largefiles.t b/tests/test-largefiles.t --- a/tests/test-largefiles.t +++ b/tests/test-largefiles.t @@ -180,34 +180,6 @@ Test moving largefiles and verify that n $ cat sub/large4 large22 -Test repo method wrapping detection - - $ cat > $TESTTMP/wrapping1.py < from hgext import largefiles - > def reposetup(ui, repo): - > class derived(repo.__class__): - > def push(self, *args, **kwargs): - > return super(derived, self).push(*args, **kwargs) - > repo.__class__ = derived - > largefiles.reposetup(ui, repo) - > uisetup = largefiles.uisetup - > EOF - $ hg --config extensions.largefiles=$TESTTMP/wrapping1.py status - largefiles: repo method 'push' appears to have already been wrapped by another extension: largefiles may behave incorrectly - - $ cat > $TESTTMP/wrapping2.py < from hgext import largefiles - > def reposetup(ui, repo): - > orgpush = repo.push - > def push(*args, **kwargs): - > return orgpush(*args, **kwargs) - > repo.push = push - > largefiles.reposetup(ui, repo) - > uisetup = largefiles.uisetup - > EOF - $ hg --config extensions.largefiles=$TESTTMP/wrapping2.py status - largefiles: repo method 'push' appears to have already been wrapped by another extension: largefiles may behave incorrectly - Test copies and moves from a directory other than root (issue3516) $ cd ..