The sound distributed version control system

#301 Fix tests compilation failures

Closed on February 28, 2021
zseri on February 6, 2021

I tried to refactor parts of the code base to get more familiar with it, but then I noticed that the tests even fail to compile. This patchset fixed that. (ok, I would like to upload my changeset, but the Nest doesn’t seem to accept SSH connections… “Error: Connection refused (os error 111)”

nirahv on February 6, 2021

Same here, i’ve just started using pijul, and first thing that i see - is that i can’t push anything, nice start :’)

pmeunier on February 7, 2021

It’s been down for part of the (European) night, sorry about that. I’ve fixed it, you can push again.

Note that I’m also in the middle of a massive change in Pijul (integrating the new Sanakirja), so patches submitted now will probably conflict with what I’m doing.

pmeunier on February 7, 2021

And also: welcome here! Thanks for the changes, I’ll examine them soon anyway.

zseri added a change on February 7, 2021
MBUNDZ3OES7FXMIYBICHRKXWEII5FZO3LFPSP5EDWQUG7KGP2NPQC
main
zseri added a change on February 7, 2021
SN7AGY6SLIWVKLBHQQ2MZ7VYY4BBFKROC5F3M6FVVFIGT25QNX7AC
main
zseri added a change on February 7, 2021
Version bump + formatting by pmeunier, created on January 16, 2021
HSVGP2G4D2F56DS3YKZLSYPS4A5BNGH4NTAXAOZ57OCXFM3E5AYAC
main
zseri added a change on February 7, 2021
HR3WK6A7KKILCHI2CD2BZSZQJUS44MJIT2K3WPKJBHUXGRKAQDRQC
main
zseri added a change on February 7, 2021
NF4O25IELPL2JJBVM3UXMOWP2VIFWXII7PQD3PX5SUW3RYHKP5XQC
main
zseri added a change on February 7, 2021
LLT3GY6ULCVHMO3VUSVI5H4O244Z3ULOWLTW2IGJXIA2TWIHJDSQC
main
zseri added a change on February 7, 2021
44BN7FWSIXKG75IJUTCXLJE7VANNQFPRHQXTPLQHFU7AKGLSPQRAC
main
zseri added a change on February 7, 2021
7MNTFTDF62XHPRL56GJLTGRVB6QOLYDRYGY2XOKDO745RXOCBB4QC
main
zseri added a change on February 7, 2021
Minor cleanup by pmeunier, created on January 18, 2021
I7VL7VPZV2NKOZRKBWWEHFOGNGGTYLPONHABVJ767D6HPJJNY5RAC
main
zseri added a change on February 7, 2021
LGEJSLTYI7Y2CYC3AN6ECMT3D3MTWCAKZPVQEG5MPM2OBW5FQ46AC
main
zseri added a change on February 7, 2021
D3LR4GTKRC3RKLTLFY3PB265YI3GR7ELCCB4U2STH3YEH4BZI6KAC
main
zseri added a change on February 7, 2021
BZCGXVS77ZS3N4QPLIHNWZ3YFVV7H4PXQD3U6RN5ZFVOC7QL7MBQC
main
zseri added a change on February 7, 2021
Formatting, and version bump by pmeunier, created on January 27, 2021
HQ56ADNSNBCCEBNK5PE5ZVBKKBGWY3ATGFWEYPXJKJBJDUJ2XKQQC
main
zseri added a change on February 7, 2021
Fixing a conflict by pmeunier, created on January 27, 2021
NLTVCN2DBBNRYTKKT5QDN733LOB4UPDVFGETXSDRP33ZJ3RUFIGAC
main
zseri added a change on February 7, 2021
CUHXXBDZJRSAQD5USKGQACUQL4O7KYDT2T4SB3USCFO3IKMYKFDQC
main
zseri added a change on February 7, 2021
document ignore capability in pijul add by ammkrn, created on January 31, 2021
JGJOYE3JQD7RJVM2RLMFX4QWOZ62V6RZ4RARBW6JUIJTEQG4ORJQC
main
zseri added a change on February 7, 2021
EQLDTLXVCARE36EJE3S6SNEVTW2JJY4EYD36EX7WSIFLG2XMKKQAC
main
zseri added a change on February 7, 2021
2UGHRP6P2BRO3IV2VXK2P6NGJFR6ZHQMBCZV6UJWB62JZN2H2ILAC
zseri added a change on February 7, 2021
BACX32INQ2PER3FLV3IZCQSUQEDWZRGOE7BZKGVPC2APBQ54WBEAC
zseri added a change on February 7, 2021
fix remaining test compilation errors created on February 6, 2021
USNWZFLSQMNSATAJM7QFULMENM6WGYE6Y3VJEQQKHHSA6MUP4DDQC
pmeunier on February 7, 2021

Thanks! You seem to have had trouble with channels. Our goal is to make it as intuitive as possible, so I’d be interested in knowing what you did, and what you thought you were doing, and what happened, etc.

zseri on February 7, 2021

