Show More
@@ -510,22 +510,35 b' fn chain_changes(' | |||
|
510 | 510 | // propagate this information when merging two |
|
511 | 511 | // InternalPathCopies object. |
|
512 | 512 | let deleted = path_map.tokenize(deleted_path); |
|
513 | match &mut p1_copies { | |
|
514 | None => (), | |
|
515 |
|
|
|
516 |
|
|
|
517 | old.mark_delete(current_rev); | |
|
518 |
|
|
|
519 | } | |
|
513 | ||
|
514 | let p1_entry = match &mut p1_copies { | |
|
515 | None => None, | |
|
516 | Some(copies) => match copies.entry(deleted) { | |
|
517 | Entry::Occupied(e) => Some(e), | |
|
518 | Entry::Vacant(_) => None, | |
|
519 | }, | |
|
520 | }; | |
|
521 | let p2_entry = match &mut p2_copies { | |
|
522 | None => None, | |
|
523 | Some(copies) => match copies.entry(deleted) { | |
|
524 | Entry::Occupied(e) => Some(e), | |
|
525 | Entry::Vacant(_) => None, | |
|
526 | }, | |
|
520 | 527 | }; |
|
521 | match &mut p2_copies { | |
|
522 | None => (), | |
|
523 |
|
|
|
524 | copies.entry(deleted).and_modify(|old| { | |
|
525 |
|
|
|
526 | }); | |
|
528 | ||
|
529 | match (p1_entry, p2_entry) { | |
|
530 | (None, None) => (), | |
|
531 | (Some(mut e), None) => { | |
|
532 | e.get_mut().mark_delete(current_rev) | |
|
527 | 533 | } |
|
528 | }; | |
|
534 | (None, Some(mut e)) => { | |
|
535 | e.get_mut().mark_delete(current_rev) | |
|
536 | } | |
|
537 | (Some(mut e1), Some(mut e2)) => { | |
|
538 | e1.get_mut().mark_delete(current_rev); | |
|
539 | e2.get_mut().mark_delete(current_rev); | |
|
540 | } | |
|
541 | } | |
|
529 | 542 | } |
|
530 | 543 | } |
|
531 | 544 | } |
General Comments 0
You need to be logged in to leave comments.
Login now