This is an archive of the discontinued Mercurial Phabricator instance.

config: add a .hg/hgrc-not-shared which won't be shared in share-safe mode
ClosedPublic

Authored by pulkit on Jul 1 2020, 6:01 AM.

Details

Summary

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.

Diff Detail

Repository
rHG Mercurial
Branch
default
Lint
No Linters Available
Unit
No Unit Test Coverage

Event Timeline

pulkit created this revision.Jul 1 2020, 6:01 AM
pulkit updated this revision to Diff 21755.Jul 2 2020, 7:17 AM
marmoute requested changes to this revision.Jul 15 2020, 2:14 PM
marmoute added a subscriber: marmoute.

Request changes because of my inline question on the conditional.

Extra question: Do we need a "non-shared" option on hg config to edit the new file ?

mercurial/localrepo.py
725

Why this limitation ? Can't a share have this file too ?

This revision now requires changes to proceed.Jul 15 2020, 2:14 PM

Request changes because of my inline question on the conditional.
Extra question: Do we need a "non-shared" option on hg config to edit the new file ?

Seems like yes. We will need one. Adding a patch for that too.

mercurial/localrepo.py
725

It can have. Fixing in next version.

pulkit edited the summary of this revision. (Show Details)Jul 20 2020, 8:16 AM
pulkit updated this revision to Diff 21980.
marmoute accepted this revision.Jul 20 2020, 1:23 PM
pulkit updated this revision to Diff 22003.Jul 21 2020, 9:43 AM
pulkit updated this revision to Diff 22072.Jul 23 2020, 10:54 AM
pulkit updated this revision to Diff 22224.Aug 3 2020, 9:14 AM
pulkit updated this revision to Diff 22385.Aug 10 2020, 11:29 AM
pulkit updated this revision to Diff 22400.Aug 11 2020, 5:07 AM
pulkit updated this revision to Diff 22446.Aug 25 2020, 7:40 AM
pulkit updated this revision to Diff 22452.Aug 26 2020, 6:06 AM
pulkit updated this revision to Diff 22657.Sep 16 2020, 7:56 AM

Before approving this, I'd like to have a quick conversation about the file name and documentation.

Do we think we'd be better off having the new config begin with hgrc so all the config files are in proximity in sorted file lists?

What are your plans to document this feature? We definitely want the semantics of this file to be documented in at least hg help hgrc.

Before approving this, I'd like to have a quick conversation about the file name and documentation.
Do we think we'd be better off having the new config begin with hgrc so all the config files are in proximity in sorted file lists?

Yes, sounds like a nice idea. hgrc-non-shared sounds like good name.

What are your plans to document this feature? We definitely want the semantics of this file to be documented in at least hg help hgrc.

I definitely want to document it. Unfortunately missed it. Will update the patch to do so.

pulkit retitled this revision from config: add a .hg/nonsharedrc which won't be shared in share-safe mode to config: add a .hg/hgrc-not-shared which won't be shared in share-safe mode.
pulkit edited the summary of this revision. (Show Details)
pulkit updated this revision to Diff 22721.
pulkit updated this revision to Diff 22774.Sep 23 2020, 3:22 AM
pulkit updated this revision to Diff 23060.Oct 6 2020, 9:50 AM
pulkit updated this revision to Diff 23257.Oct 16 2020, 4:02 AM
marmoute accepted this revision.Oct 16 2020, 6:29 AM

looks good, but please follow up with a patch for hg help hgrc and other location where standard config path might be setup.

This revision was not accepted when it landed; it landed in state Needs Review.
This revision was automatically updated to reflect the committed changes.