[PATCH 4 of 5] more subrepo isolation, pass repo instead of repo.ui to hg.peer
Simon Heimberg
simohe at besonet.ch
Thu Oct 4 22:03:01 CDT 2012
# HG changeset patch
# User Simon Heimberg <simohe at besonet.ch>
# Date 1343510916 -7200
# Node ID 4b16cabe900348d9fe7ecf6cb56a1e84b7137e64
# Parent 6d197b08a9e45eaaadecff8ce08423feb2680ddf
more subrepo isolation, pass repo instead of repo.ui to hg.peer
hg.peer gets the configuration from repo.baseui
diff -r 6d197b08a9e4 -r 4b16cabe9003 hgext/transplant.py
--- a/hgext/transplant.py Fre Okt 05 01:49:48 2012 +0200
+++ b/hgext/transplant.py Sam Jul 28 23:28:36 2012 +0200
@@ -605,7 +605,7 @@
sourcerepo = opts.get('source')
if sourcerepo:
- peer = hg.peer(ui, opts, ui.expandpath(sourcerepo))
+ peer = hg.peer(repo, opts, ui.expandpath(sourcerepo))
branches = map(peer.lookup, opts.get('branch', ()))
source, csets, cleanupfn = bundlerepo.getremotechanges(ui, repo, peer,
onlyheads=branches, force=True)
diff -r 6d197b08a9e4 -r 4b16cabe9003 mercurial/hg.py
--- a/mercurial/hg.py Fre Okt 05 01:49:48 2012 +0200
+++ b/mercurial/hg.py Sam Jul 28 23:28:36 2012 +0200
@@ -338,7 +338,7 @@
# we need to re-init the repo after manually copying the data
# into it
- destpeer = peer(ui, peeropts, dest)
+ destpeer = peer(srcrepo, peeropts, dest)
srcrepo.hook('outgoing', source='clone',
node=node.hex(node.nullid))
else:
diff -r 6d197b08a9e4 -r 4b16cabe9003 mercurial/subrepo.py
--- a/mercurial/subrepo.py Fre Okt 05 01:49:48 2012 +0200
+++ b/mercurial/subrepo.py Sam Jul 28 23:28:36 2012 +0200
@@ -497,7 +497,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))
@@ -562,7 +562,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):
More information about the Mercurial-devel
mailing list