Fixing the Git features with the latest Pijul (+ conflicts in Cargo.toml)

[?]
Jan 5, 2021, 11:33 AM
B3QWIGDERNMB3M6P5WTWP5CN2DB3KCS7MVTEPC2XVJ237ZXVQGMAC

Dependencies

  • [2] VLPIKNFS clone: make source remote the default
  • [3] GHO6DWPI Refactoring iterators
  • [4] KUMJITTF Version bump in the lockfiles
  • [5] LYTVEPH3 Avoid cloning into an existing path
  • [6] A3DMBJJA Upgrading the `git` subcommand to the latest Sanakirja and Libpijul
  • [7] H565UUPC Use correct pattern for workspace interdependencies
  • [8] G734WNM6 flake.nix: use crate2nix
  • [9] H3NAKE2I Adding num_cpus to Cargo.lock
  • [10] ZTVNGFNT Version bump
  • [11] TPEH2XNB 1.0.0-alpha.28, with Tokio 1.0
  • [12] WIORLB47 Version bump
  • [13] 3M7WBE24 Re-adding anyhow in the tests of libpijul
  • [14] 6RVT5X4L Current state: return zero instead of an Option if there is no change on the channel
  • [15] ZHABNS3S Canonicalize all paths
  • [16] SXEYMYF7 Fixing the bad changes in history (unfortunately, by rebooting).
  • [17] XWETQ4DE Upgrading versions
  • [18] I52XSRUH Massive cleanup, and simplification
  • [19] CVAT6LN3 Fixing git import, and adding more useful feedback (with `RUST_LOG="pijul=info"`)
  • [20] UFCZKKLX Upgrading to the latest Sanakirja/Rand
  • [21] CCLLB7OI Upgrading to Sanakirja 0.15 + version bump
  • [22] 6DOXSHWG Cleanup, and version bump
  • [23] Q45QHPO4 Feedback on network stuff
  • [24] 7RAQWUMU git import needs to record initial commit
  • [25] SAGSYAPX Various version bumps
  • [26] 23LVKATN Use pager crate for log output
  • [27] OUWD436A Version bump
  • [28] BXD3IQYN Fixing --features git
  • [29] G6YZ7U65 Version bump
  • [30] B5Z4IMEU Generating Cargo.nix for pijul 1.0.0-alpha.6
  • [31] NX5I5H53 New published versions
  • [32] 3S4DR77Z Version updates
  • [33] WI5BS6BS New published versions
  • [34] H62VFFJE Cargo.nix, and solving conflicts
  • [35] 5BRU2RRW Cleanup (debugging a crash related to trees/inodes)
  • [36] SPA2OL5I keep-changes feature (default) to avoid deleting problematic changes
  • [37] FXT5FS5W Updating Cargo.nix
  • [38] OCBM7IFE New release: pijul-1.0.0-alpha.8
  • [39] YX3VCEOM Version bump
  • [40] VO5OQW4W Removing anyhow in libpijul
  • [41] R3H7D42U Debugging `pijul git`: proper error reporting
  • [42] XAY4DYRR Version bump
  • [43] Q7CAYX5N Fixing Windows compilation
  • [44] JACZWIJ6 Version bump
  • [45] PJ7T2VFL Do not hang on locked repositories

