Show More
@@ -414,49 +414,37 b' pub fn combine_changeset_copies<D>(' | |||
|
414 | 414 | p2, |
|
415 | 415 | ), // will be None if the vertex is not to be traversed |
|
416 | 416 | }; |
|
417 | if let Some(parent_copies) = p1_copies { | |
|
418 | // combine it with data for that revision | |
|
419 | let vertex_copies = add_from_changes( | |
|
417 | // combine it with data for that revision | |
|
418 | let p1_copies = match p1_copies { | |
|
419 | None => None, | |
|
420 | Some(parent_copies) => Some(add_from_changes( | |
|
420 | 421 | &mut path_map, |
|
421 | 422 | &parent_copies, |
|
422 | 423 | &changes, |
|
423 | 424 | Parent::FirstParent, |
|
424 | 425 | rev, |
|
425 |
) |
|
|
426 | // keep that data around for potential later combination | |
|
427 |
|
|
|
428 | } | |
|
429 |
|
|
|
430 | // combine it with data for that revision | |
|
431 | let vertex_copies = add_from_changes( | |
|
426 | )), | |
|
427 | }; | |
|
428 | let p2_copies = match p2_copies { | |
|
429 | None => None, | |
|
430 | Some(parent_copies) => Some(add_from_changes( | |
|
432 | 431 | &mut path_map, |
|
433 | 432 | &parent_copies, |
|
434 | 433 | &changes, |
|
435 | 434 | Parent::SecondParent, |
|
436 | 435 | rev, |
|
437 |
) |
|
|
438 | ||
|
439 |
|
|
|
440 |
|
|
|
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 |
|
|
|
446 | Some(copies) => Some(merge_copies_dict( | |
|
447 | &path_map, | |
|
448 | rev, | |
|
449 | vertex_copies, | |
|
450 | copies, | |
|
451 | &changes, | |
|
452 | )), | |
|
453 | }; | |
|
454 | } | |
|
455 | match copies { | |
|
456 | Some(copies) => { | |
|
457 | all_copies.insert(rev, copies); | |
|
458 | } | |
|
459 | _ => {} | |
|
436 | )), | |
|
437 | }; | |
|
438 | let copies = match (p1_copies, p2_copies) { | |
|
439 | (None, None) => None, | |
|
440 | (c, None) => c, | |
|
441 | (None, c) => c, | |
|
442 | (Some(p1_copies), Some(p2_copies)) => Some(merge_copies_dict( | |
|
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