Oh I just pushed the wrong branch and didn’t know how to abort that … while in the edit window which lists the changes that would be pushed, and I was too lazy to just comment anything out; Maybe a command like “abort” should be added, if put in the change list, aborts the push at that point (bonus points if this is not only allowed on the front of the list, but also in-between)…

And I find it a bit annoying that every interaction on this page, like “Comment” or “Remove from discussion” jumps to the head of the page and not to the position where the button was.

pmeunier on February 7, 2021

Oh I just pushed the wrong branch and didn’t know how to abort that …

Since I don’t really use branches myself (except long-term ones for Thrussh), I’d like to understand how you ended up with multiple branches (if you don’t mind answering these annoying questions).

Edit: especially since your channel seems to have a large intersection with main on this repository, yet also a large delta.

And I find it a bit annoying that every interaction on this page, like “Comment” or “Remove from discussion” jumps to the head of the page and not to the position where the button was.

Good suggestion, thanks. I’ve added a bug report for the Nest itself.

zseri on February 7, 2021
pijul clone https://nest.pijul.com/pijul/pijul
cd pijul
# just to make sure
pijul pull
pijul fork zseri-misc
pijul channel switch zseri-misc
# make some changes
pijul record
# make some more... etc.
pijul fork zseri-fix-tests
pijul channel switch zseri-fix-tests
# make some changes
# then undo all changes unrelated to this issue
pijul unrecord ...
pijul unrecord ...
pijul reset
pijul push ...

Basically, this is similiar to my usual git workflow:

  • create a “devel” branch, do all changes I see fit
  • then create a branch for each issue,
  • rebase each of these branches interactively on top of HEAD~N (= split point), possibly squashing some of them to minimize merge conflicts in case of back-and-forth changes, and skip all commits which don’t belong to the issue
  • then rebase it on top of the main branch
  • then push
zseri on February 7, 2021

Another nitpick: If i accidentially selected the wrong “to” channel, and I delete all lines I don’t want, it just keeps respawning the editor with no way out.

zseri added a change on February 7, 2021
DI72DZZB7C2ELZBQYIAPUAATP6YKLONNF7ED45JO5CJHZIUWY5FAC
zseri on February 8, 2021

Is there some way to visualize the change dependency tree / delta?

pmeunier on February 8, 2021

@lthms wrote something like this for the old version of Pijul, but unfortunately I broke the entire fragile, nascent ecosystem with the 1.0 release. It’s now orders of magnitude faster, and uses 1000 times less disk space.

However, I expect the current patch format to be stable, so writing something like this for the new Pijul shouldn’t be super hard. I’ll break the repository format once again, with an expected 4-10 times performance improvement (in terms of speed).

zseri on February 8, 2021

https://ytrizja.de/~zseri/pijul_301.svg https://ytrizja.de/~zseri/pijul2svg.sh I built a script which does this, and it isn’t really slow, either (approx ~5x “pijul channel switch”, ~12s). It parses the change format, if that doesn’t change, it’ll continue to work. Requires GraphViz and a few coreutils.

pmeunier on February 9, 2021

Cool! I’m not really sure how to interpret the [*] to draw this graph, these are not necessarily in the transitive dependencies of the patch. The patch format shouldn’t change, but your script will probably have trouble scaling to large patches.

pmeunier on February 9, 2021

Cool! I’m not really sure how to interpret the [*] to draw this graph, these are not necessarily in the transitive dependencies of the patch. The patch format shouldn’t change, but your script will probably have trouble scaling to large patches.

zseri on February 9, 2021

What does [*] in the dependency section mean, exactly? Pseudo-edges? It’s not explained in the manual. [...]+ is also unclear (and currently not represented in the graph)

pmeunier on February 9, 2021

It’s complicated. [*] are patches known to this patch, without being a dependency. This is important for commutation, when a deletion and an insertion happen in parallel at the same place. Let’s say Alice adds a line in the middle of a paragraph, while Bob deletes the entire paragraph.

When Bob sees Alice’s patch, he can readily know that this is a conflict, because he no longer has the “context” lines around Alice’s new contents. However, this is trickier for Alice, because (1) we want her to see the exact same conflict, because commutation is what Pijul is about and (2) she could potentially mistake Bob’s patch for a legitimate deletion around her new lines. The solution is that Bob adds these extra patches in his patch, saying “I know about these patches around my deletions”: Alice sees that and can tell that Bob didn’t know about her new lines when he made his patch, so she can know it’s a conflict.

The [+] are not really useful for what you’re trying to do, since they’re transitive dependencies needed to display this patch in the text format. They aren’t even stored in the binary patch format. If you look at the text format, you’ll notice cryptic lines below the descriptions of hunks, saying things like B:BD 1.3 -> 2.4/5. This describes edges in the internal graph of Pijul, and 1, 2 and 5 are references to the items in the list of dependencies. Now, since dependencies are minimised at record time (by removing transitive edges), some of these edges cannot be expressed in terms of just the dependencies, and that’s why we need to add these extra “references”.

zseri on February 10, 2021

