rust/hg-core/src/dirstate_tree/status.rs
changeset 48044 f2a9db29cb2d
parent 47480 94e38822d395
child 48048 1b2ee68e85f9
equal deleted inserted replaced
48043:627cd8f33db0 48044:f2a9db29cb2d
   504             .entry()?
   504             .entry()?
   505             .expect("handle_normal_file called with entry-less node");
   505             .expect("handle_normal_file called with entry-less node");
   506         let hg_path = &dirstate_node.full_path_borrowed(self.dmap.on_disk)?;
   506         let hg_path = &dirstate_node.full_path_borrowed(self.dmap.on_disk)?;
   507         let mode_changed =
   507         let mode_changed =
   508             || self.options.check_exec && entry.mode_changed(fs_metadata);
   508             || self.options.check_exec && entry.mode_changed(fs_metadata);
   509         let size_changed = entry.size != truncate_u64(fs_metadata.len());
   509         let size = entry.size();
   510         if entry.size >= 0
   510         let size_changed = size != truncate_u64(fs_metadata.len());
   511             && size_changed
   511         if size >= 0 && size_changed && fs_metadata.file_type().is_symlink() {
   512             && fs_metadata.file_type().is_symlink()
       
   513         {
       
   514             // issue6456: Size returned may be longer due to encryption
   512             // issue6456: Size returned may be longer due to encryption
   515             // on EXT-4 fscrypt. TODO maybe only do it on EXT4?
   513             // on EXT-4 fscrypt. TODO maybe only do it on EXT4?
   516             self.outcome
   514             self.outcome
   517                 .lock()
   515                 .lock()
   518                 .unwrap()
   516                 .unwrap()
   519                 .unsure
   517                 .unsure
   520                 .push(hg_path.detach_from_tree())
   518                 .push(hg_path.detach_from_tree())
   521         } else if dirstate_node.has_copy_source()
   519         } else if dirstate_node.has_copy_source()
   522             || entry.is_from_other_parent()
   520             || entry.is_from_other_parent()
   523             || (entry.size >= 0 && (size_changed || mode_changed()))
   521             || (size >= 0 && (size_changed || mode_changed()))
   524         {
   522         {
   525             self.outcome
   523             self.outcome
   526                 .lock()
   524                 .lock()
   527                 .unwrap()
   525                 .unwrap()
   528                 .modified
   526                 .modified
   529                 .push(hg_path.detach_from_tree())
   527                 .push(hg_path.detach_from_tree())
   530         } else {
   528         } else {
   531             let mtime = mtime_seconds(fs_metadata);
   529             let mtime = mtime_seconds(fs_metadata);
   532             if truncate_i64(mtime) != entry.mtime
   530             if truncate_i64(mtime) != entry.mtime()
   533                 || mtime == self.options.last_normal_time
   531                 || mtime == self.options.last_normal_time
   534             {
   532             {
   535                 self.outcome
   533                 self.outcome
   536                     .lock()
   534                     .lock()
   537                     .unwrap()
   535                     .unwrap()