The sound distributed version control system

#873 errors and conflicts for archive command

Opened by joyously on February 6, 2024
joyously on February 6, 2024

Using the pijul repo as a test, I tried to output an archive at a particular state, but got an empty archive and Error: Invalid change.

This error message is no help. It would be great if it gave the hash at least. I tried a plain archive (no state flag) and got an archive and a message about a Deletion conflict in "".

When I tried a more recent state, I got an archive, but a dozen conflicts in “”. The strange thing is in the archive, a bunch of files had dates more recent(2021) than the date on the state chosen(2020).

/_working/contrib/pijul$ pijul -V
pijul 1.0.0-beta.8
/_working/contrib/pijul$ pijul diff -s
D Cargo.lock
/_working/contrib/pijul$ pijul move shell.nix sshell.nix
/_working/contrib/pijul$ touch anewfile  #also changed a character in flake.lock
/_working/contrib/pijul$ pijul add anewfile
Tracked 1 path(s)
/_working/contrib/pijul$ pijul diff -s
D  Cargo.lock
A  anewfile
R  flake.lock
MV  shell.nix
/_working/contrib/pijul$ pijul log --state -- README.md
Change DCVJLY7UHZNFVYMPIH2YFNBVCPD4LHTUDZOBMDLT46UDUJJAEIUAC
Author: 21Sft9rCNDZggeyNwZ2de6xLuLyZZu8dWegeUYEo1ujH
Date: Wed, 13 Oct 2021 22:16:22 +0000
State: 4CZ3O2JL5DESGUGAYAZ3T32CIFX374YNKJ3D424OOELAZVDDNCXAC

    update ssh remotes from nest.pijul.com to ssh.pijul.com

Change KFZ2O3FG262FKRRXKGKOFEUSH72AFUPVSBWZEDUJ55CKHNFMQCWAC
Author: Ralith
Date: Sat, 12 Dec 2020 08:18:28 +0000
State: HYSLZMUJJFPPS36DKJGRY3RXFWUZHBS3C6HJWZIKZW6ATTG6MF2AC

    Don't describe the manual repository as this repository

Change PESRJZBOH6PQSDPJ7SDJX52O65FMPEV4373YYEWZSF7ATXDQL2VAC
Author: pmeunier
Date: Wed, 23 Dec 2020 11:57:35 +0000
State: BW5ZDLG4J5BQLPSRSSAGQJLYIIMCBQKVI5QN5S3UW4TFJPE6MTJAC

    Removing a terribly offensive sentence in the readme

Change 2KURKIFC6P62HW2TCV3N7IMCAARI7UBHYR5M3RIGWYLZU3X763AQC
Author: pmeunier
Date: Tue, 17 Nov 2020 13:42:34 +0000
State: F4R2ELV2F7VMKU6UPAHZNQYVBWNC46H7GTHG2CSSRPFZUCQ3PYNQC

    Channels in the README

Change BAUL3WR2ACY2HCJIM7K6HJOJ3UXDJISGLMDCSPH3WMPGJPL5AR4QC
Author: pmeunier
Date: Tue, 17 Nov 2020 10:05:03 +0000
State: 4IXGVIBJKOFQ2S6OGHFSE4GDIYEWDOKU7EYGQAVJBIYSMFHQQJDQC

    Format, versions, README

Change SXEYMYF7P4RZMZ46WPL4IZUTSQ2ATBWYZX7QNVMS3SGOYXYOHAGQC
Author: pmeunier
Date: Mon, 16 Nov 2020 16:49:16 +0000
State: YJZBS2NAESD7SUMHQ3EQVFP36L53TVAHXPMNYAF5LZ75UVFD5LCAC

    Fixing the bad changes in history (unfortunately, by rebooting).

/_working/contrib/pijul$ pijul archive --state 4IXGVIBJKOFQ2S6OGHFSE4GDIYEWDOKU7EYGQAVJBIYSMFHQQJDQC -o ~/testout
Error: Invalid change
/_working/contrib/pijul$ pijul archive --prefix test2 -o ~/testout2

There were conflicts:

  - Deletion conflict in "" starting on line 1338
/_working/contrib/pijul$ pijul archive -o ~/testout --state 4IXGVIBJKOFQ2S6OGHFSE4GDIYEWDOKU7EYGQAVJBIYSMFHQQJDQC
Error: Invalid change
/_working/contrib/pijul$ pijul archive -o ~/testout --state HYSLZMUJJFPPS36DKJGRY3RXFWUZHBS3C6HJWZIKZW6ATTG6MF2AC

There were conflicts:

  - Order conflict in "" starting on line 715
  - Deletion conflict in "" starting on line 269
  - Order conflict in "" starting on line 435
  - Order conflict in "" starting on line 5
  - Order conflict in "" starting on line 12
  - Order conflict in "" starting on line 95
  - Order conflict in "" starting on line 33
  - Order conflict in "" starting on line 142
  - Order conflict in "" starting on line 159
  - Order conflict in "" starting on line 20
  - Order conflict in "" starting on line 45
  - Order conflict in "" starting on line 492
/_working/contrib/pijul$ pijul diff -s
D  Cargo.lock
A  anewfile
R  flake.lock
MV  shell.nix
pmeunier on February 8, 2024

The conflict detection algorithm has changed recently to make it more efficient. As a downside, the conflicts aren’t always the same as before, which looks really bad in Pijul’s own repo. I’ll try to fix part of that now.

pmeunier on February 11, 2024

This is fixed by #H5DIAL52H2LOXEL4JO7YGBYVNZBFOQFQ2UCGFL2KDUEDLCVGQBSQC

There isn’t much more we can do there, unfortunately. Feel free to reopen if you feel otherwise.

pmeunier closed this discussion on February 11, 2024
joyously on February 11, 2024

I reset -f my pijul repo, then pulled 57 changes. There were a few conflicts, so I edited those 3 files. I used change H5DIAL52 to verify that I had the fix, then did cargo build --release.

I reran the original archive commands with the ./target/release/pijul, but I couldn’t see any difference. I still got unhelpful errors (no hash, no filename), conflicts, one empty archive, and an archive with dates newer than the state’s date.

joyously reopened this discussion on February 11, 2024