-
Notifications
You must be signed in to change notification settings - Fork 353
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
commands: Implement next
and prev
#1200
Conversation
f1a62b9
to
8bc732c
Compare
Sorry that I haven't progressed that much. While I have some local changes, I'm also in the progress of moving to neovim as my main |
No worries! Take your time. |
8bc732c
to
f1d137c
Compare
PTAL, @martinvonz if I'm on the correct path. |
Yes, looks like it. Do you need help with anything or is it going pretty well? |
fecd27d
to
ed0cf1b
Compare
Try replacing |
next
and prev
next
and prev
This is now ready for review. A testcase is missing and four are failing but can be fixed during the review. |
(Github somehow failed to load the review UI, so commented in old style.)
Perhaps, you can build a single query like this. let current = RevsetExpression::commit(current_wc_id.clone());
let next = current.parents().children().minus(¤t); // @-+ & ~@
Rc::new(RevsetExpression::Descendants {
roots: next,
generation: (amount - 1)..amount,
}); We'll probably need a helper method for the last part. I can't think of a good name, but maybe
I think Mercurial's behavior is not FWIW, the query |
Thanks, this suggestion is simpler than my previous attempts. My initial attempt is still available as commented code, e.g a direct lookup via
Thanks for the clarification. What would be a more appropriate description? This is purely based on my assumptions from sl next. |
My feeling is that |
From my perspective (I did not look too deep into this), for And something like |
I'm one of the people which generally use
I respectfully disagree, see the initial conversation with Martin on Discord here. |
FYI, 2164b7e somehow fails to load for me, so I can't review this. I agree that this comment is misleading:
Maybe something like this?
|
cbbb91d
to
7969fed
Compare
3c58d99
to
bdf3a01
Compare
bdf3a01
to
f942fe6
Compare
f942fe6
to
5c3e160
Compare
863ff22
to
a6aecca
Compare
Is this PR ready to be merged? |
Sorry for no activity here, as I had some personal obligations. I'm fine to commit as is and add the |
Sounds good! Do you have time to rebase it so it can be merged? |
Yeah, I'll do it after creating a issue with the missing feature and splitting my local changes into a later commit. |
They are needed for `next` and `prev`. They behave symmetrically for parents and children.
a6aecca
to
5a66afc
Compare
This is a naive implementation, which cannot deal with multiple children or parents stemming from merges. Note: I gave each command separate a separate argument struct for extensibility. Fixes jj-vcs#878
5a66afc
to
ff2c8ad
Compare
Should be good now. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! Looking forward to using this.
This is a naive implementation, which cannot deal with multiple children or parents stemming from merges.
For now I'll create a follow-up bug, which someone else can solve.
Note: I currently gave each command separate a separate argument struct for extensibility.
Fixes #878
Checklist
CHANGELOG.md