comparison rhodecode/lib/vcs/backends/base.py @ 3477:951aa2741c98 beta

Moved inject ui into base vcs classe
author Marcin Kuzminski <marcin@python-works.com>
date Wed, 06 Mar 2013 13:37:42 +0100
parents 8182ebed2922
children 0065f7fe60f6
comparison
equal deleted inserted replaced
3476:258e0353ca51 3477:951aa2741c98
308 def workdir(self): 308 def workdir(self):
309 """ 309 """
310 Returns ``Workdir`` instance for this repository. 310 Returns ``Workdir`` instance for this repository.
311 """ 311 """
312 raise NotImplementedError 312 raise NotImplementedError
313
314 def inject_ui(self, **extras):
315 """
316 Injects extra parameters into UI object of this repo
317 """
318 required_extras = [
319 'ip',
320 'username',
321 'action',
322 'repository',
323 'scm',
324 'config',
325 'server_url',
326 'make_lock',
327 'locked_by',
328 ]
329 for req in required_extras:
330 if req not in extras:
331 raise AttributeError('Missing attribute %s in extras' % (req))
332 for k, v in extras.items():
333 self._repo.ui.setconfig('rhodecode_extras', k, v)
313 334
314 335
315 class BaseChangeset(object): 336 class BaseChangeset(object):
316 """ 337 """
317 Each backend should implement it's changeset representation. 338 Each backend should implement it's changeset representation.