Mercurial > hgsubversion
comparison hgsubversion/maps.py @ 1214:2c793092862b
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.
author | Sean Farley <sean.michael.farley@gmail.com> |
---|---|
date | Mon, 24 Mar 2014 11:20:48 -0500 |
parents | 295d2f0cc275 |
children | 572417ad0313 |
comparison
equal
deleted
inserted
replaced
1213:295d2f0cc275 | 1214:2c793092862b |
---|---|
271 if os.path.isfile(self.path): | 271 if os.path.isfile(self.path): |
272 self._load() | 272 self._load() |
273 else: | 273 else: |
274 self._write() | 274 self._write() |
275 | 275 |
276 # append file mapping specified from the commandline | |
277 clmap = util.configpath(self.ui, 'filemap') | |
278 if clmap: | |
279 self.load(clmap) | |
280 | |
276 def _rpairs(self, name): | 281 def _rpairs(self, name): |
277 e = len(name) | 282 e = len(name) |
278 while e != -1: | 283 while e != -1: |
279 yield name[:e], name[e+1:] | 284 yield name[:e], name[e+1:] |
280 e = name.rfind('/', 0, e) | 285 e = name.rfind('/', 0, e) |