Note:

This page is primarily intended for developers of Mercurial.

Share Share Plan

Status: Project

Main proponents: Pierre-YvesDavid

/!\ This is a speculative project and does not represent any firm decisions on future behavior.

Shares does not shares some critical component with their source, leading to various important bugs. The should fix them behind a safeshare requirements

1. Goal

There are currently some important bugs:

* shares does not read the source repository config this become a large issues for:

* shares does not read the source repository requires file. This lead to the share possibly missing important format upgrade from their source.

The solution would be to introduce a new sharesafe requirement that fix both the config and requirement needs

2. Detailed description

To make sure older version cannot create shares from safe repo, we introduce a new sharesafe requirements. New behavior will be gated behind it.

2.1. requirements

Right now, shares copy the requirements at share time and never read them from source again. This mean shares will lag behind if the source repository is updated. This can have serious consequences (eg: repo corruption, bypassed hooks). To avoid this, the share should use the source requirements as the source of truth. However, some requirements are working copy specific. For such requirements, reading them from the source is meaningless and we need to still be able to add them on the share.

The best option seems to move the default location for requirements in .hg/store/requires and to explicitly flag the working copy specific ones. The sharesafe requirement needs to also lives in .hg/requires to fend off older clients.

2.2. config

The current behavior prevent hooks and other information to be propagated to shares. This can lead to very serious issues. For this reason, it seems "reasonable" to /!\ break backward compatibility /!\ and have shares read the source .hg/hgrc by default. For case that requires non-shared config, a new .hg/nonsharedrc is to be introduced.

3. Roadmap

4. See Also


CategoryDeveloper CategoryNewFeatures