# HG changeset patch # User Simon Heimberg # Date 2012-10-10 19:55:49 # Node ID f0564402d05915f8867fc1bf2371fce0fa5aa888 # Parent f0d55e1b4855ffa79670c98f1731de598de4a648 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. diff --git a/hgext/keyword.py b/hgext/keyword.py --- a/hgext/keyword.py +++ b/hgext/keyword.py @@ -384,7 +384,7 @@ def demo(ui, repo, *args, **opts): 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 diff --git a/hgext/relink.py b/hgext/relink.py --- a/hgext/relink.py +++ b/hgext/relink.py @@ -41,7 +41,7 @@ def relink(ui, repo, origin=None, **opts 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: diff --git a/hgext/share.py b/hgext/share.py --- a/hgext/share.py +++ b/hgext/share.py @@ -59,7 +59,7 @@ def unshare(ui, repo): 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": diff --git a/mercurial/bundlerepo.py b/mercurial/bundlerepo.py --- a/mercurial/bundlerepo.py +++ b/mercurial/bundlerepo.py @@ -360,7 +360,8 @@ def getremotechanges(ui, repo, other, on 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: