Mercurial > hg
diff rust/hg-core/src/dirstate/entry.rs @ 49097:791430b0b2d2
rust-dirstatemap: add `set_tracked` method
This is the new dirstate API that has already been moved to in Python.
It will be used in place of the old `addfile`/`removefile` one.
Differential Revision: https://phab.mercurial-scm.org/D12495
author | Raphaël Gomès <rgomes@octobus.net> |
---|---|
date | Wed, 23 Mar 2022 15:18:12 +0100 |
parents | 362312d61020 |
children | 38e5bb1425dd |
line wrap: on
line diff
--- a/rust/hg-core/src/dirstate/entry.rs Tue Apr 12 23:15:25 2022 -0700 +++ b/rust/hg-core/src/dirstate/entry.rs Wed Mar 23 15:18:12 2022 +0100 @@ -367,6 +367,10 @@ Self::from_v1_data(EntryState::Removed, 0, size, 0) } + pub fn new_tracked() -> Self { + Self::from_v2_data(true, false, false, None, None, None, None) + } + pub fn tracked(&self) -> bool { self.flags.contains(Flags::WDIR_TRACKED) }