-
Notifications
You must be signed in to change notification settings - Fork 349
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
FR: Add new revset builtin_immutable_heads()
#4195
Conversation
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.
SELF REMINDER: squash commits before submitting.
Done.
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.
I think we need a way to override
trunk()
since some repos have main branches called something other thanmain
,master
ortrunk
.
Done.
086dced
to
4f77a73
Compare
I've changed my approach. Instead of defining this in jj-lib, I'm now defining it as an alias in a new config source layer that takes precedence over all other config sources: builtins.toml So since it's just a regular alias, it can be defined in terms of wdyt? If this looks good, I'll go ahead to add some tests. |
builtin_immutable_heads()
builtin_immutable_heads()
ab4d64f
to
89907b3
Compare
22f3838
to
10dfa89
Compare
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!
* Add `builtin_immutable_heads()` in the `revsets.toml`. * Redefine `immutable_heads()` in terms of `builtin_immutable_heads()` * Warn if user redefines `builtin_immutable_heads()`, `mutable()` or `immutable()`. * Update module constant in revset_util.rs from BUILTIN_IMMUTABLE_HEADS to USER_IMMUTABLE_HEADS to avoid confusion since it points at `immutable_heads()` **and** we now have a revset-alias literally named `builtin_immutable_heads()`. * Add unittest * Update CHANGELOG * Update documentation. Fixes: #4162
Yw, and thanks again for the patient explanations. Much appreciated. |
builtin_immutable_heads()
in default config layer.immutable_heads()
in terms ofbuiltin_immutable_heads()
builtin_immutable_heads()
,mutable()
orimmutable()
are redefined by the user.Fixes: #4162
Checklist
If applicable:
CHANGELOG.md