largefiles: import whole modules instead of importing parts of them
Be more friendly to demandimport.
--- a/hgext/largefiles/proto.py Thu Apr 18 18:56:18 2013 +0200
+++ b/hgext/largefiles/proto.py Tue Apr 08 00:48:36 2014 +0200
@@ -8,7 +8,6 @@
import re
from mercurial import error, httppeer, util, wireproto
-from mercurial.wireproto import batchable, future
from mercurial.i18n import _
import lfutil
@@ -135,9 +134,9 @@
self._abort(error.ResponseError(_("unexpected response:"),
chunk))
- @batchable
+ @wireproto.batchable
def statlfile(self, sha):
- f = future()
+ f = wireproto.future()
result = {'sha': sha}
yield result, f
try:
--- a/hgext/largefiles/remotestore.py Thu Apr 18 18:56:18 2013 +0200
+++ b/hgext/largefiles/remotestore.py Tue Apr 08 00:48:36 2014 +0200
@@ -8,9 +8,8 @@
import urllib2
-from mercurial import util
+from mercurial import util, wireproto
from mercurial.i18n import _
-from mercurial.wireproto import remotebatch
import lfutil
import basestore
@@ -97,4 +96,4 @@
def batch(self):
'''Support for remote batching.'''
- return remotebatch(self)
+ return wireproto.remotebatch(self)
--- a/hgext/largefiles/uisetup.py Thu Apr 18 18:56:18 2013 +0200
+++ b/hgext/largefiles/uisetup.py Tue Apr 08 00:48:36 2014 +0200
@@ -9,10 +9,9 @@
'''setup for largefiles extension: uisetup'''
from mercurial import archival, cmdutil, commands, extensions, filemerge, hg, \
- httppeer, merge, scmutil, sshpeer, wireproto, revset
+ httppeer, merge, scmutil, sshpeer, wireproto, revset, subrepo
from mercurial.i18n import _
from mercurial.hgweb import hgweb_mod, webcommands
-from mercurial.subrepo import hgsubrepo
import overrides
import proto
@@ -42,7 +41,7 @@
# Subrepos call status function
entry = extensions.wrapcommand(commands.table, 'status',
overrides.overridestatus)
- entry = extensions.wrapfunction(hgsubrepo, 'status',
+ entry = extensions.wrapfunction(subrepo.hgsubrepo, 'status',
overrides.overridestatusfn)
entry = extensions.wrapcommand(commands.table, 'log',
@@ -106,7 +105,7 @@
overrides.overridecopy)
# Summary calls dirty on the subrepos
- entry = extensions.wrapfunction(hgsubrepo, 'dirty',
+ entry = extensions.wrapfunction(subrepo.hgsubrepo, 'dirty',
overrides.overridedirty)
# Backout calls revert so we need to override both the command and the
@@ -120,7 +119,8 @@
extensions.wrapfunction(hg, 'merge', overrides.hgmerge)
extensions.wrapfunction(archival, 'archive', overrides.overridearchive)
- extensions.wrapfunction(hgsubrepo, 'archive', overrides.hgsubrepoarchive)
+ extensions.wrapfunction(subrepo.hgsubrepo, 'archive',
+ overrides.hgsubrepoarchive)
extensions.wrapfunction(cmdutil, 'bailifchanged',
overrides.overridebailifchanged)