Mercurial > public > mercurial-scm > hg
annotate rust/hg-core/src/operations/mod.rs @ 46154:ecbb2fc9418c
copies-rust: rename Oracle.is_ancestor to Oracle.is_overwrite
The core information that we want here is about "does information from revision
X overwrite information in Y". To do so, we check is X is an ancestors of Y, but
this is an implementation details, they could be other ways. We update the
naming to clarify this (and align more with wording used in upcoming changesets.
For people curious about other ways: for example we could record the overwrite
graph as it happens and reuse that to check if X overwrite Y, without having to
do potential expensive `is_ancestor` call on the revision graph.
Differential Revision: https://phab.mercurial-scm.org/D9496
author | Pierre-Yves David <pierre-yves.david@octobus.net> |
---|---|
date | Wed, 02 Dec 2020 16:11:35 +0100 |
parents | dca9cb99971c |
children | 3e2d539d0d1a |
rev | line source |
---|---|
45358
452ece5654c5
hg-core: remove the `Operation` trait
Antoine Cezar <antoine.cezar@octobus.net>
parents:
45113
diff
changeset
|
1 //! A distinction is made between operations and commands. |
452ece5654c5
hg-core: remove the `Operation` trait
Antoine Cezar <antoine.cezar@octobus.net>
parents:
45113
diff
changeset
|
2 //! An operation is what can be done whereas a command is what is exposed by |
452ece5654c5
hg-core: remove the `Operation` trait
Antoine Cezar <antoine.cezar@octobus.net>
parents:
45113
diff
changeset
|
3 //! the cli. A single command can use several operations to achieve its goal. |
452ece5654c5
hg-core: remove the `Operation` trait
Antoine Cezar <antoine.cezar@octobus.net>
parents:
45113
diff
changeset
|
4 |
45541
522ec3dc44b9
hg-core: add a `CatRev` operation
Antoine Cezar <antoine.cezar@octobus.net>
parents:
45536
diff
changeset
|
5 mod cat; |
45527
b56df13a0450
hg-core: define a `DebugData` `Operation`
Antoine Cezar <antoine.cezar@octobus.net>
parents:
45359
diff
changeset
|
6 mod debugdata; |
45113
98817e5daca7
hg-core: define a `dirstate_status` `Operation`
Rapha?l Gom?s <rgomes@octobus.net>
parents:
44980
diff
changeset
|
7 mod dirstate_status; |
44980
5965efb609b6
hg-core: add FindRoot operation to find repository root path
Antoine Cezar <antoine.cezar@octobus.net>
parents:
44974
diff
changeset
|
8 mod find_root; |
45359
0f5286ccf82c
hg-core: define a `ListTrackedFiles` `Operation`
Antoine Cezar <antoine.cezar@octobus.net>
parents:
45358
diff
changeset
|
9 mod list_tracked_files; |
46135
dca9cb99971c
rust: replace most "operation" structs with functions
Simon Sapin <simon.sapin@octobus.net>
parents:
45541
diff
changeset
|
10 pub use cat::{cat, CatRevError, CatRevErrorKind}; |
45528
66756b34c06e
rhg: add a `DebugData` `Command` to prepare the `rhg debugdata` subcommand
Antoine Cezar <antoine.cezar@octobus.net>
parents:
45527
diff
changeset
|
11 pub use debugdata::{ |
46135
dca9cb99971c
rust: replace most "operation" structs with functions
Simon Sapin <simon.sapin@octobus.net>
parents:
45541
diff
changeset
|
12 debug_data, DebugDataError, DebugDataErrorKind, DebugDataKind, |
45528
66756b34c06e
rhg: add a `DebugData` `Command` to prepare the `rhg debugdata` subcommand
Antoine Cezar <antoine.cezar@octobus.net>
parents:
45527
diff
changeset
|
13 }; |
46135
dca9cb99971c
rust: replace most "operation" structs with functions
Simon Sapin <simon.sapin@octobus.net>
parents:
45541
diff
changeset
|
14 pub use find_root::{ |
dca9cb99971c
rust: replace most "operation" structs with functions
Simon Sapin <simon.sapin@octobus.net>
parents:
45541
diff
changeset
|
15 find_root, find_root_from_path, FindRootError, FindRootErrorKind, |
45359
0f5286ccf82c
hg-core: define a `ListTrackedFiles` `Operation`
Antoine Cezar <antoine.cezar@octobus.net>
parents:
45358
diff
changeset
|
16 }; |
45536
639f33f22faf
hg-core: add a `ListRevTrackedFiles` operation
Antoine Cezar <antoine.cezar@octobus.net>
parents:
45535
diff
changeset
|
17 pub use list_tracked_files::{ |
46135
dca9cb99971c
rust: replace most "operation" structs with functions
Simon Sapin <simon.sapin@octobus.net>
parents:
45541
diff
changeset
|
18 list_rev_tracked_files, FilesForRev, ListRevTrackedFilesError, |
45536
639f33f22faf
hg-core: add a `ListRevTrackedFiles` operation
Antoine Cezar <antoine.cezar@octobus.net>
parents:
45535
diff
changeset
|
19 ListRevTrackedFilesErrorKind, |
639f33f22faf
hg-core: add a `ListRevTrackedFiles` operation
Antoine Cezar <antoine.cezar@octobus.net>
parents:
45535
diff
changeset
|
20 }; |
46135
dca9cb99971c
rust: replace most "operation" structs with functions
Simon Sapin <simon.sapin@octobus.net>
parents:
45541
diff
changeset
|
21 pub use list_tracked_files::{ |
dca9cb99971c
rust: replace most "operation" structs with functions
Simon Sapin <simon.sapin@octobus.net>
parents:
45541
diff
changeset
|
22 Dirstate, ListDirstateTrackedFilesError, ListDirstateTrackedFilesErrorKind, |
dca9cb99971c
rust: replace most "operation" structs with functions
Simon Sapin <simon.sapin@octobus.net>
parents:
45541
diff
changeset
|
23 }; |