Commits

Dan Villiom Podlaski Christiansen committed 21197f5

expand configured paths

Comments (0)

Files changed (2)

hgsubversion/svnmeta.py

         self.revmap = maps.RevMap(repo)
 
         author_host = self.ui.config('hgsubversion', 'defaulthost', uuid)
-        authors = self.ui.config('hgsubversion', 'authormap')
+        authors = util.configpath(self.ui, 'authormap')
         tag_locations = self.ui.configlist('hgsubversion', 'tagpaths', ['tags'])
         self.usebranchnames = self.ui.configbool('hgsubversion',
                                                  'usebranchnames', True)
-        branchmap = self.ui.config('hgsubversion', 'branchmap')
-        tagmap = self.ui.config('hgsubversion', 'tagmap')
-        filemap = self.ui.config('hgsubversion', 'filemap')
+        branchmap = util.configpath(self.ui, 'branchmap')
+        tagmap = util.configpath(self.ui, 'tagmap')
+        filemap = util.configpath(self.ui, 'filemap')
 
         self.branches = {}
         if os.path.exists(self.branch_info_file):

hgsubversion/util.py

         return '\t(working copy)'
     return '\t(revision %d)' % rev
 
+def configpath(ui, name):
+    path = ui.config('hgsubversion', name)
+    return path and hgutil.expandpath(path)
 
 def filterdiff(diff, oldrev, newrev):
     diff = newfile_devnull_re.sub(r'--- \1\t(revision 0)' '\n'