Skip to content
Snippets Groups Projects
Commit f0564402 authored by Simon Heimberg's avatar Simon Heimberg
Browse files

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.
parent f0d55e1b
No related branches found
No related tags found
No related merge requests found
......@@ -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
......
......@@ -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:
......
......@@ -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":
......
......@@ -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:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment