Show More
@@ -414,49 +414,37 b' pub fn combine_changeset_copies<D>(' | |||||
414 | p2, |
|
414 | p2, | |
415 | ), // will be None if the vertex is not to be traversed |
|
415 | ), // will be None if the vertex is not to be traversed | |
416 | }; |
|
416 | }; | |
417 | if let Some(parent_copies) = p1_copies { |
|
|||
418 |
|
|
417 | // combine it with data for that revision | |
419 |
|
|
418 | let p1_copies = match p1_copies { | |
|
419 | None => None, | |||
|
420 | Some(parent_copies) => Some(add_from_changes( | |||
420 | &mut path_map, |
|
421 | &mut path_map, | |
421 | &parent_copies, |
|
422 | &parent_copies, | |
422 | &changes, |
|
423 | &changes, | |
423 | Parent::FirstParent, |
|
424 | Parent::FirstParent, | |
424 | rev, |
|
425 | rev, | |
425 |
) |
|
426 | )), | |
426 | // keep that data around for potential later combination |
|
427 | }; | |
427 |
|
|
428 | let p2_copies = match p2_copies { | |
428 | } |
|
429 | None => None, | |
429 |
|
|
430 | Some(parent_copies) => Some(add_from_changes( | |
430 | // combine it with data for that revision |
|
|||
431 | let vertex_copies = add_from_changes( |
|
|||
432 | &mut path_map, |
|
431 | &mut path_map, | |
433 | &parent_copies, |
|
432 | &parent_copies, | |
434 | &changes, |
|
433 | &changes, | |
435 | Parent::SecondParent, |
|
434 | Parent::SecondParent, | |
436 | rev, |
|
435 | rev, | |
437 | ); |
|
|||
438 |
|
||||
439 | copies = match copies { |
|
|||
440 | None => Some(vertex_copies), |
|
|||
441 | // Merge has two parents needs to combines their copy |
|
|||
442 | // information. |
|
|||
443 | // |
|
|||
444 | // If we got data from both parents, We need to combine |
|
|||
445 | // them. |
|
|||
446 | Some(copies) => Some(merge_copies_dict( |
|
|||
447 | &path_map, |
|
|||
448 | rev, |
|
|||
449 | vertex_copies, |
|
|||
450 | copies, |
|
|||
451 | &changes, |
|
|||
452 |
|
|
436 | )), | |
453 |
|
|
437 | }; | |
454 | } |
|
438 | let copies = match (p1_copies, p2_copies) { | |
455 | match copies { |
|
439 | (None, None) => None, | |
456 |
|
|
440 | (c, None) => c, | |
457 | all_copies.insert(rev, copies); |
|
441 | (None, c) => c, | |
458 | } |
|
442 | (Some(p1_copies), Some(p2_copies)) => Some(merge_copies_dict( | |
459 | _ => {} |
|
443 | &path_map, rev, p2_copies, p1_copies, &changes, | |
|
444 | )), | |||
|
445 | }; | |||
|
446 | if let Some(c) = copies { | |||
|
447 | all_copies.insert(rev, c); | |||
460 | } |
|
448 | } | |
461 | } |
|
449 | } | |
462 |
|
450 |
General Comments 0
You need to be logged in to leave comments.
Login now