changeset 1431:066c08918060

BaseMap: record filename on self._filename This will make it a little easier to insist all paths be passed in explicitly.
author Augie Fackler <raf@durin42.com>
date Sun, 05 Jun 2016 20:45:29 -0400
parents 48beb467b2e5
children a2ef2c1e3644
files hgsubversion/maps.py
diffstat 1 files changed, 3 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/hgsubversion/maps.py
+++ b/hgsubversion/maps.py
@@ -26,7 +26,8 @@ class BaseMap(dict):
         # 'authormap' for the config option
         self.mapname = self.__class__.__name__.lower()
         self.mapfilename = self.mapname + '_file'
-        self.load(self.meta.__getattribute__(self.mapfilename))
+        self._filepath = self.meta.__getattribute__(self.mapfilename)
+        self.load(self._filepath)
 
         # append mappings specified from the commandline
         clmap = util.configpath(self._ui, self.mapname)
@@ -107,7 +108,7 @@ class BaseMap(dict):
             return
 
         writing = False
-        mapfile = self.meta.__getattribute__(self.mapfilename)
+        mapfile = self._filepath
         if path != mapfile:
             writing = open(mapfile, 'a')