Upgrading the `git` subcommand to the latest Sanakirja and Libpijul

[?]
Jan 4, 2021, 9:38 PM
A3DMBJJAPLS6ASSZ7JVVVULRQNZCF2WKYTRUD7EY7PKVYABSATFAC

Dependencies

  • [2] BJOZ25EU Deterministic Git import
  • [3] TPEH2XNB 1.0.0-alpha.28, with Tokio 1.0
  • [4] CVAT6LN3 Fixing git import, and adding more useful feedback (with `RUST_LOG="pijul=info"`)
  • [5] PJ7T2VFL Do not hang on locked repositories
  • [6] CCLLB7OI Upgrading to Sanakirja 0.15 + version bump
  • [7] MWKDNWZW Version bump
  • [8] 6DOXSHWG Cleanup, and version bump
  • [9] SXEYMYF7 Fixing the bad changes in history (unfortunately, by rebooting).
  • [10] I52XSRUH Massive cleanup, and simplification
  • [11] UFCZKKLX Upgrading to the latest Sanakirja/Rand
  • [12] R3H7D42U Debugging `pijul git`: proper error reporting
  • [13] SZWBLWZ4 Reading ~/.ssh/config
  • [14] RR65HCKO Thrussh versions
  • [15] VO5OQW4W Removing anyhow in libpijul
  • [16] ZHABNS3S Canonicalize all paths
  • [17] AXVPNZ2N commands/git: fix imports
  • [18] GBLM3JLR Fix options of git subcommand
  • [19] KWAMD2KR A few fixes in the documentation comments
  • [20] BXD3IQYN Fixing --features git
  • [21] 2K7JLB4Z No pager on Windows
  • [22] 23LVKATN Use pager crate for log output
  • [23] WIORLB47 Version bump
  • [24] UCQD3JDH Fix build errors caused by sanakirja 0.14
  • [25] L4JXJHWX pijul/*: reorganize imports and remove extern crate

Change contents

  • edit in pijul/src/commands/git.rs at line 7
    [4.2237]
    [4.160]
    use anyhow::bail;
  • edit in pijul/src/commands/git.rs at line 13
    [4.55][4.55:77]()
    use thiserror::Error;
  • edit in pijul/src/commands/git.rs at line 28
    [4.137623][4.137623:137833](),[4.137833][4.3421:3454](),[4.3454][4.137876:137886](),[4.137876][4.137876:137886]()
    #[derive(Debug, Error)]
    pub enum Error {
    #[error("Pijul channel changed since last import. Please unrecord channel {} to state {}", channel, state.to_base32())]
    MerkleChanged {
    channel: String,
    state: libpijul::Merkle,
    },
    }
  • replacement in pijul/src/commands/git.rs at line 102
    [2.86][4.140363:140419](),[4.140363][4.140363:140419]()
    for (commit, merk) in txn_git.iter(&db, None) {
    [2.86]
    [4.140419]
    for x in txn_git.iter(&db, None)? {
    let (commit, merk) = x?;
  • replacement in pijul/src/commands/git.rs at line 232
    [4.144237][4.144237:144297]()
    let channel = txn.load_channel(&oid_).unwrap();
    [4.144237]
    [4.144297]
    let channel = txn.load_channel(&oid_)?.unwrap();
  • replacement in pijul/src/commands/git.rs at line 234
    [4.144337][4.28:91]()
    .changeid_reverse_log(&channel.borrow(), None)
    [4.144337]
    [4.144396]
    .changeid_reverse_log(&channel.borrow(), None)?
  • replacement in pijul/src/commands/git.rs at line 236
    [4.144420][4.144420:144447]()
    .unwrap();
    [4.144420]
    [4.144447]
    .unwrap()?;
  • replacement in pijul/src/commands/git.rs at line 238
    [4.144482][4.144482:144648]()
    return Err((Error::MerkleChanged {
    channel: oid_,
    state: merkle,
    })
    .into());
    [4.144482]
    [4.144648]
    bail!("Pijul channel changed since last import. Please unrecord channel {} to state {}", oid_, merkle.to_base32())
  • replacement in pijul/src/commands/git.rs at line 273
    [4.145980][4.145980:146062]()
    let parent_channel = txn.load_channel(&parent_name).unwrap();
    [4.145980]
    [4.146062]
    let parent_channel = txn.load_channel(&parent_name)?.unwrap();
  • replacement in pijul/src/commands/git.rs at line 278
    [4.79][4.79:135]()
    parent_channel.borrow().name(),
    [4.79]
    [4.135]
    MutTxn::name(&parent_channel.borrow()),
  • replacement in pijul/src/commands/git.rs at line 365
    [4.149112][4.149112:149236]()
    for (n, (h, _)) in txn.log(&p_channel.borrow(), 0) {
    if txn.has_change(&channel, h).is_none() {
    [4.149112]
    [4.149236]
    for x in txn.log(&p_channel.borrow(), 0)? {
    let (n, (h, _)) = x?;
    if txn.has_change(&channel, h)?.is_none() {
  • replacement in pijul/src/commands/git.rs at line 387
    [4.149765][4.149765:149816]()
    fn import_commit_parents<T: TxnTExt + MutTxnTExt>(
    [4.149765]
    [4.149816]
    fn import_commit_parents<T: TxnTExt + MutTxnTExt + GraphIter>(
  • replacement in pijul/src/commands/git.rs at line 403
    [4.150321][4.150321:150389]()
    info!("applying {:?} to {:?}", h, channel.borrow().name());
    [4.150321]
    [4.150389]
    info!(
    "applying {:?} to {:?}",
    h,
    MutTxn::name(&parent_channel.borrow())
    );
  • replacement in pijul/src/commands/git.rs at line 681
    [4.160679][4.294:396]()
    ) -> Result<(usize, Option<libpijul::Hash>, libpijul::Merkle), libpijul::LocalApplyError<T::Error>>
    {
    [4.160679]
    [4.160829]
    ) -> Result<
    (usize, Option<libpijul::Hash>, libpijul::Merkle),
    libpijul::LocalApplyError<T::GraphError>,
    > {
  • replacement in pijul/Cargo.toml at line 64
    [4.197874][4.19555:19576]()
    sanakirja = "0.15.2"
    [4.197874]
    [4.197895]
    sanakirja = "0.15.4"
  • replacement in Cargo.lock at line 1760
    [4.1072132][3.3165:3184]()
    version = "0.15.3"
    [4.1072132]
    [4.1072151]
    version = "0.15.4"
  • replacement in Cargo.lock at line 1762
    [4.1072216][3.3185:3263]()
    checksum = "7826a692e79c80214f37fc838ae140a4f2148c4415a452ee5bf9f49c52e59765"
    [4.1072216]
    [4.1072294]
    checksum = "e2e2143f1c91f6acd12f5465ea1c040238afc18a7fc3a875ccd42c993d72d50c"
  • edit in Cargo.lock at line 1771
    [4.1763]
    [4.1072372]
    "thiserror",