Patchwork [1,of,3,STABLE] rust: working directory revision number constant

login
register
mail settings
Submitter Georges Racinet
Date Jan. 24, 2019, 4:23 a.m.
Message ID <56b74abf5ee6df48ec2d.1548303831@ishtar>
Download mbox | patch
Permalink /patch/37951/
State Accepted
Headers show

Comments

Georges Racinet - Jan. 24, 2019, 4:23 a.m.
# HG changeset patch
# User Georges Racinet <georges.racinet@octobus.net>
# Date 1548247167 18000
#      Wed Jan 23 07:39:27 2019 -0500
# Branch stable
# Node ID 56b74abf5ee6df48ec2debf1f004725cfcc93854
# Parent  13c23396c7fe1633a2336b29e3a32b9b76274f28
# EXP-Topic rust-wdirunsupported
rust: working directory revision number constant

This introduces the constant, but does not use it anywhere yet.

Patch

diff -r 13c23396c7fe -r 56b74abf5ee6 rust/hg-core/src/lib.rs
--- a/rust/hg-core/src/lib.rs	Sun Jan 20 11:57:36 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`.