##// END OF EJS Templates
dirstate-tree: Add clear_ambiguous_times in the new DirstateMap...
Simon Sapin -
r47875:ba17a2ee default
parent child Browse files
Show More
@@ -5,6 +5,7 b''
5 // This software may be used and distributed according to the terms of the
5 // This software may be used and distributed according to the terms of the
6 // GNU General Public License version 2 or any later version.
6 // GNU General Public License version 2 or any later version.
7
7
8 use crate::dirstate::parsers::clear_ambiguous_mtime;
8 use crate::dirstate::parsers::Timestamp;
9 use crate::dirstate::parsers::Timestamp;
9 use crate::errors::HgError;
10 use crate::errors::HgError;
10 use crate::revlog::node::NULL_NODE;
11 use crate::revlog::node::NULL_NODE;
@@ -188,21 +189,13 b' impl DirstateMap {'
188 now: i32,
189 now: i32,
189 ) {
190 ) {
190 for filename in filenames {
191 for filename in filenames {
191 let mut changed = false;
192 if let Some(entry) = self.state_map.get_mut(&filename) {
192 if let Some(entry) = self.state_map.get_mut(&filename) {
193 if entry.state == EntryState::Normal && entry.mtime == now {
193 if clear_ambiguous_mtime(entry, now) {
194 changed = true;
194 self.get_non_normal_other_parent_entries()
195 *entry = DirstateEntry {
195 .0
196 mtime: MTIME_UNSET,
196 .insert(filename.to_owned());
197 ..*entry
198 };
199 }
197 }
200 }
198 }
201 if changed {
202 self.get_non_normal_other_parent_entries()
203 .0
204 .insert(filename.to_owned());
205 }
206 }
199 }
207 }
200 }
208
201
@@ -287,12 +287,14 b' impl super::dispatch::DirstateMapMethods'
287 todo!()
287 todo!()
288 }
288 }
289
289
290 fn clear_ambiguous_times(
290 fn clear_ambiguous_times(&mut self, filenames: Vec<HgPathBuf>, now: i32) {
291 &mut self,
291 for filename in filenames {
292 _filenames: Vec<HgPathBuf>,
292 if let Some(node) = Self::get_node_mut(&mut self.root, &filename) {
293 _now: i32,
293 if let Some(entry) = node.entry.as_mut() {
294 ) {
294 clear_ambiguous_mtime(entry, now);
295 todo!()
295 }
296 }
297 }
296 }
298 }
297
299
298 fn non_normal_entries_contains(&mut self, _key: &HgPath) -> bool {
300 fn non_normal_entries_contains(&mut self, _key: &HgPath) -> bool {
General Comments 0
You need to be logged in to leave comments. Login now