Mercurial > public > mercurial-scm > hg
diff mercurial/dispatch.py @ 45783:88a47cbf063c
config: add a .hg/hgrc-not-shared which won't be shared in share-safe mode
Previous patches add a safe mode for sharing repositories which involve sharing
of source requirements and config files.
In certain situations we might need to add a config to source repository which
we does not want to share. For this, we add a `.hg/hgrc-not-shared` which won't
be shared.
This also adds a `--non-shared` flag to `hg config` command to see the
non-shared config.
Differential Revision: https://phab.mercurial-scm.org/D8673
author | Pulkit Goyal <7895pulkit@gmail.com> |
---|---|
date | Wed, 01 Jul 2020 15:14:59 +0530 |
parents | fd1de908f2b4 |
children | 4b4160a83303 |
line wrap: on
line diff
--- a/mercurial/dispatch.py Fri Sep 18 18:52:38 2020 +0530 +++ b/mercurial/dispatch.py Wed Jul 01 15:14:59 2020 +0530 @@ -987,6 +987,7 @@ if rcutil.use_repo_hgrc(): _readsharedsourceconfig(lui, path) lui.readconfig(os.path.join(path, b".hg", b"hgrc"), path) + lui.readconfig(os.path.join(path, b".hg", b"hgrc-not-shared"), path) if rpath: path = lui.expandpath(rpath) @@ -994,6 +995,7 @@ if rcutil.use_repo_hgrc(): _readsharedsourceconfig(lui, path) lui.readconfig(os.path.join(path, b".hg", b"hgrc"), path) + lui.readconfig(os.path.join(path, b".hg", b"hgrc-not-shared"), path) return path, lui