mirror of
https://github.com/facebook/sapling.git
synced 2024-10-09 08:18:15 +03:00
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:
parent
67dc5ea17e
commit
3ad0163bd0
@ -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:]
|
||||
|
Loading…
Reference in New Issue
Block a user