Show More
@@ -397,59 +397,60 b' pub fn combine_changeset_copies<D>(' | |||
|
397 | 397 | // the individual copies information the curent revision. Creating a |
|
398 | 398 | // new TimeStampedPath for each `rev` → `children` vertex. |
|
399 | 399 | let mut copies: Option<InternalPathCopies> = None; |
|
400 | if p1 != NULL_REVISION { | |
|
401 | // Retrieve data computed in a previous iteration | |
|
402 | let parent_copies = get_and_clean_parent_copies( | |
|
400 | // Retrieve data computed in a previous iteration | |
|
401 | let p1_copies = match p1 { | |
|
402 | NULL_REVISION => None, | |
|
403 | _ => get_and_clean_parent_copies( | |
|
403 | 404 | &mut all_copies, |
|
404 | 405 | &mut children_count, |
|
405 | 406 | p1, |
|
406 | ); | |
|
407 | if let Some(parent_copies) = parent_copies { | |
|
408 | // combine it with data for that revision | |
|
409 | let vertex_copies = add_from_changes( | |
|
410 | &mut path_map, | |
|
411 | &parent_copies, | |
|
412 | &changes, | |
|
413 | Parent::FirstParent, | |
|
414 | rev, | |
|
415 | ); | |
|
416 | // keep that data around for potential later combination | |
|
417 | copies = Some(vertex_copies); | |
|
418 | } | |
|
419 | } | |
|
420 | if p2 != NULL_REVISION { | |
|
421 | // Retrieve data computed in a previous iteration | |
|
422 | let parent_copies = get_and_clean_parent_copies( | |
|
407 | ), // will be None if the vertex is not to be traversed | |
|
408 | }; | |
|
409 | let p2_copies = match p2 { | |
|
410 | NULL_REVISION => None, | |
|
411 | _ => get_and_clean_parent_copies( | |
|
423 | 412 | &mut all_copies, |
|
424 | 413 | &mut children_count, |
|
425 | 414 | p2, |
|
415 | ), // will be None if the vertex is not to be traversed | |
|
416 | }; | |
|
417 | if let Some(parent_copies) = p1_copies { | |
|
418 | // combine it with data for that revision | |
|
419 | let vertex_copies = add_from_changes( | |
|
420 | &mut path_map, | |
|
421 | &parent_copies, | |
|
422 | &changes, | |
|
423 | Parent::FirstParent, | |
|
424 | rev, | |
|
426 | 425 | ); |
|
427 | if let Some(parent_copies) = parent_copies { | |
|
428 | // combine it with data for that revision | |
|
429 | let vertex_copies = add_from_changes( | |
|
430 | &mut path_map, | |
|
431 | &parent_copies, | |
|
432 | &changes, | |
|
433 | Parent::SecondParent, | |
|
434 |
|
|
|
435 |
|
|
|
426 | // keep that data around for potential later combination | |
|
427 | copies = Some(vertex_copies); | |
|
428 | } | |
|
429 | if let Some(parent_copies) = p2_copies { | |
|
430 | // combine it with data for that revision | |
|
431 | let vertex_copies = add_from_changes( | |
|
432 | &mut path_map, | |
|
433 | &parent_copies, | |
|
434 | &changes, | |
|
435 | Parent::SecondParent, | |
|
436 | rev, | |
|
437 | ); | |
|
436 | 438 | |
|
437 |
|
|
|
438 |
|
|
|
439 |
|
|
|
440 |
|
|
|
441 |
|
|
|
442 |
|
|
|
443 |
|
|
|
444 |
|
|
|
445 |
|
|
|
446 |
|
|
|
447 |
|
|
|
448 |
|
|
|
449 |
|
|
|
450 |
|
|
|
451 |
|
|
|
452 | } | |
|
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 | )), | |
|
453 | }; | |
|
453 | 454 | } |
|
454 | 455 | match copies { |
|
455 | 456 | Some(copies) => { |
General Comments 0
You need to be logged in to leave comments.
Login now