Antoine Cezar <antoine.cezar@octobus.net> [Tue, 21 Jul 2020 10:39:30 +0200] rev 45360
rhg: Do not return error when when we really mean ok in commands
Before when a command was successfull `Err(CommandErrorKind::Ok.into())` was
returned which is an oxymoron. Using `Ok(())` when everything is ok seems more
appropriate.
Differential Revision: https://phab.mercurial-scm.org/D8864
Antoine Cezar <antoine.cezar@octobus.net> [Sat, 08 Aug 2020 12:52:39 -0700] rev 45359
hg-core: define a `ListTrackedFiles` `Operation`
List files under Mercurial control in the working directory.
Differential Revision: https://phab.mercurial-scm.org/D8863
Antoine Cezar <antoine.cezar@octobus.net> [Wed, 29 Jul 2020 10:08:09 +0200] rev 45358
hg-core: remove the `Operation` trait
There is no way to currently define a trait which can both return references
to `self` and to passed data, which is what we would need.
Generic Associated Types may fix this and allow us to have a unified interface.
See: rust #44265
Differential Revision: https://phab.mercurial-scm.org/D8862
Antoine Cezar <antoine.cezar@octobus.net> [Tue, 04 Aug 2020 10:59:43 +0200] rev 45357
hg-core: make parse_dirstate return references rather than update hashmaps
Returing a vec is faster than updating a hashmap when the hashmap is not needed
like in `hg files` which just list tracked files.
Returning references avoid copying data when not needed improving performence
for large repositories.
Differential Revision: https://phab.mercurial-scm.org/D8861
Pulkit Goyal <7895pulkit@gmail.com> [Fri, 07 Aug 2020 18:01:48 +0530] rev 45356
repository: introduce constant for internal phase repo requirement and use it
In future we will like to much cleaner logic around which requirement is for
working copy and which can go in store. To start with that, we first need to
de-clutter the requirement values spread around and replace them with constants.
Differential Revision: https://phab.mercurial-scm.org/D8912
Pulkit Goyal <7895pulkit@gmail.com> [Sat, 08 Aug 2020 10:06:32 -0700] rev 45355
repository: introduce constant for sparse repo requirement and use it
In future we will like to much cleaner logic around which requirement is for
working copy and which can go in store. To start with that, we first need to
de-clutter the requirement values spread around and replace them with constants.
Differential Revision: https://phab.mercurial-scm.org/D8911
Pulkit Goyal <7895pulkit@gmail.com> [Fri, 07 Aug 2020 16:02:13 +0530] rev 45354
localrepo: refactor `.hg/requires` reading logic in separate function
In an upcoming patch, we will be reusing this to read `.hg/store/requires`, so
let's separate it in a different function before.
Differential Revision: https://phab.mercurial-scm.org/D8910