rust/hg-core/src/copy_tracing.rs
changeset 46152 e166e8a035a7
parent 46151 c6bc77f7e593
child 46153 0a721fc457bf
equal deleted inserted replaced
46151:c6bc77f7e593 46152:e166e8a035a7
   521                 //
   521                 //
   522                 // We need to explicitly record them as dropped to
   522                 // We need to explicitly record them as dropped to
   523                 // propagate this information when merging two
   523                 // propagate this information when merging two
   524                 // TimeStampedPathCopies object.
   524                 // TimeStampedPathCopies object.
   525                 let deleted = path_map.tokenize(deleted_path);
   525                 let deleted = path_map.tokenize(deleted_path);
   526                 if copies.contains_key(&deleted) {
   526                 copies.entry(deleted).and_modify(|old| {
   527                     let ttpc = TimeStampedPathCopy {
   527                     old.rev = current_rev;
   528                         rev: current_rev,
   528                     old.path = None;
   529                         path: None,
   529                 });
   530                     };
       
   531                     copies.insert(deleted, ttpc);
       
   532                 }
       
   533             }
   530             }
   534         }
   531         }
   535     }
   532     }
   536     copies
   533     copies
   537 }
   534 }