Skip to content

Commit

Permalink
branching: merge v0.17.1 into main
Browse files Browse the repository at this point in the history
  • Loading branch information
martinvonz committed May 7, 2024
2 parents 3345e40 + e1d8705 commit 61e4e36
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 14 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

### Fixed bugs

## [0.17.1] - 2024-05-07

### Fixed bugs

* `jj status` no longer scans through the entire history to look for ancestors with conflicts.

## [0.17.0] - 2024-05-01

### Breaking changes
Expand Down
10 changes: 5 additions & 5 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ resolver = "2"
members = ["cli", "lib", "lib/gen-protos", "lib/proc-macros", "lib/testutils"]

[workspace.package]
version = "0.17.0"
version = "0.17.1"
license = "Apache-2.0"
rust-version = "1.76" # NOTE: remember to update CI, contributing.md, changelog.md, and flake.nix
edition = "2021"
Expand Down Expand Up @@ -116,8 +116,8 @@ zstd = "0.12.4"
# put all inter-workspace libraries, i.e. those that use 'path = ...' here in
# their own (alphabetically sorted) block

jj-lib = { path = "lib", version = "0.17.0" }
jj-lib-proc-macros = { path = "lib/proc-macros", version = "0.17.0" }
jj-lib = { path = "lib", version = "0.17.1" }
jj-lib-proc-macros = { path = "lib/proc-macros", version = "0.17.1" }
testutils = { path = "lib/testutils" }

# Insta suggests compiling these packages in opt mode for faster testing.
Expand Down
16 changes: 10 additions & 6 deletions cli/src/commands/status.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ use tracing::instrument;

use crate::cli_util::{print_conflicted_paths, CommandHelper};
use crate::command_error::CommandError;
use crate::diff_util;
use crate::ui::Ui;
use crate::{diff_util, revset_util};

/// Show high-level repo status
///
Expand Down Expand Up @@ -95,11 +95,15 @@ pub(crate) fn cmd_status(

let wc_revset = RevsetExpression::commit(wc_commit.id().clone());
// Ancestors with conflicts, excluding the current working copy commit.
let ancestors_conflicts = RevsetExpression::filter(RevsetFilterPredicate::HasConflict)
.intersection(&wc_revset.ancestors())
.minus(&wc_revset)
.evaluate_programmatic(repo.as_ref())?
.iter()
let ancestors_conflicts = workspace_command
.attach_revset_evaluator(
RevsetExpression::filter(RevsetFilterPredicate::HasConflict)
.intersection(&wc_revset.parents().ancestors())
.minus(&revset_util::parse_immutable_expression(
&workspace_command.revset_parse_context(),
)?),
)?
.evaluate_to_commit_ids()?
.collect();
workspace_command.report_repo_conflicts(formatter, repo, ancestors_conflicts)?;
} else {
Expand Down

0 comments on commit 61e4e36

Please sign in to comment.