--- a/hgext/largefiles/__init__.py Sat Sep 21 21:33:29 2013 +0900
+++ b/hgext/largefiles/__init__.py Sat Sep 21 21:33:29 2013 +0900
@@ -105,16 +105,26 @@
command.
'''
-from mercurial import commands
+from mercurial import commands, localrepo, extensions
import lfcommands
import reposetup
-import uisetup
+import uisetup as uisetupmod
testedwith = 'internal'
reposetup = reposetup.reposetup
-uisetup = uisetup.uisetup
+
+def featuresetup(ui, supported):
+ for name, module in extensions.extensions(ui):
+ if __name__ == module.__name__:
+ # don't die on seeing a repo with the largefiles requirement
+ supported |= set(['largefiles'])
+ return
+
+def uisetup(ui):
+ localrepo.localrepository.featuresetupfuncs.add(featuresetup)
+ uisetupmod.uisetup(ui)
commands.norepo += " lfconvert"