The sound distributed version control system

#698 [UNRECORD] sometimes tracked files not modified

Closed on February 27, 2023
tankf33der on July 13, 2022

There are steps when tracked files stay the same:

$ pijul init p1
$ cd p1
$ touch a
$ pijul add a
$ pijul record -am"."
Hash: UIFNDYTRWN6VDPXTTVYBQPTNN6IX7VPB5XY6A26WJ2ORTWEU2E2AC
$ pijul unrec UI
$ pijul ls
a
$

I found a combination when tracked files removed while unrecording:

$ cd
$ rm -rf p1
$ pijul init p1
$ cd p1
$ touch a
$ pijul add a
Hash: FFWESRX54JZ2IZM5LUIC5VPZFLLZCJFP2O74YLLKF2IFBWFP3VAAC
$ pijul unrecord --reset --show-changes 100
# save and exit from $EDITOR
$ pijul log
# empty
$ pijul ls
# empty
$ 

Please fix if required.

joyously on July 17, 2022

What are you showing in the first series of commands? It looks correct to me.

The second series of commands seems to have a command missing, something to generate a hash.

pmeunier on February 27, 2023

I believe @joyously is right here, it is indeed the expected result:

  • pijul unrec just removes the patch from history, it doesn’t change the working copy nor the list of tracked files (at least in first approximation, unrecord is a really subtle command). So, it is indeed expected that the files aren’t changed at all in the first example.

  • In the second example, if I add pijul rec -am. after pijul add a as @joyously suggested, I also get the correct result, since pijul unrecord --reset is actually just a pijul unrecord, followed by a reset of the files touched by the unrecorded patch. So in that case file a has disappeared from history, so it is also expected that reset stops tracking it. The file should still be there in the repo though.

In the current effort to try and tackle as many critical bugs as possible, I’ll close this one. Please reopen if this explanation doesn’t make sense, or if I misunderstood your report.

pmeunier closed this discussion on February 27, 2023