equal
deleted
inserted
replaced
115 let prefix = &parts[..=index].join(&b'/'); |
115 let prefix = &parts[..=index].join(&b'/'); |
116 let prefix = HgPath::new(prefix); |
116 let prefix = HgPath::new(prefix); |
117 if self.audited_dirs.read().unwrap().contains(prefix) { |
117 if self.audited_dirs.read().unwrap().contains(prefix) { |
118 continue; |
118 continue; |
119 } |
119 } |
120 self.check_filesystem(&prefix, &path)?; |
120 self.check_filesystem(prefix, path)?; |
121 self.audited_dirs.write().unwrap().insert(prefix.to_owned()); |
121 self.audited_dirs.write().unwrap().insert(prefix.to_owned()); |
122 } |
122 } |
123 |
123 |
124 self.audited.lock().unwrap().insert(path.to_owned()); |
124 self.audited.lock().unwrap().insert(path.to_owned()); |
125 |
125 |
201 path: path.to_owned(), |
201 path: path.to_owned(), |
202 nested_repo: HgPathBuf::from_bytes(b"this/is/nested") |
202 nested_repo: HgPathBuf::from_bytes(b"this/is/nested") |
203 }) |
203 }) |
204 ); |
204 ); |
205 |
205 |
206 create_dir(&base_dir_path.join("realdir")).unwrap(); |
206 create_dir(base_dir_path.join("realdir")).unwrap(); |
207 File::create(&base_dir_path.join("realdir/realfile")).unwrap(); |
207 File::create(base_dir_path.join("realdir/realfile")).unwrap(); |
208 // TODO make portable |
208 // TODO make portable |
209 std::os::unix::fs::symlink( |
209 std::os::unix::fs::symlink( |
210 &base_dir_path.join("realdir"), |
210 base_dir_path.join("realdir"), |
211 &base_dir_path.join("symlink"), |
211 base_dir_path.join("symlink"), |
212 ) |
212 ) |
213 .unwrap(); |
213 .unwrap(); |
214 let path = HgPath::new(b"symlink/realfile"); |
214 let path = HgPath::new(b"symlink/realfile"); |
215 assert_eq!( |
215 assert_eq!( |
216 auditor.audit_path(path), |
216 auditor.audit_path(path), |