rust/hg-core/src/transaction.rs
author Pierre-Yves David <pierre-yves.david@octobus.net>
Thu, 02 Jan 2025 14:50:06 +0100
changeset 52592 87ceb51d124c
parent 52160 e01e84e5e426
permissions -rw-r--r--
run-tests: drop jython support I don't think we heard anything about jython support for the past 15 years, so let's drop special support for it in run-tests.py it is most probably broken at that point.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
52160
e01e84e5e426 rust-revlog: add a Rust-only `InnerRevlog`
Rapha?l Gom?s <rgomes@octobus.net>
parents:
diff changeset
     1
use std::path::Path;
e01e84e5e426 rust-revlog: add a Rust-only `InnerRevlog`
Rapha?l Gom?s <rgomes@octobus.net>
parents:
diff changeset
     2
e01e84e5e426 rust-revlog: add a Rust-only `InnerRevlog`
Rapha?l Gom?s <rgomes@octobus.net>
parents:
diff changeset
     3
/// The Mercurial transaction system is based on the append-only nature
e01e84e5e426 rust-revlog: add a Rust-only `InnerRevlog`
Rapha?l Gom?s <rgomes@octobus.net>
parents:
diff changeset
     4
/// of its core files. This exposes the necessary methods to safely write to
e01e84e5e426 rust-revlog: add a Rust-only `InnerRevlog`
Rapha?l Gom?s <rgomes@octobus.net>
parents:
diff changeset
     5
/// the different core datastructures.
e01e84e5e426 rust-revlog: add a Rust-only `InnerRevlog`
Rapha?l Gom?s <rgomes@octobus.net>
parents:
diff changeset
     6
pub trait Transaction {
e01e84e5e426 rust-revlog: add a Rust-only `InnerRevlog`
Rapha?l Gom?s <rgomes@octobus.net>
parents:
diff changeset
     7
    /// Record the state of an append-only file before update
e01e84e5e426 rust-revlog: add a Rust-only `InnerRevlog`
Rapha?l Gom?s <rgomes@octobus.net>
parents:
diff changeset
     8
    fn add(&mut self, file: impl AsRef<Path>, offset: usize);
e01e84e5e426 rust-revlog: add a Rust-only `InnerRevlog`
Rapha?l Gom?s <rgomes@octobus.net>
parents:
diff changeset
     9
e01e84e5e426 rust-revlog: add a Rust-only `InnerRevlog`
Rapha?l Gom?s <rgomes@octobus.net>
parents:
diff changeset
    10
    // TODO the rest of the methods once we do more in Rust.
e01e84e5e426 rust-revlog: add a Rust-only `InnerRevlog`
Rapha?l Gom?s <rgomes@octobus.net>
parents:
diff changeset
    11
}