pijul_org / pijul

#412 Pijul thinks files with invalid utf-8 and altered permissions are moved, even after reverting

Opened by jimbo1qaz, on June 26, 2019
Open
jimbo1qaz commented on June 26, 2019

I'm working with a source tree from elsewhere, imported as a single initial patch. I made several patches on top, then checked-out a vanilla branch only containing on initial patch. However pijul insists 28 files (it thinks all are not valid utf-8) are moved, even after I try running pijul revert.

(I created this initial patch on a different build of pijul, but same version 0.12.0.)

pijul record stopped pijul from complaining, and pijul patch to view the ID shows that they're all - (Invalid UTF-8).

https://nest.pijul.com/pijul_org/pijul/discussions/75 seems related but it's ancient.

Is this related to https://nest.pijul.com/pijul_org/pijul/discussions/375 and https://nest.pijul.com/pijul_org/pijul/patches/A5muExATYjU1ezcVaFs6MfC2ytaSE6PKYXKfs6y3KJNaohfZjEgKrPoG72zwPNh56k6BsGF97j9R4EfbxVshiiPm ? (I couldn't clone master to test.)

My repository is at https://www.dropbox.com/s/gm1al62jsty608o/pijul-ft.pijul.7z?dl=1 (essentially me resolving a hairy merge conflict in multiple commits).

~/src/pijul-ft ❯❯❯ pj status
On branch vanilla

Changes not yet recorded:
  (use "pijul record ..." to record a new patch)

        moved:     config.h
        moved:     famitracker.rc
        moved:     gpl.txt
        moved:     res/about.bmp
        moved:     res/application.ico
        moved:     res/document.ico
        moved:     res/export_report.htm
        moved:     res/famitracker.manifest
        moved:     res/famitracker.rc2
        moved:     res/inst_2a03.ico
        moved:     res/inst_2a07.ico
        moved:     res/inst_fds.ico
        moved:     res/inst_n163.ico
        moved:     res/inst_s5b.ico
        moved:     res/inst_vrc6.ico
        moved:     res/inst_vrc7.ico
        moved:     res/instrumenttoolbar-16.bmp
        moved:     res/instrumenttoolbar-256.bmp
        moved:     res/key_black_pressed.bmp
        moved:     res/key_black_unpressed.bmp
        moved:     res/key_white_pressed.bmp
        moved:     res/key_white_unpressed.bmp
        moved:     res/leftarrow.ico
        moved:     res/maintoolbar-16.bmp
        moved:     res/maintoolbar-256.bmp
        moved:     res/rightarrow.ico
        moved:     res/visualizerbg.bmp
        moved:     texts/fasttracker effects.txt
~/src/pijul-ft ❯❯❯ pj revert
file moved to: config.h

Shall I revert this change? (1/28) [ynkad?] a

~/src/pijul-ft ❯❯❯ pj revert
file moved to: config.h

Shall I revert this change? (1/28) [ynkad?] a

~/src/pijul-ft ❯❯❯ pj fork move
~/src/pijul-ft ❯❯❯ pj record
file moved to: config.h

Shall I record this change? (1/28) [ynkad?] a

What is the name of this patch? plus move
Recorded patch 96gCnAvTG3VCCudxCKVjyGf5ttB2tKsbzrqTaVBTmf2nGnr7Crm26EW5mjNd2GVLmtG5XcnAn6W8kEkKdBmKhE9d
~/src/pijul-ft ❯❯❯ pj log
Hash: 96gCnAvTG3VCCudxCKVjyGf5ttB2tKsbzrqTaVBTmf2nGnr7Crm26EW5mjNd2GVLmtG5XcnAn6W8kEkKdBmKhE9d
Internal id: RvnVM3PyJ7y
Authors: jimbo1qaz <jimbo1qaz@protonmail.com>
Timestamp: 2019-06-26 06:46:20.329132229 UTC

    vanilla plus move

Hash: 7t9HsprXYmNofJHo4fXz9p93bkdpDgcCR3q8u3rQhDAsZBmsWQehYUgUvZxoPwsmQFRpLgjgPNx3LixtyJeLUrY5
Internal id: Fkhx8gVe73M
Authors: jimbo1qaz <jimbo1qaz@protonmail.com>
Timestamp: 2019-06-23 05:46:57.166166949 UTC

    vanilla
~/src/pijul-ft ❯❯❯ pj patch 96gCnAvTG3VCCudxCKVjyGf5ttB2tKsbzrqTaVBTmf2nGnr7Crm26EW5mjNd2GVLmtG5XcnAn6W8kEkKdBmKhE9d
- (Invalid UTF-8)
- (Invalid UTF-8)
- (Invalid UTF-8)
- (Invalid UTF-8)
- (Invalid UTF-8)
- (Invalid UTF-8)
- (Invalid UTF-8)
- (Invalid UTF-8)
- (Invalid UTF-8)
- (Invalid UTF-8)
- (Invalid UTF-8)
- (Invalid UTF-8)
- (Invalid UTF-8)
- (Invalid UTF-8)
- (Invalid UTF-8)
- (Invalid UTF-8)
- (Invalid UTF-8)
- (Invalid UTF-8)
- (Invalid UTF-8)
- (Invalid UTF-8)
- (Invalid UTF-8)
- (Invalid UTF-8)
- (Invalid UTF-8)
- (Invalid UTF-8)
- (Invalid UTF-8)
- (Invalid UTF-8)
- (Invalid UTF-8)
- (Invalid UTF-8)
pmeunier commented on June 26, 2019

