ok/jj
1
0
Fork 0
forked from mirrors/jj

Add the revsets mutable and immutable.

I add them as aliases, since a user may instead choose to define `immutable_heads()`, for example, as `heads(immutable())`, and the define `immutable()` instead.
This commit is contained in:
Matt Stark 2024-05-17 09:34:43 +10:00 committed by Matt
parent 77cf968316
commit fa6f5e3880
3 changed files with 14 additions and 0 deletions

View file

@ -40,6 +40,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
Note, these are cross compiled and currently untested.
We plan on providing fully tested builds later once our CI system allows it.
* Added new revsets `mutable()` and `immutable()`.
### Fixed bugs
* When the working copy commit becomes immutable, a new one is automatically created on top of it

View file

@ -18,3 +18,5 @@ latest(
'''
'immutable_heads()' = 'trunk() | tags()'
'immutable()' = '::(immutable_heads() | root())'
'mutable()' = '~immutable()'

View file

@ -223,6 +223,16 @@ for a comprehensive list.
* `immutable_heads()`: Resolves to `trunk() | tags()` by default. See
[here](config.md#set-of-immutable-commits) for details.
* `immutable()`: The set of commits that `jj` treats as immutable. This is
equivalent to `::(immutable_heads() | root())`. Note that modifying this will
*not* change whether a commit is immutable. To do that, edit
`immutable_heads()`.
* `mutable()`: The set of commits that `jj` treats as mutable. This is
equivalent to `~immutable()`. Note that modifying this will
*not* change whether a commit is immutable. To do that, edit
`immutable_heads()`.
## The `all:` modifier