Change contents

  • edit in pijul/src/commands/git.rs at line 276
    [8.146114][8.0:79](),[8.79][6.473:537](),[6.537][8.135:187](),[8.135][8.135:187]()
    debug!(
    "fork channel: {:?} {:?}",
    MutTxn::name(&parent_channel.borrow()),
    name
    );
  • replacement in pijul/src/commands/git.rs at line 342
    [8.148275][8.3868:3910]()
    ) -> (bool, Vec<(libpijul::Hash, u64)>) {
    [8.148275]
    [8.148327]
    ) -> Result<(bool, Vec<(libpijul::Hash, u64)>), anyhow::Error> {
  • replacement in pijul/src/commands/git.rs at line 359
    [8.149048][8.149048:149112]()
    let p_channel = txn.load_channel(&p_name).unwrap();
    [8.149048]
    [6.538]
    let p_channel = txn.load_channel(&p_name)?.unwrap();
  • replacement in pijul/src/commands/git.rs at line 378
    [8.149661][8.149661:149690]()
    (needs_output, to_apply)
    [8.149661]
    [8.149690]
    Ok((needs_output, to_apply))
  • replacement in pijul/src/commands/git.rs at line 392
    [8.150070][8.150070:150152]()
    let (needs_output, to_apply) = make_apply_plan(repo, txn, channel, dag, oid);
    [8.150070]
    [8.150152]
    let (needs_output, to_apply) = make_apply_plan(repo, txn, channel, dag, oid)?;
  • replacement in pijul/src/commands/git.rs at line 398
    [8.150321][6.757:886]()
    info!(
    "applying {:?} to {:?}",
    h,
    MutTxn::name(&parent_channel.borrow())
    );
    [8.150321]
    [6.886]
    info!("applying {:?} to {:?}", h, T::name(&channel.borrow()));
  • replacement in pijul/src/commands/git.rs at line 402
    [8.150512][8.92:167]()
    check_alive_debug(&repo.repo.changes, txn, channel, line!())?;
    [8.150512]
    [8.150581]
    check_alive_debug(&repo.repo.changes, txn, &channel.borrow(), line!())?;
  • replacement in pijul/src/commands/git.rs at line 406
    [8.150649][8.168:239]()
    check_alive_debug(&repo.repo.changes, txn, channel, line!())?;
    [8.150649]
    [8.150714]
    check_alive_debug(&repo.repo.changes, txn, &channel.borrow(), line!())?;
  • replacement in pijul/src/commands/git.rs at line 416
    [8.151103][8.151103:151135]()
    channel.borrow().name()
    [8.151103]
    [8.151135]
    T::name(&channel.borrow()),
  • replacement in pijul/src/commands/git.rs at line 430
    [8.151569][8.240:315]()
    check_alive_debug(&repo.repo.changes, txn, channel, line!())?;
    [8.151569]
    [8.151638]
    check_alive_debug(&repo.repo.changes, txn, &channel.borrow(), line!())?;
  • replacement in pijul/src/commands/git.rs at line 437
    [8.151772][8.151772:151823]()
    check_tree_inodes(txn, &channel.borrow());
    [8.151772]
    [8.151823]
    check_tree_inodes(txn, T::graph(&channel.borrow()));
  • replacement in pijul/src/commands/git.rs at line 516
    [8.154693][8.154693:154875]()
    if let Some(inode) = txn.get_revinodes(vertex, None) {
    if let Some(old_path) = libpijul::fs::inode_filename(txn, inode) {
    [8.154693]
    [8.154875]
    if let Some(inode) = txn.get_revinodes(vertex, None)? {
    if let Some(old_path) = libpijul::fs::inode_filename(txn, inode)? {
  • edit in pijul/src/commands/git.rs at line 528
    [8.155504]
    [8.155504]
    .map(|x| x as char)
  • replacement in pijul/src/commands/git.rs at line 582
    [8.157569][8.157569:157612]()
    fn import_commit<T: TxnTExt + MutTxnTExt>(
    [8.157569]
    [8.157612]
    fn import_commit<T: TxnTExt + MutTxnTExt + GraphIter>(
  • replacement in pijul/src/commands/git.rs at line 603
    [8.158287][8.88:154]()
    debug!("recording on channel {:?}", channel.borrow().name());
    [8.158287]
    [8.158352]
    debug!("recording on channel {:?}", T::name(&channel.borrow()));
  • replacement in pijul/src/commands/git.rs at line 637
    [8.404][8.92:153]()
    return Ok(txn.current_state(&channel.borrow()));
    [8.404]
    [8.474]
    return Ok(txn.current_state(&channel.borrow())?);
  • replacement in pijul/src/commands/git.rs at line 644
    [8.159718][8.316:387]()
    check_alive_debug(&repo.repo.changes, txn, channel, line!())?;
    [8.159718]
    [8.159783]
    check_alive_debug(&repo.repo.changes, txn, &channel.borrow(), line!())?;
  • replacement in pijul/src/commands/git.rs at line 652
    [8.159934][8.159934:159981]()
    cur.push_str(channel.borrow().name());
    [8.159934]
    [8.159981]
    cur.push_str(T::name(&channel.borrow()));
  • replacement in pijul/src/commands/git.rs at line 654
    [8.159994][8.159994:160079]()
    repo.repo.config.current_channel = Some(channel.borrow().name().to_string())
    [8.159994]
    [8.160079]
    repo.repo.config.current_channel = Some(T::name(&channel.borrow()).to_string())
  • replacement in pijul/src/commands/git.rs at line 659
    [8.160168][8.160168:160219]()
    check_tree_inodes(txn, &channel.borrow());
    [8.160168]
    [8.160219]
    check_tree_inodes(txn, T::graph(&channel.borrow()));
  • replacement in pijul/src/commands/git.rs at line 701
    [8.161034][8.161034:161102]()
    return Ok((0, None, txn.current_state(&channel.borrow())));
    [8.161034]
    [8.161102]
    return Ok((
    0,
    None,
    txn.current_state(&channel.borrow()).map_err(TxnErr)?,
    ));
  • replacement in pijul/src/commands/git.rs at line 710
    [8.161176][8.161176:161215]()
    .map(|rec| rec.globalize(txn))
    [8.161176]
    [8.161215]
    .map(|rec| rec.globalize(txn).unwrap())
  • replacement in pijul/src/commands/git.rs at line 713
    [8.161262][8.161262:161362]()
    let (dependencies, extra_known) = libpijul::change::dependencies(txn, channel, actions.iter());
    [8.161262]
    [8.161362]
    let (dependencies, extra_known) =
    libpijul::change::dependencies(txn, &channel.borrow(), actions.iter())?;
  • replacement in pijul/src/commands/git.rs at line 722
    [8.161532][8.161532:161539]()
    );
    [8.161532]
    [8.161539]
    )?;
  • edit in pijul/src/commands/clone.rs at line 62
    [5.131]
    [5.131]
    std::process::exit(130)
  • replacement in pijul/src/commands/clone.rs at line 110
    [8.185859][2.0:56]()
    repo.config.default_remote = Some(self.remote);
    [8.185859]
    [8.185859]
    if let crate::remote::RemoteRepo::Local(ref l) = remote {
    repo.config.default_remote = std::fs::canonicalize(&l.root)?
    .to_str()
    .map(|x| x.to_string());
    } else {
    repo.config.default_remote = Some(self.remote);
    }
  • replacement in pijul/Cargo.toml at line 50
    [8.197438][8.19486:19554](),[8.197456][7.4:93](),[8.197456][7.4:93]()
    libpijul = { version = "1.0.0-alpha.23", features = [ "tarball" ] }
    libpijul = { path = "../libpijul", version = "1.0.0-alpha.6", features = [ "tarball" ] }
    [8.197438]
    [8.197523]
    libpijul = { path = "../libpijul", version = "1.0.0-alpha.26", features = [ "tarball" ] }
  • replacement in libpijul/Cargo.toml at line 106
    [8.1023195][8.138461:138484](),[8.1023195][7.96:159]()
    pijul-macros = "0.3.0"
    pijul-macros = { path = "../pijul-macros", version = "0.1.0" }
    [8.1023195]
    [8.1023218]
    pijul-macros = { path = "../pijul-macros", version = "0.3.0" }
  • edit in libpijul/Cargo.toml at line 124
    [8.1023723][8.8134:8167]()
    env_logger = "0.8"
    anyhow = "1.0"
  • edit in libpijul/Cargo.toml at line 125
    [7.179]
    anyhow = "1.0"
  • edit in Cargo.nix at line 907
    [8.33099]
    [8.33099]
    };
    "ctrlc" = rec {
    crateName = "ctrlc";
    version = "3.1.7";
    edition = "2015";
    sha256 = "027bzbddk0wg7s2wnbgcwx2iv6bjzvxfpp0s2xdg444yfklr4ymm";
    authors = [
    "Antti Keränen <detegr@gmail.com>"
    ];
    dependencies = [
    {
    name = "nix";
    packageId = "nix";
    target = { target, features }: target."unix";
    }
    {
    name = "winapi";
    packageId = "winapi 0.3.9";
    target = { target, features }: target."windows";
    features = [ "consoleapi" "handleapi" "synchapi" "winbase" ];
    }
    ];
    devDependencies = [
    {
    name = "winapi";
    packageId = "winapi 0.3.9";
    target = {target, features}: target."windows";
    features = [ "fileapi" "processenv" "winnt" ];
    }
    ];
    features = {
    };
  • replacement in Cargo.nix at line 2685
    [8.82372][8.82372:82435]()
    resolvedDefaultFeatures = [ "align" "default" "std" ];
    [8.82372]
    [8.82435]
    resolvedDefaultFeatures = [ "align" "default" "extra_traits" "std" ];
  • replacement in Cargo.nix at line 2741
    [8.84748][4.1300:1336]()
    version = "1.0.0-alpha.25";
    [8.84748]
    [8.84783]
    version = "1.0.0-alpha.26";
  • edit in Cargo.nix at line 3453
    [8.103471]
    [8.103471]
    };
    "nix" = rec {
    crateName = "nix";
    version = "0.18.0";
    edition = "2018";
    sha256 = "0m8h9bskjjqx9sk687z8bxqg2kpwhdh78jq6zfaxsb8llvk0yic3";
    authors = [
    "The nix-rust Project Developers"
    ];
    dependencies = [
    {
    name = "bitflags";
    packageId = "bitflags";
    }
    {
    name = "cfg-if";
    packageId = "cfg-if 0.1.10";
    }
    {
    name = "libc";
    packageId = "libc";
    features = [ "extra_traits" ];
    }
    ];
    buildDependencies = [
    {
    name = "cc";
    packageId = "cc";
    target = {target, features}: (target."os" == "dragonfly");
    }
    ];
  • edit in Cargo.nix at line 3911
    [8.115481]
    [8.115481]
    name = "ctrlc";
    packageId = "ctrlc";
    }
    {
  • edit in Cargo.nix at line 4011
    [8.117409][8.117409:117476](),[8.117569][8.117569:117593]()
    name = "tempfile";
    packageId = "tempfile";
    }
    {
  • replacement in Cargo.nix at line 4997
    [8.144463][4.4558:4586]()
    version = "0.15.3";
    [8.144463]
    [8.144491]
    version = "0.15.4";
  • replacement in Cargo.nix at line 4999
    [8.144517][4.4587:4660]()
    sha256 = "0rcpwm99rx7rbgp5590m8j619wm483hqm0zw6x7j304wwy9ac9kq";
    [8.144517]
    [8.144590]
    sha256 = "036mf8yrjb6lrissihvzib0syf020hfflral5z8srxli3hzi9qp2";
  • edit in Cargo.nix at line 5036
    [8.145279]
    [8.145279]
    {
    name = "thiserror";
    packageId = "thiserror";
    }
  • replacement in Cargo.lock at line 997
    [8.1055747][8.432:447]()
    "rand 0.8.0",
    [8.1055747]
    [8.1055756]
    "rand 0.8.1",
  • replacement in Cargo.lock at line 1404
    [8.1067][3.67750:67765]()
    "rand 0.8.0",
    [8.1067]
    [8.1064359]
    "rand 0.8.1",
  • replacement in Cargo.lock at line 1570
    [8.603][8.603:621]()
    version = "0.8.0"
    [8.603]
    [8.621]
    version = "0.8.1"
  • replacement in Cargo.lock at line 1572
    [8.686][8.686:764]()
    checksum = "a76330fb486679b4ace3670f117bbc9e16204005c4bde9c4bd372f45bed34f12"
    [8.686]
    [8.764]
    checksum = "c24fcd450d3fa2b592732565aa4f17a27a61c65ece4726353e000939b0edee34"
  • replacement in Cargo.lock at line 1576
    [8.812][8.812:832]()
    "rand_core 0.6.0",
    [8.812]
    [8.832]
    "rand_core 0.6.1",
  • replacement in Cargo.lock at line 1597
    [8.1100][8.1100:1120]()
    "rand_core 0.6.0",
    [8.1100]
    [8.1068575]
    "rand_core 0.6.1",
  • replacement in Cargo.lock at line 1611
    [8.1162][8.1162:1180]()
    version = "0.6.0"
    [8.1162]
    [8.1180]
    version = "0.6.1"
  • replacement in Cargo.lock at line 1613
    [8.1245][8.1245:1323]()
    checksum = "a8b34ba8cfb21243bd8df91854c830ff0d785fff2e82ebd4434c2644cb9ada18"
    [8.1245]
    [8.1323]
    checksum = "c026d7df8b298d90ccbbc5190bd04d85e159eaf5576caeacf8741da93ccbd2e5"
  • replacement in Cargo.lock at line 1633
    [8.1606][8.1606:1626]()
    "rand_core 0.6.0",
    [8.1606]
    [8.1069025]
    "rand_core 0.6.1",
  • replacement in Cargo.lock at line 1770
    [8.1072363][8.1748:1763]()
    "rand 0.8.0",
    [8.1072363]
    [6.1128]
    "rand 0.8.1",