Skip to content

Commit

Permalink
Fetch descendants more correctly.
Browse files Browse the repository at this point in the history
  • Loading branch information
essiene committed Aug 16, 2024
1 parent 6ecc2da commit 2cce150
Showing 1 changed file with 14 additions and 9 deletions.
23 changes: 14 additions & 9 deletions cli/src/movement_util.rs
Original file line number Diff line number Diff line change
Expand Up @@ -72,16 +72,21 @@ impl Direction {
change_offset: u64,
) -> Result<Rc<RevsetExpression>, CommandError> {
let target_revset = match self {
Direction::Next => if has_conflict {
start_revset
.children()
.descendants()
.filtered(RevsetFilterPredicate::HasConflict)
.roots()
} else {
start_revset.descendants_at(change_offset)
Direction::Next => {
if has_conflict {
start_revset
.children()
.minus(working_revset)
.descendants()
.filtered(RevsetFilterPredicate::HasConflict)
.roots()
} else {
start_revset
.children()
.minus(working_revset)
.descendants_at(change_offset)
}
}
.minus(working_revset),

Direction::Prev => {
if has_conflict {
Expand Down

0 comments on commit 2cce150

Please sign in to comment.