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

cli: util: add clear-predecessors command #5715

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

bnjmnt4n
Copy link
Member

This will be useful in removing old versions of a revision from the evolog, and eventually from the repository after the operation is abandoned and the repository is garbage collected.

Checklist

If applicable:

  • I have updated CHANGELOG.md
  • I have updated the documentation (README.md, docs/, demos/)
  • I have updated the config schema (cli/src/config-schema.json)
  • I have added tests to cover my changes

rewriter.rebase()?.write()?;
num_rebased += 1;
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure if we want to allow preserving predecessors for rebased descendants? It doesn't seem very useful to me (I'm guessing the only reason why people would want this command is for garbage collection), so I can remove it.

This will be useful in removing old versions of a revision from the
evolog, and eventually from the repository after the operation is
abandoned and the repository is garbage collected.
@bnjmnt4n bnjmnt4n force-pushed the bnjmnt4n/push-kksuytzrkmoz branch from aa3359a to 6c76346 Compare February 15, 2025 12:21
@yuja
Copy link
Contributor

yuja commented Feb 15, 2025

I think this and resetting change ids are similar, so it's better to add a single command for these requests. Technically they belong to jj describe, but I'm not sure if jj describe --reset-{change-id,predecessors} makes sense.

#4451

@bnjmnt4n
Copy link
Member Author

Those options also seem like they could be part of this list of generalizable rebase options: #4708.

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

Successfully merging this pull request may close these issues.

2 participants