Show More
@@ -510,22 +510,35 b' fn chain_changes(' | |||||
510 | // propagate this information when merging two |
|
510 | // propagate this information when merging two | |
511 | // InternalPathCopies object. |
|
511 | // InternalPathCopies object. | |
512 | let deleted = path_map.tokenize(deleted_path); |
|
512 | let deleted = path_map.tokenize(deleted_path); | |
513 | match &mut p1_copies { |
|
513 | ||
514 | None => (), |
|
514 | let p1_entry = match &mut p1_copies { | |
515 |
|
|
515 | None => None, | |
516 |
|
|
516 | Some(copies) => match copies.entry(deleted) { | |
517 | old.mark_delete(current_rev); |
|
517 | Entry::Occupied(e) => Some(e), | |
518 |
|
|
518 | Entry::Vacant(_) => None, | |
519 | } |
|
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 { |
|
528 | ||
522 | None => (), |
|
529 | match (p1_entry, p2_entry) { | |
523 |
|
|
530 | (None, None) => (), | |
524 | copies.entry(deleted).and_modify(|old| { |
|
531 | (Some(mut e), None) => { | |
525 |
|
|
532 | e.get_mut().mark_delete(current_rev) | |
526 | }); |
|
|||
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