-
Notifications
You must be signed in to change notification settings - Fork 382
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
cli: apply log --limit before --reversed #5473
Conversation
The implementation isn't specific to revset, and is short.
As I said, I don't have strong feeling about the current behavior, and appears that "log | head | reverse" is preferred over "log | reverse | head". "jj evolog" already behaves differently, so I just updated the doc. Note that the new behavior might be slightly different from git, but nobody would care. (iirc, in git, topological sorting comes later.) Closes jj-vcs#5403
f8afe25
to
83ed830
Compare
I find the output of I'm referring to the first 7 commits in this output (I deleted some irrelevant commits, so there aren't 20 commits in the picture): % jj log --limit 20 --reversed
○ wlxpnk bsdinis@mit. 3 days ago pr/5441 03698cd
insta: run --force-update-snapshots
○ nxrott ilyagr@users 3 days ago 2b50217
│ insta test
○ pvoxqo ilyagr@users 3 days ago 1978416
errors
○ wlsqrn ilyagr@users 3 days ago 00cf4b9
├─╮ smaller set of files
│ ○ vuzoxm ilyagr@users 3 days ago 02dc4f2
│ minimal errors
○ nksnlk ilyagr@users 3 days ago b58e6e4
(no description set)
○ yqtslm ilyagr@users 3 days ago f727420
(no description set)
◆ zqqnzn ilyagr@users 3 days ago bb74a9e
├─╮ config.md: document how to install Meld (on a Mac, especially)
~ │ (elided revisions)
│ ○ kuottw ilyagr@users 2 days ago ig/codespell 91c8a5f
│ codespell action: use `uv` to run codespell
◆ osyzuk 49699333+dep 2 days ago f3bbc50
├─╮ github: bump the github-dependencies group with 2 updates
~ │ (elided revisions)
│ ○ tvrmvq ilyagr@users 1 day ago bf294a3
│ │ print-page
│ ○ kprnrz ilyagr@users 1 day ago docs-single-page 9c1801b
│ add urls
@ xkttkv ilyagr@users 8 minutes ago 1f3f59d
(empty) (no description set) Unredacted version with 20 commits, also shows what a mega-merge looks like(Probably not super-relevant, but might be interesting to some) % jj log --limit 20 --reversed
○ wlxpnk bsdinis@mit. 3 days ago pr/5441 03698cd
insta: run --force-update-snapshots
○ nxrott ilyagr@users 3 days ago 2b50217
│ insta test
○ pvoxqo ilyagr@users 3 days ago 1978416
errors
○ wlsqrn ilyagr@users 3 days ago 00cf4b9
├─╮ smaller set of files
│ ○ vuzoxm ilyagr@users 3 days ago 02dc4f2
│ minimal errors
○ nksnlk ilyagr@users 3 days ago b58e6e4
(no description set)
○ yqtslm ilyagr@users 3 days ago f727420
(no description set)
◆ zqqnzn ilyagr@users 3 days ago bb74a9e
├─╮ config.md: document how to install Meld (on a Mac, especially)
~ │ (elided revisions)
│ ○ kuottw ilyagr@users 2 days ago ig/codespell 91c8a5f
│ codespell action: use `uv` to run codespell
◆ osyzuk 49699333+dep 2 days ago f3bbc50
├─╮ github: bump the github-dependencies group with 2 updates
~ │ (elided revisions)
│ ○ tvrmvq ilyagr@users 1 day ago bf294a3
│ │ print-page
│ ○ kprnrz ilyagr@users 1 day ago docs-single-page 9c1801b
│ add urls
◆ muqzov [email protected] 2 hours ago main dcca181
├─┬─╮ cli: apply log --limit before --reversed
│ │ ○ xuywkq ilyagr@users 19 minutes ago d03b90a
│ │ ├─╮ pager: refactor pager config (no-op)
│ │ │ ○ qpnnkx ilyagr@users 19 minutes ago streamopts-direct baae872
│ │ │ built-in pager: allow configuring streampager options
│ ○ │ plpsvw ilyagr@users 19 minutes ago b26ca6b
│ │ │ build.rs: separate commit ids if compiling at a merge commit
│ │ ○ ovwtzo ilyagr@users 19 minutes ago ig/streamopts* streamopts 5b41736
│ ├─╯ built-in pager: allow configuring streampager options
○ │ znyxps ilyagr@users 12 minutes ago push-name git_head() c139255
├─╮ cli `git push`: new `--name` argument to specify bookmark created by `--change`
│ ◌ mluups ilyagr@users 12 minutes ago ilya 1646ea6
│ (empty) Merge
@ xkttkv ilyagr@users 12 minutes ago 1f3f59d
(empty) (no description set) The normal direction is pretty clear (I deleted some irrelevant commits, so the count is off): % jj log --limit 20
@ xkttkv ilyagr@users 7 minutes ago 1f3f59d
│ (empty) (no description set)
◆ muqzov [email protected] 2 hours ago main dcca181
│ cli: apply log --limit before --reversed
~ (elided revisions)
│ ○ kprnrz ilyagr@users 1 day ago docs-single-page 9c1801b
│ │ add urls
│ ○ tvrmvq ilyagr@users 1 day ago bf294a3
├─╯ print-page
◆ osyzuk 49699333+dep 2 days ago f3bbc50
│ github: bump the github-dependencies group with 2 updates
~ (elided revisions)
│ ○ kuottw ilyagr@users 2 days ago ig/codespell 91c8a5f
├─╯ codespell action: use `uv` to run codespell
◆ zqqnzn ilyagr@users 3 days ago bb74a9e
│ config.md: document how to install Meld (on a Mac, especially)
~ (elided revisions)
│ ○ yqtslm ilyagr@users 3 days ago f727420
├─╯ (no description set)
│ ○ nksnlk ilyagr@users 3 days ago b58e6e4
│ │ (no description set)
│ │ ○ vuzoxm ilyagr@users 3 days ago 02dc4f2
│ ├─╯ minimal errors
│ ○ wlsqrn ilyagr@users 3 days ago 00cf4b9
├─╯ smaller set of files
│ ○ pvoxqo ilyagr@users 3 days ago 1978416
│ │ errors
│ ○ nxrott ilyagr@users 3 days ago 2b50217
├─╯ insta test
│ ○ wlxpnk bsdinis@mit. 3 days ago pr/5441 03698cd
├─╯ insta: run --force-update-snapshots One possible solution would be to strongly err towards showing the immutable commit that all these branches end with. I'm not sure what is best (and maybe others won't run into this), but wanted to make you aware of this. Another solution would be to have some analogue of the branches all merging together, like at the bottom of the normal direction log. I wonder what, if anything, Sapling does. |
I think the output is identical to the one root commits are filtered out by Reversed graph doesn't have edges towards omitted roots (in the same way as forward graph doesn't have edges towards omitted heads.) That's not a new problem. I have no idea how that can be addressed. |
Yes, I couldn't find any way to show a reversed graph in Sapling. So, I guess it doesn't have graph drawing primitives for this at all. |
Closes #5403
Checklist
If applicable:
CHANGELOG.md