Mercurial > public > mercurial-scm > hg
diff rust/hg-core/src/dirstate.rs @ 47374:bd88b6bfd8da
rhg: Add support for dirstate-v2
Differential Revision: https://phab.mercurial-scm.org/D10804
author | Simon Sapin <simon.sapin@octobus.net> |
---|---|
date | Tue, 25 May 2021 09:20:30 +0200 |
parents | ed1583a845d2 |
children | eaae39894312 |
line wrap: on
line diff
--- a/rust/hg-core/src/dirstate.rs Wed May 26 11:53:37 2021 +0200 +++ b/rust/hg-core/src/dirstate.rs Tue May 25 09:20:30 2021 +0200 @@ -7,6 +7,7 @@ use crate::dirstate_tree::on_disk::DirstateV2ParseError; use crate::errors::HgError; +use crate::revlog::node::NULL_NODE; use crate::revlog::Node; use crate::utils::hg_path::{HgPath, HgPathBuf}; use crate::FastHashMap; @@ -25,6 +26,13 @@ pub p2: Node, } +impl DirstateParents { + pub const NULL: Self = Self { + p1: NULL_NODE, + p2: NULL_NODE, + }; +} + /// The C implementation uses all signed types. This will be an issue /// either when 4GB+ source files are commonplace or in 2038, whichever /// comes first.