Pijul

Adventures in converting: git-pijul

Yesterday I was reading Create a GitHub mirror and decided to try the git-pijul tool that is on the Nest.
Unfortunately, that one wouldn’t build (says it needed cmake), but I found a link to a fork in a discussion there. That one worked, and so I decided to try converting a large repo: https://github.com/ClassicPress/ClassicPress

I started it almost 24 hours ago, and it is still running.
It is chugging along though.

But the output is alarming, and I don’t think it is sustainable.
The .git folder has 262 items, totalling 125.3 MB.
The .pijul folder (which isn’t done yet) has 27822 items, totalling 1.3 GB. The pristine/db is 1.1 GB.
This is not something that I could easily branch or send to my colleague, or anything.
I know that Pijul saves a little more information, but at what cost?

Is this being changed in the rewrite? Or is there a problem with the conversion tool?

This morning I checked on my conversion, and it appears to have died while I slept. So it ran from Aug 3, 11:54 to Aug 5 04:52.
It wasn’t done, but the .pijul folder now has 38190 items, totalling 1.9 GB.
The error says

thread ‘main’ panicked at ‘called Result::unwrap() on an Err value: BranchNameAlreadyExists(“develop”)’, src/main.rs:129:30

so obviously there is a problem in the logic somewhere. Would that be in the git-pijul converter, or is it just reporting what Pijul says?
Surely it okay to have branches with the same name in different parts of the history of a project.

One of the things that might be happening on conversion is that since the .pijul folder created does not contain an ignore for the .git, everything is slower.
I noticed that as each patch was generated, the .git folder was changing.
The only thing I see now with a changed timestamp is a file named index, which is very small, but the timestamp is after the conversion started. Strangely, it is now set to the time (a little while ago) that I did a git status so I could compare to pijul status. To me, that says that the file was changing every time git-pujil called Git.
I don’t really understand the code, so I can’t tell if the Git commit is recorded directly or if a diff has to happen first.
But an ignore file would be a necessary addition to git-pijul.

Was that https://nest.pijul.com/rohan/git-pijul? It has some limitations like not dealing with merges… ok, so not a small limitation :wink:

Yes, that’s the one I was using.
I have no idea what it is doing, because the source files of my repo all have the timestamp of the last operation git-pijul did.
Is it supposed to only run on a repo with no working tree?

The next version of Pijul (which I’m hoping to release next week) will probably solve all your problems, as it makes much smaller repositories, and already includes a git importer.

3 Likes

That’s great news!
Is there some way we can help? Test? Docs?

Not really, unfortunately, I still need to package it up so that others can use it.

PLEASE DO! We’re kinda in the dark here.

That’s great to hear.

Since development was done in private, I’d recommend letting a larger group test it out before announcing it in a public fashion (blog post etc). Some bugs are certain to only pop up with more diverse testing.

I’d definitely be interesting in trying it out with a few more complicated use cases.

3 Likes

Hi,

How is the new release progressing? Very much looking forward to its availability!

Thanks,

  • Ed
1 Like