mergestate: make some callers not pass pointless node argument
The node argument is set on the created `mergestate` instance, but
these callers don't even look at that instance.
Differential Revision: https://phab.mercurial-scm.org/D9031
py3: don't risk passing a None value to error.ManifestLookupError()
This makes the test case added in
20dd2a259b0f (test-grep: add tests
for --follow with/without --diff and/or paths, 2020-09-11) pass on
Python 3.
Differential Revision: https://phab.mercurial-scm.org/D9030
merge: move initial handling of mergeactions near to later one
We build `mergeactions` in the beginning and use it in end. Let's build it just
before where it will be used. Helps making code much easier to understand.
Differential Revision: https://phab.mercurial-scm.org/D8983
upgrade: support running upgrade if repository has share-safe requirement
This helps us in testing changing requirements of source repository and checking
that the shared repository works.
Differential Revision: https://phab.mercurial-scm.org/D8660
config: add `--shared` flag to edit config file of shared source
With `format.exp-share-safe` enabled, we now read the `.hg/hgrc` of the shared
source also.
This patch adds `--shared` flag to `hg config` command which can be used to edit
that shared source config file. It only works if the repository is shared one
and is shared using the safe method.
Differential Revision: https://phab.mercurial-scm.org/D8659
localrepo: load the share source .hg/hgrc also in share-safe mode (API)
The second part of the Share Safe Plan is to share source repo config also.
This patch adds logic to load the source repo .hg/hgrc if we are in share safe
mode. On unshare, we copy and prepend source config to current repo so that
config which was shared is persisted.
A test is added to show that now if we enable a hook on the source repo, that
also runs on the shared repositories.
API change as a new optional argument sharedvfs added to localrepo.loadhgrc()
Differential Revision: https://phab.mercurial-scm.org/D8656
helptext: document exp-sharesafe in internals/requirements.txt
`exp-sharesafe` is a new requirement and we should document it.
Differential Revision: https://phab.mercurial-scm.org/D8914
share: introduce config option to store requires in .hg/store
This introduces a config option which enabled stores the requirements on a
repository in store instead.
When enabled, `.hg/requires` will contain the `share-safe` requirement which
marks that the requirements are present in the store.
This is done so that repository requirements can be shared with shares made
using `hg share` command.
After this patch, `hg share` checks whether the source repository has
share-safe requirement, if yes, it does not copy the requirements.
Test for the new functionality is added and a test case in exitsing share tests
is also added.
Differential Revision: https://phab.mercurial-scm.org/D8633