comparison hgext/keyword.py @ 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 9fcea3f47a3a
children de16c673455b
comparison
equal deleted inserted replaced
18824:f0d55e1b4855 18825:f0564402d059
382 ui.write('%s = %s\n' % (k, v)) 382 ui.write('%s = %s\n' % (k, v))
383 383
384 fn = 'demo.txt' 384 fn = 'demo.txt'
385 tmpdir = tempfile.mkdtemp('', 'kwdemo.') 385 tmpdir = tempfile.mkdtemp('', 'kwdemo.')
386 ui.note(_('creating temporary repository at %s\n') % tmpdir) 386 ui.note(_('creating temporary repository at %s\n') % tmpdir)
387 repo = localrepo.localrepository(ui, tmpdir, True) 387 repo = localrepo.localrepository(repo.baseui, tmpdir, True)
388 ui.setconfig('keyword', fn, '') 388 ui.setconfig('keyword', fn, '')
389 svn = ui.configbool('keywordset', 'svn') 389 svn = ui.configbool('keywordset', 'svn')
390 # explicitly set keywordset for demo output 390 # explicitly set keywordset for demo output
391 ui.setconfig('keywordset', 'svn', svn) 391 ui.setconfig('keywordset', 'svn', svn)
392 392