rust/hg-core/src/dirstate.rs
changeset 47374 bd88b6bfd8da
parent 47335 ed1583a845d2
child 47511 eaae39894312
equal deleted inserted replaced
47373:d2fb8b4adcc3 47374:bd88b6bfd8da
     5 // This software may be used and distributed according to the terms of the
     5 // This software may be used and distributed according to the terms of the
     6 // GNU General Public License version 2 or any later version.
     6 // GNU General Public License version 2 or any later version.
     7 
     7 
     8 use crate::dirstate_tree::on_disk::DirstateV2ParseError;
     8 use crate::dirstate_tree::on_disk::DirstateV2ParseError;
     9 use crate::errors::HgError;
     9 use crate::errors::HgError;
       
    10 use crate::revlog::node::NULL_NODE;
    10 use crate::revlog::Node;
    11 use crate::revlog::Node;
    11 use crate::utils::hg_path::{HgPath, HgPathBuf};
    12 use crate::utils::hg_path::{HgPath, HgPathBuf};
    12 use crate::FastHashMap;
    13 use crate::FastHashMap;
    13 use bytes_cast::{unaligned, BytesCast};
    14 use bytes_cast::{unaligned, BytesCast};
    14 use std::convert::TryFrom;
    15 use std::convert::TryFrom;
    21 #[derive(Debug, PartialEq, Clone, BytesCast)]
    22 #[derive(Debug, PartialEq, Clone, BytesCast)]
    22 #[repr(C)]
    23 #[repr(C)]
    23 pub struct DirstateParents {
    24 pub struct DirstateParents {
    24     pub p1: Node,
    25     pub p1: Node,
    25     pub p2: Node,
    26     pub p2: Node,
       
    27 }
       
    28 
       
    29 impl DirstateParents {
       
    30     pub const NULL: Self = Self {
       
    31         p1: NULL_NODE,
       
    32         p2: NULL_NODE,
       
    33     };
    26 }
    34 }
    27 
    35 
    28 /// The C implementation uses all signed types. This will be an issue
    36 /// The C implementation uses all signed types. This will be an issue
    29 /// either when 4GB+ source files are commonplace or in 2038, whichever
    37 /// either when 4GB+ source files are commonplace or in 2038, whichever
    30 /// comes first.
    38 /// comes first.