Skip to content

Commit

Permalink
cli: drop support for old ui.default-revset config
Browse files Browse the repository at this point in the history
We replaced it by `revsets.log` in 0.8.0, which is long enough that
users should have been able to switch.
  • Loading branch information
martinvonz committed May 5, 2024
1 parent 3d898d0 commit 740657d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

### Breaking changes

* Dropped support for `ui.default-revset` config (replaced by `revsets.log` in
0.8.0).

### Deprecations

### New features
Expand Down
9 changes: 3 additions & 6 deletions lib/src/settings.rs
Original file line number Diff line number Diff line change
Expand Up @@ -205,12 +205,9 @@ impl UserSettings {
}

pub fn default_revset(&self) -> String {
self.config.get_string("revsets.log").unwrap_or_else(|_| {
// For compatibility with old config files (<0.8.0)
self.config
.get_string("ui.default-revset")
.unwrap_or_else(|_| "@ | ancestors(immutable_heads().., 2) | trunk()".to_string())
})
self.config
.get_string("revsets.log")
.unwrap_or_else(|_| "@ | ancestors(immutable_heads().., 2) | trunk()".to_string())
}

pub fn signature(&self) -> Signature {
Expand Down

0 comments on commit 740657d

Please sign in to comment.