Mercurial > hg
comparison rust/hg-core/src/dirstate_tree/dirstate_map.rs @ 48421:2097f63575a5
rhg: Add Repo::write_dirstate
This method is not used yet. It saves to disk any mutation that was done to
the `Repo`’s dirstate through `Repo::dirstate_map_mut`. It takes care of
dirstate-v1 v.s. dirstate-v2, dockets, data files, appending when possible,
etc.
Differential Revision: https://phab.mercurial-scm.org/D11839
author | Simon Sapin <simon.sapin@octobus.net> |
---|---|
date | Thu, 02 Dec 2021 15:10:03 +0100 |
parents | c1b633db67fc |
children | 473af5cbc209 |
comparison
equal
deleted
inserted
replaced
48420:c7c23bb036c9 | 48421:2097f63575a5 |
---|---|
949 /// (false). | 949 /// (false). |
950 #[timed] | 950 #[timed] |
951 pub fn pack_v2( | 951 pub fn pack_v2( |
952 &self, | 952 &self, |
953 can_append: bool, | 953 can_append: bool, |
954 ) -> Result<(Vec<u8>, Vec<u8>, bool), DirstateError> { | 954 ) -> Result<(Vec<u8>, on_disk::TreeMetadata, bool), DirstateError> { |
955 let map = self.get_map(); | 955 let map = self.get_map(); |
956 on_disk::write(map, can_append) | 956 on_disk::write(map, can_append) |
957 } | 957 } |
958 | 958 |
959 pub fn status<'a>( | 959 pub fn status<'a>( |