Mercurial > hgsubversion
changeset 1338:356460fb01fa
Merge with stable.
author | Augie Fackler <raf@durin42.com> |
---|---|
date | Wed, 08 Jul 2015 16:11:00 -0400 |
parents | c7d067c174b8 (diff) 0f1f88e71138 (current diff) |
children | db9d85618d3d |
files | hgsubversion/wrappers.py |
diffstat | 6 files changed, 20 insertions(+), 7 deletions(-) [+] |
line wrap: on
line diff
--- a/hgsubversion/layouts/custom.py +++ b/hgsubversion/layouts/custom.py @@ -18,7 +18,9 @@ class CustomLayout(base.BaseLayout): self.svn_to_hg = {} self.hg_to_svn = {} - for hg_branch, svn_path in meta.ui.configitems('hgsubversionbranch'): + meta._gen_cachedconfig('custombranches', {}, configname='hgsubversionbranch') + + for hg_branch, svn_path in meta.custombranches.iteritems(): hg_branch = hg_branch.strip() if hg_branch == 'default' or not hg_branch:
--- a/hgsubversion/maps.py +++ b/hgsubversion/maps.py @@ -34,7 +34,7 @@ class AuthorMap(dict): self.super = super(AuthorMap, self) self.super.__init__() - self.load(self.meta.authors_file) + self.load(self.meta.authormap_file) # append authors specified from the commandline clmap = util.configpath(self.meta.ui, 'authormap') @@ -49,8 +49,8 @@ class AuthorMap(dict): return writing = False - if path != self.meta.authors_file: - writing = open(self.meta.authors_file, 'a') + if path != self.meta.authormap_file: + writing = open(self.meta.authormap_file, 'a') self.meta.ui.debug('reading authormap from %s\n' % path) f = open(path, 'r')
--- a/hgsubversion/svnmeta.py +++ b/hgsubversion/svnmeta.py @@ -94,6 +94,8 @@ class SVNMeta(object): c = self.ui.configint('hgsubversion', configname, default) elif isinstance(default, list): c = self.ui.configlist('hgsubversion', configname, default) + elif isinstance(default, dict): + c = dict(self.ui.configitems(configname)) else: c = self.ui.config('hgsubversion', configname, default) @@ -284,7 +286,7 @@ class SVNMeta(object): return os.path.join(self.metapath, 'branch_info') @property - def authors_file(self): + def authormap_file(self): return os.path.join(self.metapath, 'authors') @property
--- a/hgsubversion/svnwrap/subvertpy_wrapper.py +++ b/hgsubversion/svnwrap/subvertpy_wrapper.py @@ -186,7 +186,8 @@ class SubversionRepo(object): Note that password stores do not work, the parameter is only here to ensure that the API is the same as for the SWIG wrapper. """ - def __init__(self, url='', username='', password='', head=None, password_stores=None): + def __init__(self, url='', username='', password='', head=None, + password_stores=None, meta=None): parsed = common.parse_url(url, username, password) # --username and --password override URL credentials self.username = parsed[0] @@ -210,6 +211,9 @@ class SubversionRepo(object): self.hasdiff3 = True self.autoprops_config = common.AutoPropsConfig() + # store the svn meta object for use with branch skipping + self.meta = meta + def init_ra_and_client(self): """ Initializes the RA and client layers.
--- a/hgsubversion/svnwrap/svn_swig_wrapper.py +++ b/hgsubversion/svnwrap/svn_swig_wrapper.py @@ -205,7 +205,8 @@ class SubversionRepo(object): It uses the SWIG Python bindings, see above for requirements. """ - def __init__(self, url='', username='', password='', head=None, password_stores=None): + def __init__(self, url='', username='', password='', head=None, + password_stores=None, meta=None): parsed = common.parse_url(url, username, password) # --username and --password override URL credentials self.username = parsed[0] @@ -231,6 +232,9 @@ class SubversionRepo(object): self.hasdiff3 = True self.autoprops_config = common.AutoPropsConfig() + # store the svn meta object for use with branch skipping + self.meta = meta + def init_ra_and_client(self): """Initializes the RA and client layers, because sometimes getting unified diffs runs the remote server out of open files.