147 for name in modes: |
147 for name in modes: |
148 if name == 'fastannotate': |
148 if name == 'fastannotate': |
149 commands.registercommand() |
149 commands.registercommand() |
150 elif name == 'hgweb': |
150 elif name == 'hgweb': |
151 from . import support |
151 from . import support |
|
152 |
152 support.replacehgwebannotate() |
153 support.replacehgwebannotate() |
153 elif name == 'fctx': |
154 elif name == 'fctx': |
154 from . import support |
155 from . import support |
|
156 |
155 support.replacefctxannotate() |
157 support.replacefctxannotate() |
156 commands.wrapdefault() |
158 commands.wrapdefault() |
157 else: |
159 else: |
158 raise hgerror.Abort(_('fastannotate: invalid mode: %s') % name) |
160 raise hgerror.Abort(_('fastannotate: invalid mode: %s') % name) |
159 |
161 |
160 if ui.configbool('fastannotate', 'server'): |
162 if ui.configbool('fastannotate', 'server'): |
161 protocol.serveruisetup(ui) |
163 protocol.serveruisetup(ui) |
162 |
164 |
|
165 |
163 def extsetup(ui): |
166 def extsetup(ui): |
164 # fastannotate has its own locking, without depending on repo lock |
167 # fastannotate has its own locking, without depending on repo lock |
165 # TODO: avoid mutating this unless the specific repo has it enabled |
168 # TODO: avoid mutating this unless the specific repo has it enabled |
166 localrepo.localrepository._wlockfreeprefix.add('fastannotate/') |
169 localrepo.localrepository._wlockfreeprefix.add('fastannotate/') |
167 |
170 |
|
171 |
168 def reposetup(ui, repo): |
172 def reposetup(ui, repo): |
169 if ui.configbool('fastannotate', 'client'): |
173 if ui.configbool('fastannotate', 'client'): |
170 protocol.clientreposetup(ui, repo) |
174 protocol.clientreposetup(ui, repo) |