Mercurial > hg-stable
comparison mercurial/subrepo.py @ 13105:2245fcd0e160 stable
subrepo: initialize subrepo relative default paths relative to their root
author | Mads Kiilerich <mads@kiilerich.com> |
---|---|
date | Fri, 10 Dec 2010 01:30:16 +0100 |
parents | d0e21c5fde41 |
children | 594ed85b6a3f 4a13ca2c21ce |
comparison
equal
deleted
inserted
replaced
13103:6e79a3bb8c79 | 13105:2245fcd0e160 |
---|---|
331 fp = self._repo.opener("hgrc", "w", text=True) | 331 fp = self._repo.opener("hgrc", "w", text=True) |
332 fp.write('[paths]\n') | 332 fp.write('[paths]\n') |
333 | 333 |
334 def addpathconfig(key, value): | 334 def addpathconfig(key, value): |
335 if value: | 335 if value: |
336 if not os.path.isabs(value): | |
337 value = os.path.relpath(os.path.abspath(value), root) | |
336 fp.write('%s = %s\n' % (key, value)) | 338 fp.write('%s = %s\n' % (key, value)) |
337 self._repo.ui.setconfig('paths', key, value) | 339 self._repo.ui.setconfig('paths', key, value) |
338 | 340 |
339 defpath = _abssource(self._repo, abort=False) | 341 defpath = _abssource(self._repo, abort=False) |
340 defpushpath = _abssource(self._repo, True, abort=False) | 342 defpushpath = _abssource(self._repo, True, abort=False) |