##// END OF EJS Templates
dirstate-v2: freeze the on-disk format...
dirstate-v2: freeze the on-disk format It seems the format as reached a good balance. With a core of new capabilities that motivated it initially and enough new feature and room for future improvement to be a clear progress we can set a milestone for. Having the format frozen will help the feature to get real life testing, outside of the test suite. The feature itself stay experimental but the config gains a new name to avoid people enable non-frozen version by default. If too many bugs are reported during the RC we might move the format back to experimental and drop its support in future version (in favor of a new one) Differential Revision: https://phab.mercurial-scm.org/D11709

File last commit:

r48882:bf8837e3 default
r49116:bf11ff22 default
Show More
dirstate.rs
46 lines | 1.0 KiB | application/rls-services+xml | RustLexer
// dirstate module
//
// Copyright 2019 Raphaël Gomès <rgomes@octobus.net>
//
// This software may be used and distributed according to the terms of the
// GNU General Public License version 2 or any later version.
use crate::dirstate_tree::on_disk::DirstateV2ParseError;
use crate::revlog::node::NULL_NODE;
use crate::revlog::Node;
use crate::utils::hg_path::HgPath;
use bytes_cast::BytesCast;
pub mod dirs_multiset;
pub mod entry;
pub mod parsers;
pub mod status;
pub use self::entry::*;
#[derive(Debug, PartialEq, Copy, Clone, BytesCast)]
#[repr(C)]
pub struct DirstateParents {
pub p1: Node,
pub p2: Node,
}
impl DirstateParents {
pub const NULL: Self = Self {
p1: NULL_NODE,
p2: NULL_NODE,
};
}
pub type StateMapIter<'a> = Box<
dyn Iterator<
Item = Result<(&'a HgPath, DirstateEntry), DirstateV2ParseError>,
> + Send
+ 'a,
>;
pub type CopyMapIter<'a> = Box<
dyn Iterator<Item = Result<(&'a HgPath, &'a HgPath), DirstateV2ParseError>>
+ Send
+ 'a,
>;