##// END OF EJS Templates
configitems: move blackbox's config items to the new configitems.toml...
configitems: move blackbox's config items to the new configitems.toml In order for the Rust code to gain access to default values of in-core extensions that have a Rust implementation, we need to centralize them alongside the core items declarations. This is the first and so far only one of the extensions that have gained Rust support, I don't think it's worth the churn to move the rest of the extension's configitems yet.

File last commit:

r50825:e98fd81b default
r51658:7f8f6fe1 default
Show More
dirstate.rs
50 lines | 1.1 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 fn is_merge(&self) -> bool {
!(self.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,
>;