Using pijul git

Continuing the discussion from Git-pijul python module:

I’m having trouble with converting a git repo to pijul.
I reinstalled Pijul to get your fix.

...
    Replaced package `pijul v1.0.0-alpha.52` with `pijul v1.0.0-alpha.53` (executable `pijul`)
$ pijul -V
pijul 1.0.0-alpha.53

I checked syntax of the command.

$ pijul git -h
pijul-git 
Imports a git repository into pijul

USAGE:
    pijul git [repo-path]

ARGS:
    <repo-path>    Process this path instead of the current directory, creating a Pijul
                   repository if necessary

FLAGS:
    -h, --help       Prints help information
    -V, --version    Prints version information

I first tried

$ pijul init
$ pijul git ../wp-git
Error: failed to resolve path '': No such file or directory; class=Os (2); code=NotFound (-3)

I got the same thing adding a slash

$ pijul git ../wp-git/
Error: failed to resolve path '': No such file or directory; class=Os (2); code=NotFound (-3)

So I put the entire path and it seemed to be doing something but not telling me anything about it. This was around 10pm so I went to bed and this morning I see it finally said something (7 hours later).

$ pijul git /media/bigdisk/Data/_working/contrib/wp-git/
[2021-08-05T05:19:22Z ERROR pijul::commands::git] While adding "src/wp-includes/js/tinymce/wp-tinymce.js.gz": Record(PathNotInRepo("src/wp-includes/js/tinymce/wp-tinymce.js.gz"))
[2021-08-05T09:28:57Z ERROR pijul::commands::git] While adding "src/wp-includes/blocks/site-logo/editor-rtl.css": Record(PathNotInRepo("src/wp-includes/blocks/site-logo/editor-rtl.css"))
[2021-08-05T09:28:57Z ERROR pijul::commands::git] While adding "src/wp-includes/blocks/site-logo/editor-rtl.min.css": Record(PathNotInRepo("src/wp-includes/blocks/site-logo/editor-rtl.min.css"))
[2021-08-05T09:28:57Z ERROR pijul::commands::git] While adding "src/wp-includes/blocks/site-logo/editor.css": Record(PathNotInRepo("src/wp-includes/blocks/site-logo/editor.css"))
[2021-08-05T09:28:57Z ERROR pijul::commands::git] While adding "src/wp-includes/blocks/site-logo/editor.min.css": Record(PathNotInRepo("src/wp-includes/blocks/site-logo/editor.min.css"))
[2021-08-05T09:28:57Z ERROR pijul::commands::git] While adding "src/wp-includes/blocks/site-logo/style-rtl.css": Record(PathNotInRepo("src/wp-includes/blocks/site-logo/style-rtl.css"))
[2021-08-05T09:28:57Z ERROR pijul::commands::git] While adding "src/wp-includes/blocks/site-logo/style-rtl.min.css": Record(PathNotInRepo("src/wp-includes/blocks/site-logo/style-rtl.min.css"))
[2021-08-05T09:28:57Z ERROR pijul::commands::git] While adding "src/wp-includes/blocks/site-logo/style.css": Record(PathNotInRepo("src/wp-includes/blocks/site-logo/style.css"))
[2021-08-05T09:28:57Z ERROR pijul::commands::git] While adding "src/wp-includes/blocks/site-logo/style.min.css": Record(PathNotInRepo("src/wp-includes/blocks/site-logo/style.min.css"))
[2021-08-05T09:31:13Z ERROR pijul::commands::git] While adding "src/wp-includes/blocks/site-logo/editor-rtl.css": Record(PathNotInRepo("src/wp-includes/blocks/site-logo/editor-rtl.css"))
[2021-08-05T09:31:13Z ERROR pijul::commands::git] While adding "src/wp-includes/blocks/site-logo/editor-rtl.min.css": Record(PathNotInRepo("src/wp-includes/blocks/site-logo/editor-rtl.min.css"))
[2021-08-05T09:31:13Z ERROR pijul::commands::git] While adding "src/wp-includes/blocks/site-logo/editor.css": Record(PathNotInRepo("src/wp-includes/blocks/site-logo/editor.css"))
[2021-08-05T09:31:13Z ERROR pijul::commands::git] While adding "src/wp-includes/blocks/site-logo/editor.min.css": Record(PathNotInRepo("src/wp-includes/blocks/site-logo/editor.min.css"))
[2021-08-05T09:33:37Z ERROR pijul::commands::git] While adding "src/wp-includes/blocks/site-logo/editor-rtl.css": Record(PathNotInRepo("src/wp-includes/blocks/site-logo/editor-rtl.css"))
[2021-08-05T09:33:37Z ERROR pijul::commands::git] While adding "src/wp-includes/blocks/site-logo/editor-rtl.min.css": Record(PathNotInRepo("src/wp-includes/blocks/site-logo/editor-rtl.min.css"))
[2021-08-05T09:33:37Z ERROR pijul::commands::git] While adding "src/wp-includes/blocks/site-logo/editor.css": Record(PathNotInRepo("src/wp-includes/blocks/site-logo/editor.css"))
[2021-08-05T09:33:37Z ERROR pijul::commands::git] While adding "src/wp-includes/blocks/site-logo/editor.min.css": Record(PathNotInRepo("src/wp-includes/blocks/site-logo/editor.min.css"))

It didn’t do what I expected. The folder I was in contains only an empty .pijul folder (the one from init). The folder I was trying to import contains a very large .pijul folder and all of the source files there have dates from the last 7 hours.

The .pijul folder contains

  • changes with 45117 items, totaling 498.3 MB
  • git with a db of 536.8 MB
  • pristine with a db of 535.8 MB

The original .git contains 42 items, totaling 168.5 MB and the src folder contains 2741 items, totaling 44.3 MB along with 12 MB of tests.

I don’t think the pijul git command should be writing to the same folder that it is reading. It could overwrite uncommitted changes.
I don’t think it should put the .pijul folder into the source folder either. It should go in the current folder.
I think it should allow a relative path.
I don’t think it should be so much larger (3x) than the original.
I don’t think it should duplicate the large database (in git and pristine).

In the following error:
[2021-08-05T05:19:22Z ERROR pijul::commands::git] While adding "src/wp-includes/js/tinymce/wp-tinymce.js.gz": Record(PathNotInRepo("src/wp-includes/js/tinymce/wp-tinymce.js.gz"))

Is the path in the error (src/wp-includes/js/tinymce/wp-tinymce.js.gz) a symbolic link in Git? Is this a public repository? I’d like to try and reproduce the error.

Hmm. No, it’s not symbolic. In fact, it’s not there at all, but I’m not sure if it was there before Pijul wrote to every file in that repo.
But I think this is a special case, because the js folder was moved and is part of the build process now. It used to be there. So could this have been from an old commit, before the move?
As I said on Zulip, I’m using the WordPress repository because there’s a SVN and Git version.
Subversion: https://develop.svn.wordpress.org/
Git mirror: git://develop.git.wordpress.org/
GitHub: https://github.com/WordPress/wordpress-develop