Mercurial > hg
changeset 18825:f0564402d059
repo: repo isolation, do not pass on repo.ui for creating new repos
A repo should not get the configuration from an other repo, so create it with
the global configuration in repo.baseui.
This is done too when recreating a repo. The repo configuration is reread
anyway. And now deleted repo configuration does not persist.
author | Simon Heimberg <simohe@besonet.ch> |
---|---|
date | Wed, 10 Oct 2012 21:55:49 +0200 |
parents | f0d55e1b4855 |
children | 35fb2ef52a39 |
files | hgext/keyword.py hgext/relink.py hgext/share.py mercurial/bundlerepo.py |
diffstat | 4 files changed, 5 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/hgext/keyword.py Mon Mar 04 22:34:11 2013 +0000 +++ b/hgext/keyword.py Wed Oct 10 21:55:49 2012 +0200 @@ -384,7 +384,7 @@ fn = 'demo.txt' tmpdir = tempfile.mkdtemp('', 'kwdemo.') ui.note(_('creating temporary repository at %s\n') % tmpdir) - repo = localrepo.localrepository(ui, tmpdir, True) + repo = localrepo.localrepository(repo.baseui, tmpdir, True) ui.setconfig('keyword', fn, '') svn = ui.configbool('keywordset', 'svn') # explicitly set keywordset for demo output
--- a/hgext/relink.py Mon Mar 04 22:34:11 2013 +0000 +++ b/hgext/relink.py Wed Oct 10 21:55:49 2012 +0200 @@ -41,7 +41,7 @@ if (not util.safehasattr(util, 'samefile') or not util.safehasattr(util, 'samedevice')): raise util.Abort(_('hardlinks are not supported on this system')) - src = hg.repository(ui, ui.expandpath(origin or 'default-relink', + src = hg.repository(repo.baseui, ui.expandpath(origin or 'default-relink', origin or 'default')) ui.status(_('relinking %s to %s\n') % (src.store.path, repo.store.path)) if repo.root == src.root:
--- a/hgext/share.py Mon Mar 04 22:34:11 2013 +0000 +++ b/hgext/share.py Wed Oct 10 21:55:49 2012 +0200 @@ -59,7 +59,7 @@ lock and lock.release() # update store, spath, sopener and sjoin of repo - repo.__init__(ui, repo.root) + repo.__init__(repo.baseui, repo.root) cmdtable = { "share":
--- a/mercurial/bundlerepo.py Mon Mar 04 22:34:11 2013 +0000 +++ b/mercurial/bundlerepo.py Wed Oct 10 21:55:49 2012 +0200 @@ -360,7 +360,8 @@ bundle = None if not localrepo: # use the created uncompressed bundlerepo - localrepo = bundlerepo = bundlerepository(ui, repo.root, fname) + localrepo = bundlerepo = bundlerepository(repo.baseui, repo.root, + fname) # this repo contains local and other now, so filter out local again common = repo.heads() if localrepo: