development heads up: push/pull improvements

Pierre-Yves David pierre-yves.david at ens-lyon.org
Wed Mar 17 15:05:52 UTC 2021


Hello everyone,

I have been working on improvements to push and pull. The core goal can 
be summarized as:
* make it simpler to push/pull to multiple destinations
* make it simpler to control default behavior from various destinations.

The first bits of this already landed.

* Support for multiple destinations for pull (push is in review))
   https://www.mercurial-scm.org/repo/hg-committed/rev/685383486d0a
* Support for default value for path suboption:
   https://www.mercurial-scm.org/repo/hg-committed/rev/e3f15c553522

My plan is to follow up with an handful of other improvements:

1) Make it possible for a path (in [paths] section), to reference 
another one using `path://PATHNAME`, inheriting its configuration. The 
inherited configuration can then be overwritten in the new path

2) Make is possible for a path to reference a list of other paths. eg:

   [paths]
   main = https://mercurial-scm.org/repo/hg
   committed = https://mercurial-scm.org/repo/hg-committed
   all = path://main, path://committed

3) add sub-options to control usage of existing flags. For example the 
following config would make `--new-branch` on by default for the `devel` 
path.

   [paths]
   devel = ssh://foo…
   devel:new-branch=yes

The possible values would be:

* never: the flag is never set, using --new-branch would abort the push
* no: the flag default to False, passing --new-branch enables it
* default: the default value for the flag is used
* yes: the flag default to True, passing --no-new-branch disables it
* always: the flag is always set, --no-new-branch would abort the push

4) adding more flag

They are a couple of check that does not have there own flag yet and are 
only covered by `--force`. For example to push new heads. I know that 
Manuel Jacob had idea about how to express these flag, so I CCed him on 
this email.

This work is not my primary focus, but hope to make enough progress to 
have most of it completed by the 5.8 freeze, in one month.

Cheers,

-- 
Pierre-Yves David


More information about the Mercurial-devel mailing list