-
-
Notifications
You must be signed in to change notification settings - Fork 3.2k
feat: vcs: support Jujutsu as a diff-provider #12022
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
base: master
Are you sure you want to change the base?
feat: vcs: support Jujutsu as a diff-provider #12022
Conversation
d07b9ff to
601e3a5
Compare
422e761 to
fc7c8d1
Compare
fc7c8d1 to
3bb3fb5
Compare
3bb3fb5 to
35f2ee1
Compare
|
Hi @poliorcetics, Thanks for this PR, hope it will be merged soon. |
35f2ee1 to
4daf973
Compare
|
Hi @poliorcetics, Thank you for working on integrating jj into helix, I am using helix from your branch, and it has been great so far. I am new to jj, and this PR is still a draft, but wanted to make a suggestion on the status-line entry, Will |
4daf973 to
c508dd1
Compare
It could easily be done code-wise, but I'm trying to get the same behavior as the If maintainers confirm it would be ok to add, I'll do it :) |
|
This gets a bit weird with reloading newly-added or untracked files.
Each time the file is reloaded, the diff base is set to the current file. I have somewhat of a fix for this at d4a0e44. If the file is untracked, return early. If the file is new, return an empty base. Otherwise, continue as before. I'm not really a fan of my implementation, since it relies on jj emitting a warning message if the file isn't found in the repo. Could do without that by doing a separate |
|
Was curious to see what an implementation using |
da5d835 to
035ccd0
Compare
035ccd0 to
b58879e
Compare
b58879e to
8b10cc2
Compare
8b10cc2 to
5e0f205
Compare
5e0f205 to
30dd7e2
Compare
30dd7e2 to
ec98a74
Compare
|
Looks like this feature doesn't always work. I experienced this on a non-collocated repo as well as (albeit less often) on pure Git repos. |
ec98a74 to
ee0e561
Compare
ee0e561 to
f597775
Compare
|
I'm not getting any gutter information in a pure JJ repo, and there aren't any logs to suggest something went wrong. Does this PR not provide gutter information? If not could we? I'd be happy to hack on this and see if I can get it going |
It worked intermittently for me as well. I suspect it hits some threshold timeout in case the repo is large enough. |
5b21777 to
dde2d25
Compare
|
I havent tried this yet, but, for example, would this handle finding the most recent bookmark in the decedents, and then use that for the "branch" name, like how git has? Its nice for the command line to have the revisions and not care so much about the bookmarks, but in the editor it would be nice to know what the direct parent is for what I am working on. Sorry if this is out of scope. |
dde2d25 to
45292ac
Compare
That not how Git works: Git only finds the "current branch" because your current state is not a commit, it's the staging area: if you use detached HEAD mode with a branch on the previous commit, Git will not find the branch. Still, I added this feature because I can see it being requested often. If exactly on a bookmark it will look like |
720f86d to
833f25a
Compare
|
Fixed the issue around conflicts, they are now correctly listed in repo changes 🎉 |
c2f51a9 to
18eb0df
Compare
This comment was marked as resolved.
This comment was marked as resolved.
18eb0df to
1d2597e
Compare
|
This makes sense in essence, but I wonder if there is only a single direct ancestor bookmark should it only display that bookmark? For example, here I have If there was a "merge" with two ancestor bookmarks, then maybe it would make more sense to have them both displayed? It makes sense to me to only display a single bookmark if it has a linear history, but the rules around merge bookmarks are more complicated. |
The issue is, in a single call to |
|
Also, because of Ultimately this is a situation where I prefer to display more information than less, though it would be cool to find a single-command way to order bookmarks (e.g. |
|
Ahh, good point! I hadnt thought of the other interactions you can have like |
1d2597e to
6214389
Compare
6214389 to
02824ee
Compare
|
Thank you for maintaining this! I've used this as inspiration for adding mercurial support for myself. |



Built on top of #9951, I'll be waiting for it to be merged to un-draft this
Jujutsu (
jj) is a new change-based VCS (whereasgitis branch-based).In this PR, I add the ability for helix to get the diffs and current head, behind a feature called
jjthat is active by default. That would make it the first editor I know off that officially handles that VCS!To handle all current, future and private backends (Google already has one I believe), I instead made it so Helix can behave as a diff tool for Jujutsu and then use that as a subcommand to get the diff base.
For the head, I simply used the templating system to extract all relevant informations.
Jujutsu has a library, called
jj-libbut it's not ready for use in third party programs and wouldn't fix the issue of custom backends anyway.Testing
Since testing needs
jjinstalled, I haven't written any for Helix yet to discuss how to do it:jjin CI and use it to test the new feature