layouts: add cached branchdir property to standard

Currently, this does nothing but we will use this in the next patch to remove
the direct call to ui.config.
This commit is contained in:
Sean Farley 2014-03-24 11:20:50 -05:00
parent 67dc5ea17e
commit 3ad0163bd0

View File

@ -10,6 +10,12 @@ class StandardLayout(base.BaseLayout):
self._tag_locations = None
# branchdir is expected to be stripped of leading slashes but retain
# its last slash
meta._gen_cachedconfig('branchdir', 'branches',
pre=lambda x: '/'.join(p for p in x.split('/')
if p) + '/')
self._branch_dir = self.meta.ui.config('hgsubversion', 'branchdir', 'branches')
if self._branch_dir[0] == '/':
self._branch_dir = self._branch_dir[1:]