# HG changeset patch # User Pierre-Yves David # Date 2020-12-02 15:11:35 # Node ID ecbb2fc9418ce0d95f62d1cdc2579b7045eb2443 # Parent 0a721fc457bfb63790d5d1eeccf0c8d8cae8f94e 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 diff --git a/rust/hg-core/src/copy_tracing.rs b/rust/hg-core/src/copy_tracing.rs --- a/rust/hg-core/src/copy_tracing.rs +++ b/rust/hg-core/src/copy_tracing.rs @@ -244,7 +244,7 @@ impl<'a, A: Fn(Revision, Revision) -> bo } /// returns `true` if `anc` is an ancestors of `desc`, `false` otherwise - fn is_ancestor(&mut self, anc: Revision, desc: Revision) -> bool { + fn is_overwrite(&mut self, anc: Revision, desc: Revision) -> bool { if anc > desc { false } else if anc == desc { @@ -705,7 +705,7 @@ fn compare_value