Mercurial > hgsubversion
comparison hgsubversion/layouts/custom.py @ 1265:4744b7bfa476
layouts: change constructor to take a meta object
This change is another step forward to centralize subversion configuration
options and help refactor.
I couldn't find an easier way to split up this change since there are many
interdependent function calls. There is no functionality change in this patch,
only renaming ui -> meta.
author | Sean Farley <sean.michael.farley@gmail.com> |
---|---|
date | Mon, 24 Mar 2014 11:20:49 -0500 |
parents | c3c4518e00aa |
children | 7bbe120be193 |
comparison
equal
deleted
inserted
replaced
1264:eded1e736a7e | 1265:4744b7bfa476 |
---|---|
10 import base | 10 import base |
11 | 11 |
12 | 12 |
13 class CustomLayout(base.BaseLayout): | 13 class CustomLayout(base.BaseLayout): |
14 | 14 |
15 def __init__(self, ui): | 15 def __init__(self, meta): |
16 base.BaseLayout.__init__(self, ui) | 16 base.BaseLayout.__init__(self, meta) |
17 | 17 |
18 self.svn_to_hg = {} | 18 self.svn_to_hg = {} |
19 self.hg_to_svn = {} | 19 self.hg_to_svn = {} |
20 | 20 |
21 for hg_branch, svn_path in ui.configitems('hgsubversionbranch'): | 21 for hg_branch, svn_path in meta.ui.configitems('hgsubversionbranch'): |
22 | 22 |
23 hg_branch = hg_branch.strip() | 23 hg_branch = hg_branch.strip() |
24 if hg_branch == 'default' or not hg_branch: | 24 if hg_branch == 'default' or not hg_branch: |
25 hg_branch = None | 25 hg_branch = None |
26 svn_path = svn_path.strip('/') | 26 svn_path = svn_path.strip('/') |