Implementing share safe plan.

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Implementing share safe plan.

Pulkit Goyal
Hey everyone,

I hope you are doing well.

I am working on implementing the ShareSafePlan
(https://www.mercurial-scm.org/wiki/ShareSafePlan) which aims to fix
bugs caused by shared repositories not sharing config and
requirements. The plan page does a good job in explaining it.

The plan is to share config files and requirements between shared
repositories and introducing a repository requirement for that.

Sharing config files
===============

We need a way to share config of original repository with the shared
ones. The idea is to make shared repositories read `.hg/hgrc` of
original repository and add a `.hg/nonsharedrc` for that repository
only config. This way, by default all configs are shared unless
specified in a different non-shared file.
Another way which I can think of is having a `.hg/store/hgrc` where
user adds config to be shared among shares. This way the configs which
user explicitly added to `.hg/store/hgrc` will be shared.
Which one sounds better?

Sharing requirements
=================

The idea is to have `.hg/store/requires` and `.hg/requires` for store
level and working copy requirements.

Above mentioned work will introduce a new repository requirement
`sharedsafe` which will convey that the repositories can be shared
safely and preventing old clients from making shares of this repo.
Initially the requirement thing will be gated behind a config option.
The plan also involves teaching debugupgraderepo to upgrade
repositories to use the new requirement.

This is mostly a dump of the plan page and I look forward to various
ideas, improvements and discussion around how to implement this plan.

Thanks!
Pulkit
_______________________________________________
Mercurial-devel mailing list
[hidden email]
https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel
Reply | Threaded
Open this post in threaded view
|

Re: Implementing share safe plan.

Augie Fackler-2
(+martinvonz for visibility)

On Mon, Apr 13, 2020 at 07:23:45PM +0530, Pulkit Goyal wrote:

> Hey everyone,
>
> I hope you are doing well.
>
> I am working on implementing the ShareSafePlan
> (https://www.mercurial-scm.org/wiki/ShareSafePlan) which aims to fix
> bugs caused by shared repositories not sharing config and
> requirements. The plan page does a good job in explaining it.
>
> The plan is to share config files and requirements between shared
> repositories and introducing a repository requirement for that.
>
> Sharing config files
> ===============
>
> We need a way to share config of original repository with the shared
> ones. The idea is to make shared repositories read `.hg/hgrc` of
> original repository and add a `.hg/nonsharedrc` for that repository
> only config. This way, by default all configs are shared unless
> specified in a different non-shared file.
> Another way which I can think of is having a `.hg/store/hgrc` where
> user adds config to be shared among shares. This way the configs which
> user explicitly added to `.hg/store/hgrc` will be shared.
> Which one sounds better?

I suspect adding a new non-shared rc file is better, as it'd be
somewhat less surprising? I'm having trouble envisioning a usecase for
a non-shared config file, but that's probably lack of imagination on
my part.

>
> Sharing requirements
> =================
>
> The idea is to have `.hg/store/requires` and `.hg/requires` for store
> level and working copy requirements.
>
> Above mentioned work will introduce a new repository requirement
> `sharedsafe` which will convey that the repositories can be shared
> safely and preventing old clients from making shares of this repo.
> Initially the requirement thing will be gated behind a config option.
> The plan also involves teaching debugupgraderepo to upgrade
> repositories to use the new requirement.
>
> This is mostly a dump of the plan page and I look forward to various
> ideas, improvements and discussion around how to implement this plan.
>

This all seems sensible to me.

> Thanks!
> Pulkit
> _______________________________________________
> Mercurial-devel mailing list
> [hidden email]
> https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel
_______________________________________________
Mercurial-devel mailing list
[hidden email]
https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel
Reply | Threaded
Open this post in threaded view
|

Re: Implementing share safe plan.

Pulkit Goyal
Update: The patches are in review on phabricator starting from D8631.
I am targeting that we release the functionality in the upcoming major
release so that users can start testing it.

On Tue, Jun 23, 2020 at 1:42 AM Augie Fackler <[hidden email]> wrote:

>
> (+martinvonz for visibility)
>
> On Mon, Apr 13, 2020 at 07:23:45PM +0530, Pulkit Goyal wrote:
> > Hey everyone,
> >
> > I hope you are doing well.
> >
> > I am working on implementing the ShareSafePlan
> > (https://www.mercurial-scm.org/wiki/ShareSafePlan) which aims to fix
> > bugs caused by shared repositories not sharing config and
> > requirements. The plan page does a good job in explaining it.
> >
> > The plan is to share config files and requirements between shared
> > repositories and introducing a repository requirement for that.
> >
> > Sharing config files
> > ===============
> >
> > We need a way to share config of original repository with the shared
> > ones. The idea is to make shared repositories read `.hg/hgrc` of
> > original repository and add a `.hg/nonsharedrc` for that repository
> > only config. This way, by default all configs are shared unless
> > specified in a different non-shared file.
> > Another way which I can think of is having a `.hg/store/hgrc` where
> > user adds config to be shared among shares. This way the configs which
> > user explicitly added to `.hg/store/hgrc` will be shared.
> > Which one sounds better?
>
> I suspect adding a new non-shared rc file is better, as it'd be
> somewhat less surprising? I'm having trouble envisioning a usecase for
> a non-shared config file, but that's probably lack of imagination on
> my part.
>
> >
> > Sharing requirements
> > =================
> >
> > The idea is to have `.hg/store/requires` and `.hg/requires` for store
> > level and working copy requirements.
> >
> > Above mentioned work will introduce a new repository requirement
> > `sharedsafe` which will convey that the repositories can be shared
> > safely and preventing old clients from making shares of this repo.
> > Initially the requirement thing will be gated behind a config option.
> > The plan also involves teaching debugupgraderepo to upgrade
> > repositories to use the new requirement.
> >
> > This is mostly a dump of the plan page and I look forward to various
> > ideas, improvements and discussion around how to implement this plan.
> >
>
> This all seems sensible to me.

Great thank you!
>
> > Thanks!
> > Pulkit
> > _______________________________________________
> > Mercurial-devel mailing list
> > [hidden email]
> > https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel
_______________________________________________
Mercurial-devel mailing list
[hidden email]
https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel
Reply | Threaded
Open this post in threaded view
|

Re: Implementing share safe plan.

Pierre-Yves David-2
In reply to this post by Augie Fackler-2
As I commented on Phabricator, I also lean toward having a new file for
non-shared to be better in absolute.

However, we will need a large BC flag (and related communication) when
we make safeshare the default since this is a significant behavior
change that might affect some user in the wild.

On 6/22/20 10:12 PM, Augie Fackler wrote:

> (+martinvonz for visibility)
>
> On Mon, Apr 13, 2020 at 07:23:45PM +0530, Pulkit Goyal wrote:
>> Hey everyone,
>>
>> I hope you are doing well.
>>
>> I am working on implementing the ShareSafePlan
>> (https://www.mercurial-scm.org/wiki/ShareSafePlan) which aims to fix
>> bugs caused by shared repositories not sharing config and
>> requirements. The plan page does a good job in explaining it.
>>
>> The plan is to share config files and requirements between shared
>> repositories and introducing a repository requirement for that.
>>
>> Sharing config files
>> ===============
>>
>> We need a way to share config of original repository with the shared
>> ones. The idea is to make shared repositories read `.hg/hgrc` of
>> original repository and add a `.hg/nonsharedrc` for that repository
>> only config. This way, by default all configs are shared unless
>> specified in a different non-shared file.
>> Another way which I can think of is having a `.hg/store/hgrc` where
>> user adds config to be shared among shares. This way the configs which
>> user explicitly added to `.hg/store/hgrc` will be shared.
>> Which one sounds better?
>
> I suspect adding a new non-shared rc file is better, as it'd be
> somewhat less surprising? I'm having trouble envisioning a usecase for
> a non-shared config file, but that's probably lack of imagination on
> my part.
>
>>
>> Sharing requirements
>> =================
>>
>> The idea is to have `.hg/store/requires` and `.hg/requires` for store
>> level and working copy requirements.
>>
>> Above mentioned work will introduce a new repository requirement
>> `sharedsafe` which will convey that the repositories can be shared
>> safely and preventing old clients from making shares of this repo.
>> Initially the requirement thing will be gated behind a config option.
>> The plan also involves teaching debugupgraderepo to upgrade
>> repositories to use the new requirement.
>>
>> This is mostly a dump of the plan page and I look forward to various
>> ideas, improvements and discussion around how to implement this plan.
>>
>
> This all seems sensible to me.
>
>> Thanks!
>> Pulkit
>> _______________________________________________
>> Mercurial-devel mailing list
>> [hidden email]
>> https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel
> _______________________________________________
> Mercurial-devel mailing list
> [hidden email]
> https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel
>

--
Pierre-Yves David
_______________________________________________
Mercurial-devel mailing list
[hidden email]
https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel