Mercurial > hg-stable
comparison hgext/relink.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 | 5884812686f7 |
children | c69e5911888d |
comparison
equal
deleted
inserted
replaced
18824:f0d55e1b4855 | 18825:f0564402d059 |
---|---|
39 writes.) | 39 writes.) |
40 """ | 40 """ |
41 if (not util.safehasattr(util, 'samefile') or | 41 if (not util.safehasattr(util, 'samefile') or |
42 not util.safehasattr(util, 'samedevice')): | 42 not util.safehasattr(util, 'samedevice')): |
43 raise util.Abort(_('hardlinks are not supported on this system')) | 43 raise util.Abort(_('hardlinks are not supported on this system')) |
44 src = hg.repository(ui, ui.expandpath(origin or 'default-relink', | 44 src = hg.repository(repo.baseui, ui.expandpath(origin or 'default-relink', |
45 origin or 'default')) | 45 origin or 'default')) |
46 ui.status(_('relinking %s to %s\n') % (src.store.path, repo.store.path)) | 46 ui.status(_('relinking %s to %s\n') % (src.store.path, repo.store.path)) |
47 if repo.root == src.root: | 47 if repo.root == src.root: |
48 ui.status(_('there is nothing to relink\n')) | 48 ui.status(_('there is nothing to relink\n')) |
49 return | 49 return |