diff -r fd1de908f2b4 -r 88a47cbf063c mercurial/commands.py --- a/mercurial/commands.py Fri Sep 18 18:52:38 2020 +0530 +++ b/mercurial/commands.py Wed Jul 01 15:14:59 2020 +0530 @@ -2139,6 +2139,7 @@ None, _(b'edit shared source repository config (EXPERIMENTAL)'), ), + (b'', b'non-shared', None, _(b'edit non shared config (EXPERIMENTAL)')), (b'g', b'global', None, _(b'edit global config')), ] + formatteropts, @@ -2169,6 +2170,9 @@ .. container:: verbose + --non-shared flag is used to edit `.hg/hgrc-not-shared` config file. + This file is not shared across shares when in share-safe mode. + Template: The following keywords are supported. See also :hg:`help templates`. @@ -2186,7 +2190,7 @@ """ opts = pycompat.byteskwargs(opts) - editopts = (b'edit', b'local', b'global', b'shared') + editopts = (b'edit', b'local', b'global', b'shared', b'non_shared') if any(opts.get(o) for o in editopts): cmdutil.check_at_most_one_arg(opts, *editopts[1:]) if opts.get(b'local'): @@ -2208,6 +2212,8 @@ ) ) paths = [vfsmod.vfs(repo.sharedpath).join(b'hgrc')] + elif opts.get(b'non_shared'): + paths = [repo.vfs.join(b'hgrc-not-shared')] else: paths = rcutil.userrcpath()