Mercurial > public > mercurial-scm > hg
comparison mercurial/subrepo.py @ 10697:c90d923fff64 stable
subrepo: fix hgrc paths section during subrepo pulling
There are two bugs in current subrepo ctor:
- hgrc paths were using parent repo (ctx._repo) instead of self._repo
- it was joined with local extract path, not its source repo path
Fixed both bugs using _abssource on self once it is fully initialized.
It gets the job done perfectly for pull and push urls.
author | Edouard Gomez <ed.gomez@free.fr> |
---|---|
date | Sun, 14 Mar 2010 00:28:10 +0100 |
parents | 4c50a90b90fc |
children | 7b0a0d498cc0 33119d0252c1 |
comparison
equal
deleted
inserted
replaced
10695:b4b16e90712f | 10697:c90d923fff64 |
---|---|
191 | 191 |
192 def addpathconfig(key, value): | 192 def addpathconfig(key, value): |
193 fp.write('%s = %s\n' % (key, value)) | 193 fp.write('%s = %s\n' % (key, value)) |
194 self._repo.ui.setconfig('paths', key, value) | 194 self._repo.ui.setconfig('paths', key, value) |
195 | 195 |
196 defpath = os.path.join(_abssource(ctx._repo), path) | 196 defpath = _abssource(self._repo) |
197 defpushpath = _abssource(self._repo, True) | |
197 addpathconfig('default', defpath) | 198 addpathconfig('default', defpath) |
199 if defpath != defpushpath: | |
200 addpathconfig('default-push', defpushpath) | |
198 fp.close() | 201 fp.close() |
199 | 202 |
200 def dirty(self): | 203 def dirty(self): |
201 r = self._state[1] | 204 r = self._state[1] |
202 if r == '': | 205 if r == '': |