comparison hgsubversion/maps.py @ 1211:56d6e0273733

maps: load commandline branchmap 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.
author Sean Farley <sean.michael.farley@gmail.com>
date Mon, 24 Mar 2014 11:20:47 -0500
parents a0c6dbd9afbb
children 295d2f0cc275
comparison
equal deleted inserted replaced
1210:a0c6dbd9afbb 1211:56d6e0273733
373 self.path = path 373 self.path = path
374 self.super = super(BranchMap, self) 374 self.super = super(BranchMap, self)
375 self.super.__init__() 375 self.super.__init__()
376 self.load(path) 376 self.load(path)
377 377
378 # append branch mapping specified from the commandline
379 clmap = util.configpath(self.ui, 'branchmap')
380 if clmap:
381 self.load(clmap)
382
378 def load(self, path): 383 def load(self, path):
379 '''Load mappings from a file at the specified path.''' 384 '''Load mappings from a file at the specified path.'''
380 if not os.path.exists(path): 385 if not os.path.exists(path):
381 return 386 return
382 387