Hm, based on the response in this thread, I’m wondering if this is somehow a local problem for me. Since I have to pijul reset
every time I apply a change, this might somehow be related. Like changes aren’t always automatically applied on my computer, and this bug is just one manifestation of that.
This bug no longer happens in 1.0.0-alpha.45.
This is the shortest way that I’ve managed to reproduce this bug.
EDIT: I’m doing a
pijul reset
every time I apply a change, since that is necessary in order to actually see the applied change on my computer. I’ve just learned that isn’t supposed to be the case, so you can skip that if you’re trying to reproduce this bug.The general idea is that you make a change to the bottom of a file and record that. Then append something to the top of the file and record that. Then apply those changes to another channel, starting with the change at the top of the file, and then apply the change at the bottom of the file (so, opposite of the order you created them in). After doing this twice, the bottom change will not be applied.
Here a specific way to reproduce it. (Sorry for being so long!)
pijul init
touch textfile
echo "a" > textfile
pijul add textfile
pijul record -m "a"
pijul fork other
pijul channel switch other
echo "b" >> textfile
textfile now looks like:pijul record -m "b"
sed ' 1 s/.*/&c/' -i textfile
(This appends “c” to the end of the first line.) textfile now looks like:pijul record -m "c"
pijul channel switch main
pijul apply THE_C_CHANGE
pijul reset
textfile now looks like:So the b change came along with c, which is not what I expected, but that’s not the bug here.
pijul log
now shows a, b, and c. Now apply a “d” and “e” the same way.pijul channel switch other
echo "d" >> textfile
textfile now looks like:pijul record -m "d"
sed ' 1 s/.*/&e/' -i textfile
textfile now looks like:pijul record -m "e"
pijul channel switch main
Back on the main channel, textfile looks like:pijul apply THE_E_CHANGE
pijul reset
textfile now looks like:So, d was not applied. Apply that now.
pijul apply THE_D_CHANGE
pijul reset
pijul log
, but not if youcat textfile
. Switch to the other channel, then back to the main channel, and it will show up.Strangely, I had to do this process a third time (adding “f” and “g”) to make it fail yesterday, but only two rounds were needed today.