comparison rust/hg-core/src/repo.rs @ 46601:755c31a1caf9

rhg: Add support for the blackbox extension Only `command` and `commandfinish` events are logged. The `dirty`, `logsource`, `track` and `ignore` configuration items are not supported yet. To indicate commands executed without Python, a `(rust) ` prefix is added in corresponding log messages. Differential Revision: https://phab.mercurial-scm.org/D10012
author Simon Sapin <simon.sapin@octobus.net>
date Tue, 16 Feb 2021 13:08:37 +0100
parents 1f55cd5b292f
children f64b6953db70
comparison
equal deleted inserted replaced
46600:36f3a64846c8 46601:755c31a1caf9
212 pub fn _working_directory_vfs(&self) -> Vfs<'_> { 212 pub fn _working_directory_vfs(&self) -> Vfs<'_> {
213 Vfs { 213 Vfs {
214 base: &self.working_directory, 214 base: &self.working_directory,
215 } 215 }
216 } 216 }
217
218 pub fn dirstate_parents(
219 &self,
220 ) -> Result<crate::dirstate::DirstateParents, HgError> {
221 let dirstate = self.hg_vfs().mmap_open("dirstate")?;
222 let parents =
223 crate::dirstate::parsers::parse_dirstate_parents(&dirstate)?;
224 Ok(parents.clone())
225 }
217 } 226 }
218 227
219 impl Vfs<'_> { 228 impl Vfs<'_> {
220 pub fn join(&self, relative_path: impl AsRef<Path>) -> PathBuf { 229 pub fn join(&self, relative_path: impl AsRef<Path>) -> PathBuf {
221 self.base.join(relative_path) 230 self.base.join(relative_path)