##// END OF EJS Templates
fastannotate: move some global state mutation to extsetup()...
Augie Fackler -
r39247:8da20fc9 default
parent child Browse files
Show More
@@ -100,8 +100,6 b' annotate cache greatly. Run "debugbuildl'
100 100 #
101 101 # * rename the config knob for updating the local cache from a remote server
102 102 #
103 # * move various global-setup bits to extsetup() or reposetup()
104 #
105 103 # * move `flock` based locking to a common area
106 104 #
107 105 # * revise wireprotocol for sharing annotate files
@@ -185,7 +183,9 b' def uisetup(ui):'
185 183 if ui.configbool('fastannotate', 'useflock', _flockavailable()):
186 184 context.pathhelper.lock = context.pathhelper._lockflock
187 185
186 def extsetup(ui):
188 187 # fastannotate has its own locking, without depending on repo lock
188 # TODO: avoid mutating this unless the specific repo has it enabled
189 189 localrepo.localrepository._wlockfreeprefix.add('fastannotate/')
190 190
191 191 def reposetup(ui, repo):
@@ -223,5 +223,7 b' def clientreposetup(ui, repo):'
223 223 _registerwireprotocommand()
224 224 if isinstance(repo, localrepo.localrepository):
225 225 localreposetup(ui, repo)
226 # TODO: this mutates global state, but only if at least one repo
227 # has the extension enabled. This is probably bad for hgweb.
226 228 if peersetup not in hg.wirepeersetupfuncs:
227 229 hg.wirepeersetupfuncs.append(peersetup)
General Comments 0
You need to be logged in to leave comments. Login now