Mercurial > hg
diff hgext/largefiles/reposetup.py @ 19088:ce4472b2edb2 stable
largefiles: drop repo wrapping detection
After 257afe5489d4 I see:
$ hg id -q
largefiles: repo method 'commit' appears to have already been wrapped by another extension: largefiles may behave incorrectly
largefiles: repo method 'push' appears to have already been wrapped by another extension: largefiles may behave incorrectly
be207d9b7e4b
The warning is bad:
* The message gives no hint what the problem is and how it can be resolved.
The message is useless.
* Largefiles do have its share of problems, but I don't think I ever have seen
a problem where this warning would have helped. The 'may' in the warning
seems like an exaggeration of the risk. Having largefiles enabled in
combination with for instance mq, hggit and hgsubversion causes a warning
(depending on the configuration order) but do not cause problems. Extensions
might of course be incompatible, but they can be that in many other ways.
The check and the message are incorrect.
It would thus be better to remove the check and the warning completely.
Before 257afe5489d4 the check always failed. That change made the check work
more like intended ... but the intention was wrong. This change will thus also
back that change out.
author | Mads Kiilerich <madski@unity3d.com> |
---|---|
date | Fri, 26 Apr 2013 19:04:01 +0200 |
parents | ac41bb76c737 |
children | f69ebcb06ce2 |
line wrap: on
line diff
--- a/hgext/largefiles/reposetup.py Fri Apr 26 23:36:12 2013 +0900 +++ b/hgext/largefiles/reposetup.py Fri Apr 26 19:04:01 2013 +0200 @@ -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 @@ 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):