##// END OF EJS Templates
largefiles: import whole modules instead of importing parts of them...
Mads Kiilerich -
r21084:70252bdf default
parent child Browse files
Show More
@@ -8,7 +8,6 b' import urllib2'
8 import re
8 import re
9
9
10 from mercurial import error, httppeer, util, wireproto
10 from mercurial import error, httppeer, util, wireproto
11 from mercurial.wireproto import batchable, future
12 from mercurial.i18n import _
11 from mercurial.i18n import _
13
12
14 import lfutil
13 import lfutil
@@ -135,9 +134,9 b' def wirereposetup(ui, repo):'
135 self._abort(error.ResponseError(_("unexpected response:"),
134 self._abort(error.ResponseError(_("unexpected response:"),
136 chunk))
135 chunk))
137
136
138 @batchable
137 @wireproto.batchable
139 def statlfile(self, sha):
138 def statlfile(self, sha):
140 f = future()
139 f = wireproto.future()
141 result = {'sha': sha}
140 result = {'sha': sha}
142 yield result, f
141 yield result, f
143 try:
142 try:
@@ -8,9 +8,8 b''
8
8
9 import urllib2
9 import urllib2
10
10
11 from mercurial import util
11 from mercurial import util, wireproto
12 from mercurial.i18n import _
12 from mercurial.i18n import _
13 from mercurial.wireproto import remotebatch
14
13
15 import lfutil
14 import lfutil
16 import basestore
15 import basestore
@@ -97,4 +96,4 b' class remotestore(basestore.basestore):'
97
96
98 def batch(self):
97 def batch(self):
99 '''Support for remote batching.'''
98 '''Support for remote batching.'''
100 return remotebatch(self)
99 return wireproto.remotebatch(self)
@@ -9,10 +9,9 b''
9 '''setup for largefiles extension: uisetup'''
9 '''setup for largefiles extension: uisetup'''
10
10
11 from mercurial import archival, cmdutil, commands, extensions, filemerge, hg, \
11 from mercurial import archival, cmdutil, commands, extensions, filemerge, hg, \
12 httppeer, merge, scmutil, sshpeer, wireproto, revset
12 httppeer, merge, scmutil, sshpeer, wireproto, revset, subrepo
13 from mercurial.i18n import _
13 from mercurial.i18n import _
14 from mercurial.hgweb import hgweb_mod, webcommands
14 from mercurial.hgweb import hgweb_mod, webcommands
15 from mercurial.subrepo import hgsubrepo
16
15
17 import overrides
16 import overrides
18 import proto
17 import proto
@@ -42,7 +41,7 b' def uisetup(ui):'
42 # Subrepos call status function
41 # Subrepos call status function
43 entry = extensions.wrapcommand(commands.table, 'status',
42 entry = extensions.wrapcommand(commands.table, 'status',
44 overrides.overridestatus)
43 overrides.overridestatus)
45 entry = extensions.wrapfunction(hgsubrepo, 'status',
44 entry = extensions.wrapfunction(subrepo.hgsubrepo, 'status',
46 overrides.overridestatusfn)
45 overrides.overridestatusfn)
47
46
48 entry = extensions.wrapcommand(commands.table, 'log',
47 entry = extensions.wrapcommand(commands.table, 'log',
@@ -106,7 +105,7 b' def uisetup(ui):'
106 overrides.overridecopy)
105 overrides.overridecopy)
107
106
108 # Summary calls dirty on the subrepos
107 # Summary calls dirty on the subrepos
109 entry = extensions.wrapfunction(hgsubrepo, 'dirty',
108 entry = extensions.wrapfunction(subrepo.hgsubrepo, 'dirty',
110 overrides.overridedirty)
109 overrides.overridedirty)
111
110
112 # Backout calls revert so we need to override both the command and the
111 # Backout calls revert so we need to override both the command and the
@@ -120,7 +119,8 b' def uisetup(ui):'
120 extensions.wrapfunction(hg, 'merge', overrides.hgmerge)
119 extensions.wrapfunction(hg, 'merge', overrides.hgmerge)
121
120
122 extensions.wrapfunction(archival, 'archive', overrides.overridearchive)
121 extensions.wrapfunction(archival, 'archive', overrides.overridearchive)
123 extensions.wrapfunction(hgsubrepo, 'archive', overrides.hgsubrepoarchive)
122 extensions.wrapfunction(subrepo.hgsubrepo, 'archive',
123 overrides.hgsubrepoarchive)
124 extensions.wrapfunction(cmdutil, 'bailifchanged',
124 extensions.wrapfunction(cmdutil, 'bailifchanged',
125 overrides.overridebailifchanged)
125 overrides.overridebailifchanged)
126
126
General Comments 0
You need to be logged in to leave comments. Login now