Hi! Thanks for reporting. I'm a bit confused:

  • There is no command pijul reset. What did you do there?
  • pijul record is meant to create a patch, not to stop complaints about file names. Was that intended?

Can you reproduce with Pijul from the master branch in this repository? Else, can you give me any way to reproduce?

jimbo1qaz commented on June 26, 2019
  • Sorry, I meant pijul revert.
  • I have a log at the bottom of my issue, where I found that pijul record created a new patch (which pijul patch thinks contains invalid UTF-8) and silenced the status messages.

~~I am unable to clone pijul master due to #371. I have tried 10 or more times, they all fail.~~ (I managed to check it out by running pijul pull in the hidden temporary directory created.) Still, do you have a .zip download?

To reproduce, can you try downloading https://www.dropbox.com/s/gm1al62jsty608o/pijul-ft.pijul.7z?dl=1, and then checkout j0cc-from-vanilla then vanilla? (Maybe I could upload to my nest account instead.)


I made a debug build of master, went from vanilla to pijul checkout j0cc-from-vanilla.

I can no longer checkout vanilla because error: There are pending changes in the repository..

Running pijul status shows:

On branch j0cc-from-vanilla

Changes not yet recorded:
  (use "pijul record ..." to record a new patch)

        Moved: res/about.bmp to res/about.bmp
        Moved: res/application.ico to res/application.ico
        Moved: res/document.ico to res/document.ico
        Moved: res/inst_2a03.ico to res/inst_2a03.ico
        Moved: res/inst_2a07.ico to res/inst_2a07.ico
        Moved: res/inst_fds.ico to res/inst_fds.ico
        Moved: res/inst_n163.ico to res/inst_n163.ico
        Moved: res/inst_s5b.ico to res/inst_s5b.ico
        Moved: res/inst_vrc6.ico to res/inst_vrc6.ico
        Moved: res/inst_vrc7.ico to res/inst_vrc7.ico
        Moved: res/instrumenttoolbar-16.bmp to res/instrumenttoolbar-16.bmp
        Moved: res/instrumenttoolbar-256.bmp to res/instrumenttoolbar-256.bmp
        Moved: res/key_black_pressed.bmp to res/key_black_pressed.bmp
        Moved: res/key_black_unpressed.bmp to res/key_black_unpressed.bmp
        Moved: res/key_white_pressed.bmp to res/key_white_pressed.bmp
        Moved: res/key_white_unpressed.bmp to res/key_white_unpressed.bmp
        Moved: res/leftarrow.ico to res/leftarrow.ico
        Moved: res/maintoolbar-16.bmp to res/maintoolbar-16.bmp
        Moved: res/maintoolbar-256.bmp to res/maintoolbar-256.bmp
        Moved: res/rightarrow.ico to res/rightarrow.ico
pmeunier commented on June 27, 2019

Thanks a lot for your help! I just pushed a few patches that should fix some of your problems, at least related to pijul patch. I'm leaving this issue open, as printing deleted file names is probably not tested enough.

jimbo1qaz commented on June 28, 2019

Do I close this issue and open a different one? I think I have misdiagnosed this issue entirely.


Reproduced as of master, with a repo created earlier. Pushed to https://nest.pijul.com/jimbo1qaz/permissions .

pijul checkout/revert resets file permissions, but does not change "clean state".

Setting up repo

  • pijul fork 644 && pijul prune master
    • create file with permission 644 and plaintext contents
    • pijul add filename
    • pijul record -> 73URYyWiaRsCkwfAnCyDMZWkH5J92xNuhY8nHkrDoZ2Je2FfK5sgaE58ZknPRLjriQm3UdrBzFDa71C1JmnJbZEE
  • pijul fork 755
    • change permissions to 755
    • pijul record -> 6a6uGzCqPEfTbs4hHPutWmKwBkQTnRFbzxvy2reswGK58yUtMsesT892VNKjZ3nExDWZxb6hHn7fpj2Y8xc6Y8ss

Checking out older branch is broken

  • pijul checkout 644
    • file is 644, but pijul status thinks Moved: filename to filename
    • changing to 755 makes pijul status clean.
    • pijul revert switches to 644 and makes pijul status dirty again: Moved: filename to filename
  • pijul checkout 755
    • file is 755. pijul status thinks working tree clean.
    • pijul revert does nothing.

Fixing older branch, breaking newer branch

  • pijul fork --branch 644 fake-branch
  • pijul revert
    • same as pijul checkout 644
  • pijul record as fake-patch -> 97ASfmATDziLqC5k9gX7sjFuoGFJx28zWbYxji5vNMCxGvYVMmHLSsYkFugE526oF1ED7uYBuhkEMQx3ciQha821
    • pijul status is clean.
  • pijul checkout 644, status is clean.
  • pijul checkout 755, file permission is 755, pijul revert sets to 755, but pijul status is only clean when I change permission to 644.

Showing the patches

  • pijul patch 73URYyWiaRsCkwfAnCyDMZWkH5J92xNuhY8nHkrDoZ2Je2FfK5sgaE58ZknPRLjriQm3UdrBzFDa71C1JmnJbZEE (branch 644)
    • shows normally.
  • pijul patch 6a6uGzCqPEfTbs4hHPutWmKwBkQTnRFbzxvy2reswGK58yUtMsesT892VNKjZ3nExDWZxb6hHn7fpj2Y8xc6Y8ss (branch 755)
    • no output.
  • pijul patch 97ASfmATDziLqC5k9gX7sjFuoGFJx28zWbYxji5vNMCxGvYVMmHLSsYkFugE526oF1ED7uYBuhkEMQx3ciQha821 (fake-patch)
    • no output.