vfs: add a `register_file` method on the vfs class
This is used by the fncache vfs to register new file. Until now, `fncache` have
been doing this "automatically" by monitoring write pattern. However this is
fragile and when we copy files in place by other means, we need something more
robuts. So we add an explicit method to do so.
Differential Revision: https://phab.mercurial-scm.org/D10851
clone: use "official" API to create local clone destination
This make sure we have a properly created, fully functional repository early.
This will be useful to simply the hardlink/copy phases of the local clone to
make it share more of its logic with the similar "stream" cloning.
This has a minor impact of the test and the resulting repository has is better initialized (eg: the `wcache` directory is pre-created.)
Differential Revision: https://phab.mercurial-scm.org/D10850
localrepo: introduce a clone_requirements function
This function take a source repository and return a relevant set of
requirements that should be used by a copy clone.
This will help make the creation of the destination repository during copy
clone simpler.
Differential Revision: https://phab.mercurial-scm.org/D10849
createrepository: allow to directly pass the target requirements
This is useful when doing a local clone that copies store contents, it will
requires the destination to use the very same store requirements so directly
providing them will be simpler and safer
Differential Revision: https://phab.mercurial-scm.org/D10848
narrowbundle: use new context manager for silencing the ui
Same reasoning as the previous change. This affects a few tests
because of the hack from
d7304434390f (changegroup: move message about
added changes to transaction summary, 2019-09-08).
Differential Revision: https://phab.mercurial-scm.org/D10886
debugbackupbundle: use new context manager for silencing the ui
A difference between setting `ui.quiet` and using `ui.silent()` is
that the latter also silences `ui.write()` calls. That's practically
always what one wants, including here, I think.
Differential Revision: https://phab.mercurial-scm.org/D10885