Skip to content
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

jj rebase should accept multiple revisions for -r (-s, and -b are done) #1158

Closed
ilyagr opened this issue Jan 30, 2023 · 5 comments · Fixed by #3564
Closed

jj rebase should accept multiple revisions for -r (-s, and -b are done) #1158

ilyagr opened this issue Jan 30, 2023 · 5 comments · Fixed by #3564
Labels
enhancement New feature or request

Comments

@ilyagr
Copy link
Contributor

ilyagr commented Jan 30, 2023

It already accepts multiple -d arguments.

If multiple -r arguments are specified, the parent-child relationship between the multiple commits being rebased should be preserved.

It seems to make little sense to preserve such relationships for -s and -b.

There's also the related #571 about specifying a revset with multiple commits in a single -d or -r argument. This seems especially important for -r.

Update: #571 is now fixed. While the --allow-large-revsets option exists, -r, -s, and -b should use it the same way -d does.

@ilyagr ilyagr added enhancement New feature or request polish🪒🐃 Make existing features more convenient and more consistent labels Jan 30, 2023
@avamsi
Copy link
Member

avamsi commented Feb 3, 2023

Does this FR include revsets? I.e., if this were to be implemented, would passing multiple -r arguments and passing a single revset (made up of the same revisions) be equivalent? (Never mind, I somehow didn't see the last line earlier.)

Either way, my torebase revset alias (consisting of local revisions that are not descendants of origin/main) and the torebase command alias that prints those revisions would very much appreciate this FR!

@ilyagr ilyagr changed the title jj rebase should accept multiple -r, -s, and -b arguments. jj rebase should accept multiple revisions for -r, -s, and -b Feb 6, 2023
@ilyagr ilyagr removed the polish🪒🐃 Make existing features more convenient and more consistent label Feb 9, 2023
@ilyagr
Copy link
Contributor Author

ilyagr commented Feb 19, 2023

I'll work on -s and -b.

@ilyagr ilyagr self-assigned this Feb 19, 2023
ilyagr added a commit to ilyagr/jj that referenced this issue Feb 19, 2023
ilyagr added a commit to ilyagr/jj that referenced this issue Feb 19, 2023
This also makes `rebase_branch` reuse `rebase_descendants`.

This addresses a portion of jj-vcs#1158
ilyagr added a commit that referenced this issue Feb 19, 2023
This addresses a portion of #1158
ilyagr added a commit that referenced this issue Feb 19, 2023
This also makes `rebase_branch` reuse `rebase_descendants`.

This addresses a portion of #1158
ilyagr added a commit that referenced this issue Feb 19, 2023
This addresses a portion of #1158
ilyagr added a commit that referenced this issue Feb 19, 2023
This also makes `rebase_branch` reuse `rebase_descendants`.

This addresses a portion of #1158
@ilyagr ilyagr linked a pull request Feb 19, 2023 that will close this issue
3 tasks
@ilyagr ilyagr removed a link to a pull request Feb 19, 2023
3 tasks
@ilyagr ilyagr changed the title jj rebase should accept multiple revisions for -r, -s, and -b jj rebase should accept multiple revisions for -r (-s, and -b are done) Feb 20, 2023
@ilyagr ilyagr removed their assignment Feb 20, 2023
@ilyagr
Copy link
Contributor Author

ilyagr commented Feb 20, 2023

Barring a last-moment surprise, -s and -b are now done in #1288.

-r is still outstanding. It should be similar to the implementation of cmd_duplicate. I'm not planning to do it right now; will assign myself again if I start working on it.

ilyagr added a commit that referenced this issue Feb 20, 2023
This addresses a portion of #1158

One application (not the prettiest, but useful until we have `jj sync`):

    jj rebase -s oldmain+~:main -d main -L
ilyagr added a commit that referenced this issue Feb 20, 2023
This also makes `rebase_branch` reuse `rebase_descendants`.

This addresses a portion of #1158
@ilyagr
Copy link
Contributor Author

ilyagr commented May 2, 2024

Thank you so much for working on this! I haven't been able to look at the details yet, but it sounds very nice.

@ilyagr
Copy link
Contributor Author

ilyagr commented May 3, 2024

I also tried it out, it's wonderful so far :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants