[Updated] D9642: copies-rust: rename TimeStampedPathCopy to CopySource

marmoute (Pierre-Yves David) phabricator at mercurial-scm.org
Wed Feb 24 16:01:27 UTC 2021


Closed by commit rHGe6c25ddbb3c9: copies-rust: rename TimeStampedPathCopy to CopySource (authored by marmoute).
This revision was automatically updated to reflect the committed changes.

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D9642?vs=25780&id=25844

CHANGES SINCE LAST ACTION
  https://phab.mercurial-scm.org/D9642/new/

REVISION DETAIL
  https://phab.mercurial-scm.org/D9642

AFFECTED FILES
  rust/hg-core/src/copy_tracing.rs

CHANGE DETAILS

diff --git a/rust/hg-core/src/copy_tracing.rs b/rust/hg-core/src/copy_tracing.rs
--- a/rust/hg-core/src/copy_tracing.rs
+++ b/rust/hg-core/src/copy_tracing.rs
@@ -16,7 +16,7 @@
 type PathToken = usize;
 
 #[derive(Clone, Debug, PartialEq, Copy)]
-struct TimeStampedPathCopy {
+struct CopySource {
     /// revision at which the copy information was added
     rev: Revision,
     /// the copy source, (Set to None in case of deletion of the associated
@@ -25,7 +25,7 @@
 }
 
 /// maps CopyDestination to Copy Source (+ a "timestamp" for the operation)
-type InternalPathCopies = OrdMap<PathToken, TimeStampedPathCopy>;
+type InternalPathCopies = OrdMap<PathToken, CopySource>;
 
 /// hold parent 1, parent 2 and relevant files actions.
 pub type RevInfo<'a> = (Revision, Revision, ChangedFiles<'a>);
@@ -521,7 +521,7 @@
                 // information. See merge_copies_dict for details.
                 match copies.entry(dest) {
                     Entry::Vacant(slot) => {
-                        let ttpc = TimeStampedPathCopy {
+                        let ttpc = CopySource {
                             rev: current_rev,
                             path: entry,
                         };
@@ -570,8 +570,8 @@
     // code is more settled.
     let cmp_value = |oracle: &mut AncestorOracle<A>,
                      dest: &PathToken,
-                     src_minor: &TimeStampedPathCopy,
-                     src_major: &TimeStampedPathCopy| {
+                     src_minor: &CopySource,
+                     src_major: &CopySource| {
         compare_value(
             path_map,
             current_merge,
@@ -619,7 +619,7 @@
                             MergePick::Minor => src_minor.path,
                             MergePick::Any => src_major.path,
                         };
-                        let src = TimeStampedPathCopy {
+                        let src = CopySource {
                             rev: current_merge,
                             path,
                         };
@@ -654,7 +654,7 @@
                             MergePick::Minor => src_major.path,
                             MergePick::Any => src_major.path,
                         };
-                        let src = TimeStampedPathCopy {
+                        let src = CopySource {
                             rev: current_merge,
                             path,
                         };
@@ -673,10 +673,10 @@
         let mut override_minor = Vec::new();
         let mut override_major = Vec::new();
 
-        let mut to_major = |k: &PathToken, v: &TimeStampedPathCopy| {
+        let mut to_major = |k: &PathToken, v: &CopySource| {
             override_major.push((k.clone(), v.clone()))
         };
-        let mut to_minor = |k: &PathToken, v: &TimeStampedPathCopy| {
+        let mut to_minor = |k: &PathToken, v: &CopySource| {
             override_minor.push((k.clone(), v.clone()))
         };
 
@@ -713,7 +713,7 @@
                             // anything (but diff should not have yield them)
                             MergePick::Any => src_major.path,
                         };
-                        let src = TimeStampedPathCopy {
+                        let src = CopySource {
                             rev: current_merge,
                             path,
                         };
@@ -773,8 +773,8 @@
     changes: &ChangedFiles,
     oracle: &mut AncestorOracle<A>,
     dest: &PathToken,
-    src_minor: &TimeStampedPathCopy,
-    src_major: &TimeStampedPathCopy,
+    src_minor: &CopySource,
+    src_major: &CopySource,
 ) -> (MergePick, bool) {
     if src_major.rev == current_merge {
         if src_minor.rev == current_merge {



To: marmoute, #hg-reviewers, pulkit, Alphare
Cc: mercurial-patches
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mercurial-scm.org/pipermail/mercurial-patches/attachments/20210224/8df0b2ba/attachment-0001.html>


More information about the Mercurial-patches mailing list