Skip to content

Commit

Permalink
Add the revsets mutable and immutable.
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
matts1 committed May 16, 2024
1 parent c34f35f commit efb0b1b
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 0 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

* `ui.color = "debug"` prints active labels alongside the regular colored output.

* 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
Expand Down
2 changes: 2 additions & 0 deletions cli/src/config/revsets.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,5 @@ latest(
'''

'immutable_heads()' = 'trunk() | tags()'
'immutable()' = '::immutable_heads()'
'mutable()' = '~immutable()'
4 changes: 4 additions & 0 deletions docs/revsets.md
Original file line number Diff line number Diff line change
Expand Up @@ -219,6 +219,10 @@ for a comprehensive list.

* `immutable_heads()`: Resolves to `trunk() | tags()` by default. See
[here](config.md#set-of-immutable-commits) for details.
* `immutable()`: Resolves to `::immutable_heads()` by default. See
[here](config.md#set-of-immutable-commits) for details.
* `mutable()`: Resolves to `~immutable()` by default. See
[here](config.md#set-of-immutable-commits) for details.


## The `all:` modifier
Expand Down

0 comments on commit efb0b1b

Please sign in to comment.