rust/hg-core/src/transaction.rs
author Pierre-Yves David <pierre-yves.david@octobus.net>
Tue, 11 Mar 2025 02:29:42 +0100
branchstable
changeset 53042 cdd7bf612c7b
parent 52160 e01e84e5e426
permissions -rw-r--r--
bundle-spec: properly format boolean parameter (issue6960) This was breaking automatic clone bundle generation. This changeset fixes it and add a test to catch it in the future.

use std::path::Path;

/// The Mercurial transaction system is based on the append-only nature
/// of its core files. This exposes the necessary methods to safely write to
/// the different core datastructures.
pub trait Transaction {
    /// Record the state of an append-only file before update
    fn add(&mut self, file: impl AsRef<Path>, offset: usize);

    // TODO the rest of the methods once we do more in Rust.
}