Mercurial > public > mercurial-scm > hg-stable
diff mercurial/subrepo.py @ 17874:2ba70eec1cf0 stable
peer: subrepo isolation, pass repo instead of repo.ui to hg.peer
Do not pass ui because it contains the configuration of the repo. It is the
same object as repo.ui.
When a repo is passed to hg.peer, the global configuration is read from
repo.baseui.
author | Simon Heimberg <simohe@besonet.ch> |
---|---|
date | Sat, 28 Jul 2012 23:28:36 +0200 |
parents | 573bec4ab7ba |
children | f4ee2e959696 |
line wrap: on
line diff
--- a/mercurial/subrepo.py Sat Sep 29 20:11:24 2012 +0900 +++ b/mercurial/subrepo.py Sat Jul 28 23:28:36 2012 +0200 @@ -501,7 +501,7 @@ if revision not in self._repo: self._repo._subsource = source srcurl = _abssource(self._repo) - other = hg.peer(self._repo.ui, {}, srcurl) + other = hg.peer(self._repo, {}, srcurl) if len(self._repo) == 0: self._repo.ui.status(_('cloning subrepo %s from %s\n') % (subrelpath(self), srcurl)) @@ -566,7 +566,7 @@ dsturl = _abssource(self._repo, True) self._repo.ui.status(_('pushing subrepo %s to %s\n') % (subrelpath(self), dsturl)) - other = hg.peer(self._repo.ui, {'ssh': ssh}, dsturl) + other = hg.peer(self._repo, {'ssh': ssh}, dsturl) return self._repo.push(other, force, newbranch=newbranch) def outgoing(self, ui, dest, opts):