Using path-slash to fix path issues on Windows

[?]
Apr 30, 2021, 9:03 PM
V435QOJRFHNKW3NKJHMVMFOGO3KGAZVSURLSGFUHVKOMHMF4Q2ZQC

Dependencies

  • [2] 5SLOJYHG Fixing the Git feature
  • [3] EEOOHGQQ More atomic "file moves+transaction"
  • [4] NLGQAH4H Credit and reset relative to current directory instead of the root
  • [5] SXEYMYF7 Fixing the bad changes in history (unfortunately, by rebooting).
  • [6] TPEH2XNB 1.0.0-alpha.28, with Tokio 1.0
  • [7] QYY37T6Y Fixing a panic with reset --dry-run and no input
  • [8] 4OCC6D42 Recursive add
  • [9] OJZWJUF2 MUCH faster `pijul add -r`
  • [10] 4VWXL6KQ Correct handling of ignore files
  • [11] CCLLB7OI Upgrading to Sanakirja 0.15 + version bump
  • [12] I24UEJQL Various post-fire fixes
  • [13] ZHABNS3S Canonicalize all paths
  • [14] GJNJ75U5 Canonicalise paths (reset and credit) before stripping off the prefix
  • [15] QMTANHVN Reset: only output changed files
  • [16] Y7YAFMFF Fix path prefix striping on Windows.
  • [17] PP3E3TRE Do not move source if destination is wrong
  • [18] H565UUPC Use correct pattern for workspace interdependencies
  • [*] SN7AGY6S Making `pijul lock` robust to kill signals
  • [*] 2K7JLB4Z No pager on Windows

Change contents

  • replacement in pijul/src/commands/reset.rs at line 60
    [3.99092][3.109:186]()
    let path = root.strip_prefix(&repo_path)?.to_str().unwrap();
    [3.99092]
    [3.99169]
    let path = root.strip_prefix(&repo_path)?;
    use path_slash::PathExt;
    let path = path.to_slash_lossy();
  • replacement in pijul/src/commands/reset.rs at line 68
    [3.58][3.187:264]()
    let path = root.strip_prefix(&repo_path)?.to_str().unwrap();
    [3.58]
    [3.99322]
    let path = root.strip_prefix(&repo_path)?;
    use path_slash::PathExt;
    let path = path.to_slash_lossy();
  • replacement in pijul/src/commands/reset.rs at line 219
    [3.11788][3.11788:11865]()
    let path = root.strip_prefix(&repo_path)?.to_str().unwrap();
    [3.11788]
    [3.11865]
    let path = root.strip_prefix(&repo_path)?;
    use path_slash::PathExt;
    let path = path.to_slash_lossy();
  • edit in pijul/src/commands/git.rs at line 644
    [3.157976]
    [3.157976]
    use path_slash::PathExt;
    let p = p.to_slash_lossy();
  • replacement in pijul/src/commands/git.rs at line 647
    [3.158004][2.3494:3559]()
    txn_.add_dir(p.to_str().unwrap()).unwrap_or(());
    [3.158004]
    [3.158068]
    txn_.add_dir(&p).unwrap_or(());
  • replacement in pijul/src/commands/git.rs at line 649
    [3.158089][2.3560:3626]()
    txn_.add_file(p.to_str().unwrap()).unwrap_or(());
    [3.158089]
    [3.158154]
    txn_.add_file(&p).unwrap_or(());
  • edit in pijul/src/commands/file_operations.rs at line 58
    [3.135]
    [3.135]
    use path_slash::PathExt;
    let source = source.to_slash_lossy();
  • edit in pijul/src/commands/file_operations.rs at line 61
    [3.198]
    [3.198]
    let target = target.to_slash_lossy();
  • replacement in pijul/src/commands/file_operations.rs at line 63
    [3.261][3.261:347]()
    txn.move_file(&source.to_string_lossy(), &target.to_string_lossy())?;
    [3.261]
    [3.347]
    txn.move_file(&source, &target)?;
  • replacement in pijul/src/commands/file_operations.rs at line 163
    [3.836][3.836:891]()
    let path_str = path.to_str().unwrap();
    [3.836]
    [3.17425]
    use path_slash::PathExt;
    let path_str = path.to_slash_lossy();
  • replacement in pijul/src/commands/file_operations.rs at line 212
    [3.173331][3.173331:173382]()
    let path_str = path.to_str().unwrap();
    [3.173331]
    [3.17475]
    use path_slash::PathExt;
    let path_str = path.to_slash_lossy();
  • edit in pijul/Cargo.toml at line 88
    [20.4207]
    [21.309]
    path-slash = "0.1"
  • replacement in libpijul/src/working_copy/filesystem.rs at line 209
    [3.2955][3.2955:3006](),[3.3006][3.1942:1988]()
    let path_str = path.to_str().unwrap();
    match txn.add(path_str, is_dir) {
    [3.2955]
    [3.1988]
    use path_slash::PathExt;
    let path_str = path.to_slash_lossy();
    match txn.add(&path_str, is_dir) {
  • replacement in libpijul/Cargo.toml at line 88
    [3.1022736][3.138351:138438]()
    ondisk-repos = [ "mmap", "zstd", "ignore", "canonical-path", "lru-cache", "tempfile" ]
    [3.1022736]
    [3.1022780]
    ondisk-repos = [ "mmap", "zstd", "ignore", "canonical-path", "lru-cache", "tempfile", "path-slash" ]
  • replacement in libpijul/Cargo.toml at line 127
    [3.3109][3.1023703:1023704](),[3.138582][3.1023703:1023704](),[3.1023703][3.1023703:1023704]()
    [3.138582]
    [3.109304]
    path-slash = { version = "0.1", optional = true }