Migrate from `pijul::repository` to `pijul-repository`

finchie
Jul 14, 2023, 12:51 PM
ABQDWHNGSBF2REQDCGXSBFAU4RUMXYAF2KHJ5O3D32M7Z3A3FEDAC

Dependencies

  • [2] BPCAJCLT Use RFC2822 date formatting in `log`, `tag`, and `record --timestamp`
  • [3] YK7EBTF6 Safeguarding `pijul channel new`: it was too easy to create a new, independent root
  • [4] DDJO7X2P Remove dependency on `num_cpus`
  • [5] 4RV7T4SR Migrate from `pijul::config` to `pijul-config`
  • [6] WCA7X6W6 Create `pijul-repository` crate
  • [7] MEK57BAD Optional user in ssh_remote, allows to fix the key proof in `pijul id ed`
  • [8] STG7MO5M Version bump
  • [9] H4AU6QRP New config for HTTP remotes
  • [10] EJ7TFFOW Re-adding Cargo.lock
  • [11] EEBKW7VT Keys and identities
  • [12] STOFOQI4 Fixing a bug in `pijul dependents` where non-dependents could be listed (and making the command deterministic)
  • [13] 4KJ45IJL Implement new identity management
  • [14] RVAH6PXA Getting libpijul to compile to WASM32
  • [15] 3FTEGCMR add timestamp_validator to tag --timestamp option
  • [16] A7NTQINQ pijul channel delete: error if channel doesn't exist
  • [17] YWL2K3P7 Removing the `Direction` argument in pijul::remote::Repository::remote
  • [18] I24UEJQL Various post-fire fixes
  • [19] CCLLB7OI Upgrading to Sanakirja 0.15 + version bump
  • [20] 76PCXGML Pushing to, and pulling from the local repository
  • [21] R3H7D42U Debugging `pijul git`: proper error reporting
  • [22] TYAKEAJL A better estimate of the maximum number of open patches we can keep (Unix-only at the moment)
  • [23] OU6JOR3C Add path filtering for log, add json output for log
  • [24] UDHP4ZVB Fixing SSH asynchronicity issues
  • [25] QL6K2ZM3 Tags
  • [26] JUYSZJSH Migrate from `pijul::progress` to `pijul_interaction::progress`
  • [27] OIOMXESD Better error handling in HTTP
  • [28] ZBNKSYA6 Fixing a bus error when starting a transaction on a full disk
  • [29] VIHXB7SG commands: set up pager for diff, change, and credit
  • [30] SXEYMYF7 Fixing the bad changes in history (unfortunately, by rebooting).
  • [31] 5DVRL6MF Hard-unrecord
  • [32] BNPSVXIC Friendlier progress bars
  • [33] EUZFFJSO Updating Pijul with the latest changes in Libpijul
  • [34] XA23FMQM Reset only files that have been modified
  • [35] IVLLXQ5Z Improved push/pull reporting
  • [36] Q4SVMHAE Removing --channel from the changes command
  • [37] FMKKWCFV Better clap attributes
  • [38] RDQYEED2 Fixing versions
  • [39] 3KRGVQFU Do not update the mtime of unmodified files
  • [40] AXVPNZ2N commands/git: fix imports
  • [41] Y6TBQN7M Automatically format `pijul` crate
  • [42] Q45QHPO4 Feedback on network stuff
  • [43] 2D7P2VKJ Change completions (where the whole progress bar story started)
  • [44] ZSFJT4SF Allow remotes to have a different push and pull address
  • [45] 2K7JLB4Z No pager on Windows
  • [46] ABPFWGKH Create `pijul-interaction` crate
  • [47] 5BRU2RRW Cleanup (debugging a crash related to trees/inodes)
  • [48] TI7PCK7J Update `pijul/src/main.rs` to use new identity management
  • [49] DO2Y5TY5 Tag synchronisation
  • [50] VWJ2JL63 Adding a `pijul dependents` command to list the transitive closure of the reverse dependency relation
  • [51] 6F6AAHK4 Simplifying pijul::commands::log, and fixing Broken Pipe errors
  • [52] I52XSRUH Massive cleanup, and simplification
  • [53] DVBSW7SI Bump dependencies with minor-level changes
  • [54] YN63NUZO Sanakirja 1.0
  • [55] MU5GSJAW Partial push and pull (WARNING: breaks the existing protocol)
  • [56] X243Z3Y5 Recording only the required metadata (can even be changed later!)
  • [57] L4JXJHWX pijul/*: reorganize imports and remove extern crate
  • [58] PIQCNEEB Upgrading to Clap 3.0.0-alpha.5
  • [59] A3RM526Y Integrating identity malleability
  • [60] V435QOJR Using path-slash to fix path issues on Windows
  • [61] 4EN4MDBQ Update identity dependencies
  • [62] TKEVOH7H Fixing a bug when downloading changes, and making change download more efficient (more async)
  • [63] FE5ES6Q4 Stop pushing/pulling if the remote returns an error
  • [64] LZOGKBJX new command `pijul client` for authenticating to a HTTP server
  • [65] 5OGOE4VW Store the current channel in the pristine
  • [66] SLJ3OHD4 unrecord: show list of changes if none were given as arguments
  • [67] 4OJWMSOW Fully replace crate::Identity
  • [*] DX2FO4HZ Tag CLI cleanup
  • [*] DWSAYGVE Update codebase to use new identity management
  • [*] NAUECZW3 Fixing the map between keys and identities
  • [*] BD5PC25A Deleting conflict resolution vertices when the sides are deleted

Change contents

  • edit in pijul/src/remote/mod.rs at line 16
    [7.22][7.457:483](),[7.457][7.457:483]()
    use crate::repository::*;
  • edit in pijul/src/remote/mod.rs at line 17
    [5.267]
    [7.52711]
    use pijul_repository::*;
  • replacement in pijul/src/remote/mod.rs at line 46
    [7.52973][7.52973:53031](),[7.53031][7.27:61](),[7.61][7.249:356](),[7.61][7.53031:53074](),[7.356][7.53031:53074](),[7.53031][7.53031:53074](),[7.53][7.53074:53103](),[7.53074][7.53074:53103](),[7.53103][7.5984:6009](),[7.6009][7.53103:53148](),[7.53103][7.53103:53148](),[7.53148][7.0:152](),[7.136][7.53271:53288](),[7.204][7.53271:53288](),[7.267][7.53271:53288](),[7.6095][7.53271:53288](),[7.53271][7.53271:53288](),[7.53288][7.357:448](),[7.211][7.53351:53361](),[7.448][7.53351:53361](),[7.6181][7.53351:53361](),[7.53351][7.53351:53361]()
    impl Repository {
    pub async fn remote(
    &self,
    self_path: Option<&Path>,
    // User name in case it isn't provided in the `name` argument already.
    user: Option<&str>,
    name: &str,
    channel: &str,
    no_cert_check: bool,
    with_path: bool,
    ) -> Result<RemoteRepo, anyhow::Error> {
    if let Some(name) = self.config.remotes.iter().find(|e| e.name() == name) {
    name.to_remote(channel, no_cert_check, with_path).await
    } else {
    unknown_remote(self_path, user, name, channel, no_cert_check, with_path).await
    }
    [7.52851]
    [7.53361]
    pub async fn repository(
    repo: &Repository,
    self_path: Option<&Path>,
    // User name in case it isn't provided in the `name` argument already.
    user: Option<&str>,
    name: &str,
    channel: &str,
    no_cert_check: bool,
    with_path: bool,
    ) -> Result<RemoteRepo, anyhow::Error> {
    if let Some(name) = repo.config.remotes.iter().find(|e| e.name() == name) {
    name.to_remote(channel, no_cert_check, with_path).await
    } else {
    unknown_remote(self_path, user, name, channel, no_cert_check, with_path).await
  • replacement in pijul/src/remote/mod.rs at line 993
    [7.764][4.264:317]()
    crate::repository::max_files()?,
    [7.764]
    [7.816]
    pijul_repository::max_files()?,
  • replacement in pijul/src/remote/mod.rs at line 1077
    [7.952][4.318:371]()
    crate::repository::max_files()?,
    [7.952]
    [7.1004]
    pijul_repository::max_files()?,
  • replacement in pijul/src/remote/mod.rs at line 1452
    [7.74849][7.74849:74895]()
    repo: &crate::repository::Repository,
    [7.74849]
    [7.74895]
    repo: &pijul_repository::Repository,
  • replacement in pijul/src/remote/local.rs at line 78
    [7.1126][4.372:417]()
    crate::repository::max_files()?,
    [7.1126]
    [7.1170]
    pijul_repository::max_files()?,
  • replacement in pijul/src/remote/local.rs at line 149
    [7.1284][4.418:463]()
    crate::repository::max_files()?,
    [7.1284]
    [7.1328]
    pijul_repository::max_files()?,
  • edit in pijul/src/main.rs at line 4
    [7.84246][7.84246:84262]()
    mod repository;
  • replacement in pijul/src/identity/create.rs at line 3
    [7.28291][7.28291:28326]()
    use crate::repository::Repository;
    [7.8674]
    [7.28347]
    use crate::remote;
    use pijul_repository::Repository;
  • replacement in pijul/src/identity/create.rs at line 315
    [7.37291][7.3759:3784]()
    repo.remote(
    [7.37291]
    [7.3784]
    remote::repository(
    &repo,
  • edit in pijul/src/commands/unrecord.rs at line 5
    [7.26180][7.26180:26215]()
    use crate::repository::Repository;
  • edit in pijul/src/commands/unrecord.rs at line 10
    [7.1251]
    [7.95785]
    use pijul_repository::Repository;
  • edit in pijul/src/commands/tag.rs at line 5
    [7.50][7.150:185](),[2.53][7.150:185](),[7.150][7.150:185]()
    use crate::repository::Repository;
  • edit in pijul/src/commands/tag.rs at line 10
    [69.12]
    [7.332]
    use pijul_repository::Repository;
  • edit in pijul/src/commands/reset.rs at line 11
    [7.4179][7.1348:1383](),[7.1348][7.1348:1383]()
    use crate::repository::Repository;
  • edit in pijul/src/commands/reset.rs at line 12
    [7.4213]
    [7.97798]
    use pijul_repository::Repository;
  • replacement in pijul/src/commands/record.rs at line 17
    [7.102093][7.1574:1600]()
    use crate::repository::*;
    [7.102093]
    [7.1618]
    use pijul_repository::*;
  • replacement in pijul/src/commands/pushpull.rs at line 15
    [7.4805][7.26960:27021](),[7.4805][7.1761:1796](),[7.18574][7.1761:1796](),[7.27021][7.1761:1796](),[7.1761][7.1761:1796]()
    use crate::remote::{PushDelta, RemoteDelta, RemoteRepo, CS};
    use crate::repository::Repository;
    [7.1761]
    [7.4346]
    use crate::remote::{self, PushDelta, RemoteDelta, RemoteRepo, CS};
  • edit in pijul/src/commands/pushpull.rs at line 17
    [7.4434]
    [7.111878]
    use pijul_repository::Repository;
  • replacement in pijul/src/commands/pushpull.rs at line 215
    [7.115437][7.115437:115467](),[7.115467][7.4330:4385](),[7.4385][7.927:949](),[7.949][7.4385:4447](),[7.4385][7.4385:4447](),[7.2464][7.4447:4483](),[7.4447][7.4447:4483](),[7.4483][7.15286:15308](),[7.15308][7.4483:4497](),[7.4483][7.4483:4497](),[7.4497][7.115537:115558](),[7.115537][7.115537:115558]()
    let mut remote = repo
    .remote(
    Some(&repo.path),
    None,
    &remote_name,
    remote_channel,
    self.no_cert_check,
    true,
    )
    .await?;
    [7.115437]
    [7.20136]
    let mut remote = remote::repository(
    &repo,
    Some(&repo.path),
    None,
    &remote_name,
    remote_channel,
    self.no_cert_check,
    true,
    )
    .await?;
  • replacement in pijul/src/commands/pushpull.rs at line 400
    [7.118283][7.118283:118313](),[7.118313][7.5956:6011](),[7.6011][7.950:972](),[7.972][7.6011:6071](),[7.6011][7.6011:6071](),[7.2498][7.6071:6107](),[7.6071][7.6071:6107](),[7.6107][7.15373:15395](),[7.15395][7.6107:6121](),[7.6107][7.6107:6121](),[7.6121][7.118381:118402](),[7.118381][7.118381:118402]()
    let mut remote = repo
    .remote(
    Some(&repo.path),
    None,
    &remote_name,
    from_channel,
    self.no_cert_check,
    true,
    )
    .await?;
    [7.118283]
    [7.118402]
    let mut remote = remote::repository(
    &repo,
    Some(&repo.path),
    None,
    &remote_name,
    from_channel,
    self.no_cert_check,
    true,
    )
    .await?;
  • edit in pijul/src/commands/protocol.rs at line 6
    [7.1914][7.15078:15113]()
    use crate::repository::Repository;
  • edit in pijul/src/commands/protocol.rs at line 12
    [70.1145]
    [7.123476]
    use pijul_repository::Repository;
  • replacement in pijul/src/commands/mod.rs at line 79
    [7.18771][7.1801:1847](),[7.1801][7.1801:1847]()
    repo: &mut crate::repository::Repository,
    [7.18771]
    [7.1847]
    repo: &mut pijul_repository::Repository,
  • edit in pijul/src/commands/log.rs at line 7
    [7.2088][7.103:138]()
    use crate::repository::Repository;
  • edit in pijul/src/commands/log.rs at line 15
    [71.242]
    [7.225]
    use pijul_repository::Repository;
  • replacement in pijul/src/commands/init.rs at line 6
    [7.2235][7.136544:136570](),[7.136543][7.136544:136570]()
    use crate::repository::*;
    [7.2235]
    [7.136627]
    use pijul_repository::*;
  • replacement in pijul/src/commands/git.rs at line 10
    [7.2282][7.2282:2308]()
    use crate::repository::*;
    [7.2282]
    [7.137436]
    use pijul_repository::*;
  • replacement in pijul/src/commands/fork.rs at line 7
    [7.2368][7.2368:2403]()
    use crate::repository::Repository;
    [7.2368]
    [7.168000]
    use pijul_repository::Repository;
  • replacement in pijul/src/commands/file_operations.rs at line 9
    [7.169209][7.2516:2551]()
    use crate::repository::Repository;
    [7.169209]
    [7.2551]
    use pijul_repository::Repository;
  • replacement in pijul/src/commands/diff.rs at line 11
    [7.173739][7.2684:2710]()
    use crate::repository::*;
    [7.173739]
    [7.2710]
    use pijul_repository::*;
  • replacement in pijul/src/commands/dependents.rs at line 6
    [7.324][7.324:350]()
    use crate::repository::*;
    [7.324]
    [7.350]
    use pijul_repository::*;
  • edit in pijul/src/commands/debug.rs at line 3
    [7.2754][7.177759:177794](),[7.177758][7.177759:177794]()
    use crate::repository::Repository;
  • edit in pijul/src/commands/debug.rs at line 6
    [72.31]
    [7.177836]
    use pijul_repository::Repository;
  • replacement in pijul/src/commands/credit.rs at line 12
    [7.178930][7.2845:2880]()
    use crate::repository::Repository;
    [7.178930]
    [7.2898]
    use pijul_repository::Repository;
  • edit in pijul/src/commands/clone.rs at line 3
    [7.2925][7.18547:18573]()
    use crate::repository::*;
  • edit in pijul/src/commands/clone.rs at line 7
    [7.2958]
    [7.183024]
    use pijul_repository::*;
  • edit in pijul/src/commands/channel.rs at line 4
    [7.187014][7.6229:6264]()
    use crate::repository::Repository;
  • edit in pijul/src/commands/channel.rs at line 9
    [3.16]
    [7.3080]
    use pijul_repository::Repository;
  • replacement in pijul/src/commands/change.rs at line 7
    [7.3125][7.3125:3151]()
    use crate::repository::*;
    [7.3125]
    [7.189470]
    use pijul_repository::*;
  • replacement in pijul/src/commands/archive.rs at line 8
    [7.191247][7.3269:3304]()
    use crate::repository::Repository;
    [7.191247]
    [7.3304]
    use pijul_repository::Repository;
  • edit in pijul/src/commands/apply.rs at line 10
    [7.5104][7.3380:3415](),[7.3380][7.3380:3415]()
    use crate::repository::Repository;
  • edit in pijul/src/commands/apply.rs at line 11
    [7.4752]
    [7.194497]
    use pijul_repository::Repository;
  • edit in pijul/Cargo.toml at line 101
    [7.381][7.1340:1355](),[7.1493][7.1340:1355]()
    rlimit = "0.6"
  • edit in pijul/Cargo.toml at line 112
    [7.4873]
    [7.4873]
    pijul-repository = { path = "../pijul-repository" }
  • edit in Cargo.lock at line 2210
    [7.573]
    [7.48476]
    "pijul-repository",
  • edit in Cargo.lock at line 2215
    [7.48523][6.0:17]()
    "rlimit 0.6.2",
  • replacement in Cargo.lock at line 2274
    [6.143][6.143:160]()
    "rlimit 0.9.1",
    [6.143]
    [6.160]
    "rlimit",
  • edit in Cargo.lock at line 2580
    [7.55608][7.55608:55769](),[7.55769][6.176:233]()
    version = "0.6.2"
    source = "registry+https://github.com/rust-lang/crates.io-index"
    checksum = "cc0bf25554376fd362f54332b8410a625c71f15445bca32ffdfdf4ec9ac91726"
    dependencies = [
    "libc",
    ]
    [[package]]
    name = "rlimit"