Show More
@@ -433,16 +433,21 b" impl<'a, 'tree, 'on_disk> StatusCommon<'" | |||||
433 | return Ok(children_all_have_dirstate_node_or_are_ignored); |
|
433 | return Ok(children_all_have_dirstate_node_or_are_ignored); | |
434 | } |
|
434 | } | |
435 |
|
435 | |||
|
436 | let readdir_succeeded; | |||
436 | let mut fs_entries = if let Ok(entries) = self.read_dir( |
|
437 | let mut fs_entries = if let Ok(entries) = self.read_dir( | |
437 | directory_hg_path, |
|
438 | directory_hg_path, | |
438 | &directory_entry.fs_path, |
|
439 | &directory_entry.fs_path, | |
439 | is_at_repo_root, |
|
440 | is_at_repo_root, | |
440 | ) { |
|
441 | ) { | |
|
442 | readdir_succeeded = true; | |||
441 | entries |
|
443 | entries | |
442 | } else { |
|
444 | } else { | |
443 | // Treat an unreadable directory (typically because of insufficient |
|
445 | // Treat an unreadable directory (typically because of insufficient | |
444 | // permissions) like an empty directory. `self.read_dir` has |
|
446 | // permissions) like an empty directory. `self.read_dir` has | |
445 | // already called `self.io_error` so a warning will be emitted. |
|
447 | // already called `self.io_error` so a warning will be emitted. | |
|
448 | // We still need to remember that there was an error so that we | |||
|
449 | // know not to cache this result. | |||
|
450 | readdir_succeeded = false; | |||
446 | Vec::new() |
|
451 | Vec::new() | |
447 | }; |
|
452 | }; | |
448 |
|
453 | |||
@@ -495,6 +500,7 b" impl<'a, 'tree, 'on_disk> StatusCommon<'" | |||||
495 | Ok(has_dirstate_node_or_is_ignored) |
|
500 | Ok(has_dirstate_node_or_is_ignored) | |
496 | }) |
|
501 | }) | |
497 | .try_reduce(|| true, |a, b| Ok(a && b)) |
|
502 | .try_reduce(|| true, |a, b| Ok(a && b)) | |
|
503 | .map(|res| res && readdir_succeeded) | |||
498 | } |
|
504 | } | |
499 |
|
505 | |||
500 | fn traverse_fs_and_dirstate<'ancestor>( |
|
506 | fn traverse_fs_and_dirstate<'ancestor>( |
@@ -9,6 +9,7 b'' | |||||
9 | > EOF |
|
9 | > EOF | |
10 | #endif |
|
10 | #endif | |
11 |
|
11 | |||
|
12 | ||||
12 | The proliferation of status implementations can be confusing: |
|
13 | The proliferation of status implementations can be confusing: | |
13 | - The pure python implementation: |
|
14 | - The pure python implementation: | |
14 | (no-rhg pure !) |
|
15 | (no-rhg pure !) | |
@@ -31,20 +32,17 b' The proliferation of status implementati' | |||||
31 | ! d1/x (rhg !) |
|
32 | ! d1/x (rhg !) | |
32 | ! d1/x (no-rhg rust !) |
|
33 | ! d1/x (no-rhg rust !) | |
33 | $ hg status |
|
34 | $ hg status | |
34 |
d1: $EACCES$ (rhg |
|
35 | d1: $EACCES$ (rhg !) | |
35 |
d1: $EACCES$ (no-rhg rust |
|
36 | d1: $EACCES$ (no-rhg rust !) | |
36 | d1: $EACCES$ (no-rust no-rhg !) |
|
37 | d1: $EACCES$ (no-rust no-rhg !) | |
37 |
! d1/x (rust |
|
38 | ! d1/x (rust !) | |
38 |
! d1/x (no-rust rhg |
|
39 | ! d1/x (no-rust rhg !) | |
39 | $ chmod +r d1 |
|
40 | $ chmod +r d1 | |
40 | $ hg status |
|
41 | $ hg status | |
41 |
? d1/y (rhg |
|
42 | ? d1/y (rhg !) | |
42 |
? |
|
43 | ? d1/y (no-rhg rust !) | |
43 |
? |
|
44 | ? d1/y (no-rhg no-rust !) | |
44 |
|
45 | |||
45 | TODO: make the tests marked with (dirstate-v1) above work the same way |
|
|||
46 | with dirstate-v2 as well. |
|
|||
47 |
|
||||
48 | $ touch d1/z |
|
46 | $ touch d1/z | |
49 | $ hg status |
|
47 | $ hg status | |
50 | ? d1/y |
|
48 | ? d1/y |
General Comments 0
You need to be logged in to leave comments.
Login now