I’m actually quite irritated that it is possible to end up with “your channel seems to have a large intersection with main on this repository, yet also a large delta”, if independent changes commute and I didn’t unrecord any old changes from main

pijul log is not able to show me a substantial delta:

Change DI72DZZB7C2ELZBQYIAPUAATP6YKLONNF7ED45JO5CJHZIUWY5FAC
Author: [Author { name: "zseri", full_name: Some("Erik Zscheile"), email: Some("zseri.devel@ytrizja.de") }]
Date: 2021-02-07 00:39:19.384802152 UTC
State: N3C4ADEC63HEJ2UY43TFBU4G5FLK6S6HK4NOY4JD4YXCIQSIJYYQC <-- main:301 is here

    output::output_repository_no_pending has changed argument count, fix tests

Change USNWZFLSQMNSATAJM7QFULMENM6WGYE6Y3VJEQQKHHSA6MUP4DDQC
Author: [Author { name: "zseri", full_name: Some("Erik Zscheile"), email: Some("zseri.devel@ytrizja.de") }]
Date: 2021-02-07 01:04:42.039005295 UTC
State: E23CUUK2P4F5SPSXACHVNT2JBP35L7BIWHYN32F7SJLHM7EK2MNAC

    fix remaining test compilation errors

Change 2UGHRP6P2BRO3IV2VXK2P6NGJFR6ZHQMBCZV6UJWB62JZN2H2ILAC
Author: [Author { name: "zseri", full_name: Some("Erik Zscheile"), email: Some("zseri.devel@ytrizja.de") }]
Date: 2021-02-07 00:32:58.755430985 UTC
State: HPKB7WPDHFOVQWXVI5VY3XRBEABN5663GJT3J7AAASW4KV26BZDAC

    update Cargo.lock to circumvent https://github.com/rust-lang/rust/issues/81531

Change EQLDTLXVCARE36EJE3S6SNEVTW2JJY4EYD36EX7WSIFLG2XMKKQAC
Author: [Author { name: "pmeunier", full_name: Some("Pierre-Étienne Meunier"), email: None }]
Date: 2021-02-01 21:17:49.861512609 UTC
State: KLRMNGRKDCWPCXCN7BIODEIQTFMIBNIXPSNFXQFDC3HUI47NSKOQC <-- main is here

    Fixing a bug with empty new files, and another one with empty replacements

Side note: it would be nice if pijul log could mark states which are present in other channels (similarly to the snip above).

zseri on February 11, 2021

I tried to push an amend’ed change (to include the CLA for the two patches which modify libpijul), but the Nest error’ed out: Error: error sending request for url (https://nest.pijul.com/pijul/pijul/.pijul?to_channel=301&apply=ZKX76IZLVUG4CXVISKZXXLSKJPFOIL7OGAATIR4FT2T33D6VCEEAC): connection closed before message completed

That change seems to be already uploaded, but somewhat corrupted: Internal server error

pijul push --from-channel main:301 --to-channel main:301 -- ZKX76IZLVUG4CXVISKZXXLSKJPFOIL7OGAATIR4FT2T33D6VCEEAC appears to work, but the change doesn’t appear in the discussion…

pmeunier on February 11, 2021

Wait, so as I said, I’m in the middle of completely changing libpijul to integrate it with the new Sanakirja. Virtually all functions have changed, so your changes conflict with mine.

Also, I agree that pushing to HTTPS is not really supported at the moment. I’m not sure what you’re trying to do with your other SSH command, why not the simpler pijul push --to-channel :301?

zseri on February 11, 2021

I’m just wondering why pijul seems to succeed to push sometimes (no error message, but not really pushed), and sometimes not.

zseri added a change on February 11, 2021
fix remaining test compilation errors created on February 6, 2021
ZKX76IZLVUG4CXVISKZXXLSKJPFOIL7OGAATIR4FT2T33D6VCEEAC
zseri added a change on February 11, 2021
G4LUPVAYFRRTTOJX7VGNG23ZY3YOGW2RTCFDLVVDRIJBB6R3REZAC
zseri on February 11, 2021

P.S. I freshly installed NixOS on a device which I didn’t really use before, and tried to use the flake.nix. It worked (after a couple retries after getting some weird segfaults while compiling thrussh). Keep in mind that the flake is currently outdated. I assume it gets bumped after libpijul is ported to sanakirja-1.0.

zseri added a change on February 14, 2021
SL45MHGVMBZRSCYCOPWYTXJEY3WKRLELNYXLBYUOT6MKLSRSUCPAC
main
zseri on February 28, 2021

It might make sense to add the latest change to the main channel; otherwise I would just put it into a separate repo, but I think it might be a good idea to have an example of this in the main channel, which can be improved over time. According to this, the other changes probably aren’t needed anymore.

pmeunier on February 28, 2021

Yes, sorry for being so slow, the number of discussions started while I was working on the new Sanakirja exploded, I’m still going through them one at a time. I think this change is nice, I’ll add it. Thanks!

pmeunier closed this discussion on February 28, 2021