forked from mirrors/jj
merge_view: remove heads removed by other side also in Google repos
When I addded the workaround in 256988de65
, I missed the comment
just below explaining that heads removed by the other side were
already handled. Since that's not handled when using non-default
indexes now, we need to handle it in an `else` block.
This commit is contained in:
parent
0a39cfdbe2
commit
66aced5dc8
1 changed files with 6 additions and 2 deletions
|
@ -1629,9 +1629,13 @@ impl MutableRepo {
|
||||||
if self.index.as_any().is::<DefaultMutableIndex>() {
|
if self.index.as_any().is::<DefaultMutableIndex>() {
|
||||||
self.record_rewrites(&base_heads, &own_heads);
|
self.record_rewrites(&base_heads, &own_heads);
|
||||||
self.record_rewrites(&base_heads, &other_heads);
|
self.record_rewrites(&base_heads, &other_heads);
|
||||||
|
// No need to remove heads removed by `other` because we already
|
||||||
|
// marked them abandoned or rewritten.
|
||||||
|
} else {
|
||||||
|
for removed_head in base.heads().difference(other.heads()) {
|
||||||
|
self.view_mut().remove_head(removed_head);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
// No need to remove heads removed by `other` because we already marked them
|
|
||||||
// abandoned or rewritten.
|
|
||||||
for added_head in other.heads().difference(base.heads()) {
|
for added_head in other.heads().difference(base.heads()) {
|
||||||
self.view_mut().add_head(added_head);
|
self.view_mut().add_head(added_head);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue