Mercurial > public > mercurial-scm > hg
comparison rust/hg-core/src/lib.rs @ 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 | 47881d2a9d99 |
children | ee943a920606 |
comparison
equal
deleted
inserted
replaced
41308:26ee61c33dee | 41348:2f54f31c41aa |
---|---|
14 /// 4 bytes, and are liberally converted to ints, whence the i32 | 14 /// 4 bytes, and are liberally converted to ints, whence the i32 |
15 pub type Revision = i32; | 15 pub type Revision = i32; |
16 | 16 |
17 pub const NULL_REVISION: Revision = -1; | 17 pub const NULL_REVISION: Revision = -1; |
18 | 18 |
19 /// Same as `mercurial.node.wdirrev` | |
20 /// | |
21 /// This is also equal to `i32::max_value()`, but it's better to spell | |
22 /// it out explicitely, same as in `mercurial.node` | |
23 pub const WORKING_DIRECTORY_REVISION: Revision = 0x7fffffff; | |
24 | |
19 /// The simplest expression of what we need of Mercurial DAGs. | 25 /// The simplest expression of what we need of Mercurial DAGs. |
20 pub trait Graph { | 26 pub trait Graph { |
21 /// Return the two parents of the given `Revision`. | 27 /// Return the two parents of the given `Revision`. |
22 /// | 28 /// |
23 /// Each of the parents can be independently `NULL_REVISION` | 29 /// Each of the parents can be independently `NULL_REVISION` |