pijul_org / pijul

#62 suggestion: always list patches in chronological order

Opened by lthms, on April 23, 2017
Closed
lthms commented on April 23, 2017

In pijul, patch application order does not matter as long as patch commute. It is a very good property, but when using pijul changes, I find it somehow confusing. Same goes for the Patches tab of the Nest. Therefore, I would really appreciate if I had a way to list the patches in a chronological order.

pmeunier commented on April 24, 2017

They are listed in chronological order of application, and the application algorithm starts by recursively applying all dependencies.

We could use time as a heuristic to order patches when applying, and fall back to the default when the time field is wrong.

lthms commented on April 24, 2017

That seems like a good idea.

Basically, my main issue can be reflected by the following patches list: https://nest.pijul.com/lthms/lkn-prelude:lkn-prelude-0.1.1/patches

I currently use the branches to deal with releases (things for which I would have used tags if I were using git). I create the new branch like this: pijul push <repos> to-branch <branch>. In my example, the patch where I bump the version number is almost at the end of the list and I find it very confusing. I think your solution would solve that?

Of course, this is just a personnal point of view, not the absolute truth.

lthms commented on April 26, 2017

The more I think about it, the more I think the issue can be summarize as follows:

pijul push/pijul clone/pijul pull should preserve patches ordering (especially when cloning a repo and pushing all to an empty repo)

gabomgp commented on May 4, 2017

+1 for this

pmeunier commented on July 21, 2017

Hi guys, I just pushed #AbGbegBbd987-PnlqkIWyB6qBGPs6U5ZkJ-fg4BtnLaxN5jZhcoOAnKklfsaz3BXnLfFJqH99eKMDBkEHStwpzk to solve this.

The effects won't be instantaneous. Instead, from now on, all applications of sets of patches will be applied in the same order they were applied in the origin repository. In particular, if you record n patches on your machine in some order, and push, they should be applied on the remote in the same order.

This is of course modulo bugs. Feel free to reopen / submit test cases if you find them.