##// END OF EJS Templates
copies-rust: move the mapping merging into a else clause...
marmoute -
r46742:94300498 default
parent child Browse files
Show More
@@ -464,10 +464,10 b' fn merge_copies_dict<A: Fn(Revision, Rev'
464 oracle: &mut AncestorOracle<A>,
464 oracle: &mut AncestorOracle<A>,
465 ) -> TimeStampedPathCopies {
465 ) -> TimeStampedPathCopies {
466 if minor.is_empty() {
466 if minor.is_empty() {
467 return major;
467 major
468 } else if major.is_empty() {
468 } else if major.is_empty() {
469 return minor;
469 minor
470 }
470 } else {
471 let mut override_minor = Vec::new();
471 let mut override_minor = Vec::new();
472 let mut override_major = Vec::new();
472 let mut override_major = Vec::new();
473
473
@@ -478,9 +478,9 b' fn merge_copies_dict<A: Fn(Revision, Rev'
478 override_minor.push((k.clone(), v.clone()))
478 override_minor.push((k.clone(), v.clone()))
479 };
479 };
480
480
481 // The diff function leverage detection of the identical subpart if minor
481 // The diff function leverage detection of the identical subpart if
482 // and major has some common ancestors. This make it very fast is most
482 // minor and major has some common ancestors. This make it very
483 // case.
483 // fast is most case.
484 //
484 //
485 // In case where the two map are vastly different in size, the current
485 // In case where the two map are vastly different in size, the current
486 // approach is still slowish because the iteration will iterate over
486 // approach is still slowish because the iteration will iterate over
@@ -532,6 +532,7 b' fn merge_copies_dict<A: Fn(Revision, Rev'
532 }
532 }
533 result
533 result
534 }
534 }
535 }
535
536
536 /// represent the side that should prevail when merging two
537 /// represent the side that should prevail when merging two
537 /// TimeStampedPathCopies
538 /// TimeStampedPathCopies
General Comments 0
You need to be logged in to leave comments. Login now