# HG changeset patch # User Sean Farley # Date 1395678048 18000 # Node ID 2c793092862b2357ef38510912ce8a03ddca6578 # Parent 295d2f0cc275ad959844294e9e7eb976ce674f06 maps: load commandline filemap in __init__ Funcationally, this is the same as before but consolidates the logic to its own object so we later refactor all the map objects to inherit from a common base object. diff --git a/hgsubversion/maps.py b/hgsubversion/maps.py --- a/hgsubversion/maps.py +++ b/hgsubversion/maps.py @@ -273,6 +273,11 @@ class FileMap(object): else: self._write() + # append file mapping specified from the commandline + clmap = util.configpath(self.ui, 'filemap') + if clmap: + self.load(clmap) + def _rpairs(self, name): e = len(name) while e != -1: diff --git a/hgsubversion/svnmeta.py b/hgsubversion/svnmeta.py --- a/hgsubversion/svnmeta.py +++ b/hgsubversion/svnmeta.py @@ -40,8 +40,6 @@ class SVNMeta(object): self._gen_cachedconfig('defaulthost', self.uuid) self._gen_cachedconfig('usebranchnames', True) - filemap = util.configpath(self.ui, 'filemap') - self.branches = util.load(self.branch_info_file) or {} self.prevbranches = dict(self.branches) self._tags = None @@ -56,8 +54,6 @@ class SVNMeta(object): self._tagmap = None self.filemap = maps.FileMap(self.ui, self.filemap_file) - if filemap: - self.filemap.load(filemap) self.lastdate = '1970-01-01 00:00:00 -0000' self.addedtags = {}