Mercurial > hg
changeset 41348:2f54f31c41aa stable
rust: working directory revision number constant
This introduces the constant, but does not use it anywhere yet.
author | Georges Racinet <georges.racinet@octobus.net> |
---|---|
date | Wed, 23 Jan 2019 07:39:27 -0500 |
parents | 26ee61c33dee |
children | ee943a920606 |
files | rust/hg-core/src/lib.rs |
diffstat | 1 files changed, 6 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/rust/hg-core/src/lib.rs Thu Jan 24 21:38:02 2019 +0900 +++ b/rust/hg-core/src/lib.rs Wed Jan 23 07:39:27 2019 -0500 @@ -16,6 +16,12 @@ pub const NULL_REVISION: Revision = -1; +/// Same as `mercurial.node.wdirrev` +/// +/// This is also equal to `i32::max_value()`, but it's better to spell +/// it out explicitely, same as in `mercurial.node` +pub const WORKING_DIRECTORY_REVISION: Revision = 0x7fffffff; + /// The simplest expression of what we need of Mercurial DAGs. pub trait Graph { /// Return the two parents of the given `Revision`.