Mercurial > public > mercurial-scm > hg-stable
annotate rust/hg-core/src/operations/dirstate_status.rs @ 45877:5c736ba5dc27
rust-status: don't bubble up os errors, translate them to bad matches
In the rare cases when either the OS/filesystem throws an error on an otherwise
valid action, or because a path is not representable on the filesystem, or
because of concurrent actions in the filesystem, we want to warn the user about
said path instead of bubbling up the error, causing an exception to be raised
in the Python layer.
Differential Revision: https://phab.mercurial-scm.org/D9320
author | Rapha?l Gom?s <rgomes@octobus.net> |
---|---|
date | Mon, 16 Nov 2020 16:38:57 +0100 |
parents | 496537c9c1b4 |
children | fd47483f1645 |
rev | line source |
---|---|
45113
98817e5daca7
hg-core: define a `dirstate_status` `Operation`
Rapha?l Gom?s <rgomes@octobus.net>
parents:
diff
changeset
|
1 // dirstate_status.rs |
98817e5daca7
hg-core: define a `dirstate_status` `Operation`
Rapha?l Gom?s <rgomes@octobus.net>
parents:
diff
changeset
|
2 // |
98817e5daca7
hg-core: define a `dirstate_status` `Operation`
Rapha?l Gom?s <rgomes@octobus.net>
parents:
diff
changeset
|
3 // Copyright 2019, Raphaël Gomès <rgomes@octobus.net> |
98817e5daca7
hg-core: define a `dirstate_status` `Operation`
Rapha?l Gom?s <rgomes@octobus.net>
parents:
diff
changeset
|
4 // |
98817e5daca7
hg-core: define a `dirstate_status` `Operation`
Rapha?l Gom?s <rgomes@octobus.net>
parents:
diff
changeset
|
5 // This software may be used and distributed according to the terms of the |
98817e5daca7
hg-core: define a `dirstate_status` `Operation`
Rapha?l Gom?s <rgomes@octobus.net>
parents:
diff
changeset
|
6 // GNU General Public License version 2 or any later version. |
98817e5daca7
hg-core: define a `dirstate_status` `Operation`
Rapha?l Gom?s <rgomes@octobus.net>
parents:
diff
changeset
|
7 |
98817e5daca7
hg-core: define a `dirstate_status` `Operation`
Rapha?l Gom?s <rgomes@octobus.net>
parents:
diff
changeset
|
8 use crate::dirstate::status::{build_response, Dispatch, HgPathCow, Status}; |
98817e5daca7
hg-core: define a `dirstate_status` `Operation`
Rapha?l Gom?s <rgomes@octobus.net>
parents:
diff
changeset
|
9 use crate::matchers::Matcher; |
98817e5daca7
hg-core: define a `dirstate_status` `Operation`
Rapha?l Gom?s <rgomes@octobus.net>
parents:
diff
changeset
|
10 use crate::{DirstateStatus, StatusError}; |
98817e5daca7
hg-core: define a `dirstate_status` `Operation`
Rapha?l Gom?s <rgomes@octobus.net>
parents:
diff
changeset
|
11 |
98817e5daca7
hg-core: define a `dirstate_status` `Operation`
Rapha?l Gom?s <rgomes@octobus.net>
parents:
diff
changeset
|
12 /// A tuple of the paths that need to be checked in the filelog because it's |
98817e5daca7
hg-core: define a `dirstate_status` `Operation`
Rapha?l Gom?s <rgomes@octobus.net>
parents:
diff
changeset
|
13 /// ambiguous whether they've changed, and the rest of the already dispatched |
98817e5daca7
hg-core: define a `dirstate_status` `Operation`
Rapha?l Gom?s <rgomes@octobus.net>
parents:
diff
changeset
|
14 /// files. |
98817e5daca7
hg-core: define a `dirstate_status` `Operation`
Rapha?l Gom?s <rgomes@octobus.net>
parents:
diff
changeset
|
15 pub type LookupAndStatus<'a> = (Vec<HgPathCow<'a>>, DirstateStatus<'a>); |
98817e5daca7
hg-core: define a `dirstate_status` `Operation`
Rapha?l Gom?s <rgomes@octobus.net>
parents:
diff
changeset
|
16 |
45613
496537c9c1b4
rust: start plugging the dirstate tree behind a feature gate
Rapha?l Gom?s <rgomes@octobus.net>
parents:
45378
diff
changeset
|
17 #[cfg(feature = "dirstate-tree")] |
496537c9c1b4
rust: start plugging the dirstate tree behind a feature gate
Rapha?l Gom?s <rgomes@octobus.net>
parents:
45378
diff
changeset
|
18 impl<'a, M: Matcher + Sync> Status<'a, M> { |
496537c9c1b4
rust: start plugging the dirstate tree behind a feature gate
Rapha?l Gom?s <rgomes@octobus.net>
parents:
45378
diff
changeset
|
19 pub(crate) fn run(&self) -> Result<LookupAndStatus<'a>, StatusError> { |
496537c9c1b4
rust: start plugging the dirstate tree behind a feature gate
Rapha?l Gom?s <rgomes@octobus.net>
parents:
45378
diff
changeset
|
20 let (traversed_sender, traversed_receiver) = |
496537c9c1b4
rust: start plugging the dirstate tree behind a feature gate
Rapha?l Gom?s <rgomes@octobus.net>
parents:
45378
diff
changeset
|
21 crossbeam::channel::unbounded(); |
496537c9c1b4
rust: start plugging the dirstate tree behind a feature gate
Rapha?l Gom?s <rgomes@octobus.net>
parents:
45378
diff
changeset
|
22 |
496537c9c1b4
rust: start plugging the dirstate tree behind a feature gate
Rapha?l Gom?s <rgomes@octobus.net>
parents:
45378
diff
changeset
|
23 // Step 1: check the files explicitly mentioned by the user |
496537c9c1b4
rust: start plugging the dirstate tree behind a feature gate
Rapha?l Gom?s <rgomes@octobus.net>
parents:
45378
diff
changeset
|
24 let (work, mut results) = self.walk_explicit(traversed_sender.clone()); |
496537c9c1b4
rust: start plugging the dirstate tree behind a feature gate
Rapha?l Gom?s <rgomes@octobus.net>
parents:
45378
diff
changeset
|
25 |
496537c9c1b4
rust: start plugging the dirstate tree behind a feature gate
Rapha?l Gom?s <rgomes@octobus.net>
parents:
45378
diff
changeset
|
26 // Step 2: Check files in the dirstate |
496537c9c1b4
rust: start plugging the dirstate tree behind a feature gate
Rapha?l Gom?s <rgomes@octobus.net>
parents:
45378
diff
changeset
|
27 if !self.matcher.is_exact() { |
496537c9c1b4
rust: start plugging the dirstate tree behind a feature gate
Rapha?l Gom?s <rgomes@octobus.net>
parents:
45378
diff
changeset
|
28 self.extend_from_dmap(&mut results); |
496537c9c1b4
rust: start plugging the dirstate tree behind a feature gate
Rapha?l Gom?s <rgomes@octobus.net>
parents:
45378
diff
changeset
|
29 } |
496537c9c1b4
rust: start plugging the dirstate tree behind a feature gate
Rapha?l Gom?s <rgomes@octobus.net>
parents:
45378
diff
changeset
|
30 // Step 3: Check the working directory if listing unknowns |
496537c9c1b4
rust: start plugging the dirstate tree behind a feature gate
Rapha?l Gom?s <rgomes@octobus.net>
parents:
45378
diff
changeset
|
31 if !work.is_empty() { |
496537c9c1b4
rust: start plugging the dirstate tree behind a feature gate
Rapha?l Gom?s <rgomes@octobus.net>
parents:
45378
diff
changeset
|
32 // Hashmaps are quite a bit slower to build than vecs, so only |
496537c9c1b4
rust: start plugging the dirstate tree behind a feature gate
Rapha?l Gom?s <rgomes@octobus.net>
parents:
45378
diff
changeset
|
33 // build it if needed. |
496537c9c1b4
rust: start plugging the dirstate tree behind a feature gate
Rapha?l Gom?s <rgomes@octobus.net>
parents:
45378
diff
changeset
|
34 let mut old_results = None; |
496537c9c1b4
rust: start plugging the dirstate tree behind a feature gate
Rapha?l Gom?s <rgomes@octobus.net>
parents:
45378
diff
changeset
|
35 |
496537c9c1b4
rust: start plugging the dirstate tree behind a feature gate
Rapha?l Gom?s <rgomes@octobus.net>
parents:
45378
diff
changeset
|
36 // Step 2: recursively check the working directory for changes if |
496537c9c1b4
rust: start plugging the dirstate tree behind a feature gate
Rapha?l Gom?s <rgomes@octobus.net>
parents:
45378
diff
changeset
|
37 // needed |
496537c9c1b4
rust: start plugging the dirstate tree behind a feature gate
Rapha?l Gom?s <rgomes@octobus.net>
parents:
45378
diff
changeset
|
38 for (dir, dispatch) in work { |
496537c9c1b4
rust: start plugging the dirstate tree behind a feature gate
Rapha?l Gom?s <rgomes@octobus.net>
parents:
45378
diff
changeset
|
39 match dispatch { |
496537c9c1b4
rust: start plugging the dirstate tree behind a feature gate
Rapha?l Gom?s <rgomes@octobus.net>
parents:
45378
diff
changeset
|
40 Dispatch::Directory { was_file } => { |
496537c9c1b4
rust: start plugging the dirstate tree behind a feature gate
Rapha?l Gom?s <rgomes@octobus.net>
parents:
45378
diff
changeset
|
41 if was_file { |
496537c9c1b4
rust: start plugging the dirstate tree behind a feature gate
Rapha?l Gom?s <rgomes@octobus.net>
parents:
45378
diff
changeset
|
42 results.push((dir.to_owned(), Dispatch::Removed)); |
496537c9c1b4
rust: start plugging the dirstate tree behind a feature gate
Rapha?l Gom?s <rgomes@octobus.net>
parents:
45378
diff
changeset
|
43 } |
496537c9c1b4
rust: start plugging the dirstate tree behind a feature gate
Rapha?l Gom?s <rgomes@octobus.net>
parents:
45378
diff
changeset
|
44 if self.options.list_ignored |
496537c9c1b4
rust: start plugging the dirstate tree behind a feature gate
Rapha?l Gom?s <rgomes@octobus.net>
parents:
45378
diff
changeset
|
45 || self.options.list_unknown |
496537c9c1b4
rust: start plugging the dirstate tree behind a feature gate
Rapha?l Gom?s <rgomes@octobus.net>
parents:
45378
diff
changeset
|
46 && !self.dir_ignore(&dir) |
496537c9c1b4
rust: start plugging the dirstate tree behind a feature gate
Rapha?l Gom?s <rgomes@octobus.net>
parents:
45378
diff
changeset
|
47 { |
496537c9c1b4
rust: start plugging the dirstate tree behind a feature gate
Rapha?l Gom?s <rgomes@octobus.net>
parents:
45378
diff
changeset
|
48 if old_results.is_none() { |
496537c9c1b4
rust: start plugging the dirstate tree behind a feature gate
Rapha?l Gom?s <rgomes@octobus.net>
parents:
45378
diff
changeset
|
49 old_results = |
496537c9c1b4
rust: start plugging the dirstate tree behind a feature gate
Rapha?l Gom?s <rgomes@octobus.net>
parents:
45378
diff
changeset
|
50 Some(results.iter().cloned().collect()); |
496537c9c1b4
rust: start plugging the dirstate tree behind a feature gate
Rapha?l Gom?s <rgomes@octobus.net>
parents:
45378
diff
changeset
|
51 } |
496537c9c1b4
rust: start plugging the dirstate tree behind a feature gate
Rapha?l Gom?s <rgomes@octobus.net>
parents:
45378
diff
changeset
|
52 self.traverse( |
496537c9c1b4
rust: start plugging the dirstate tree behind a feature gate
Rapha?l Gom?s <rgomes@octobus.net>
parents:
45378
diff
changeset
|
53 &dir, |
496537c9c1b4
rust: start plugging the dirstate tree behind a feature gate
Rapha?l Gom?s <rgomes@octobus.net>
parents:
45378
diff
changeset
|
54 old_results |
496537c9c1b4
rust: start plugging the dirstate tree behind a feature gate
Rapha?l Gom?s <rgomes@octobus.net>
parents:
45378
diff
changeset
|
55 .as_ref() |
496537c9c1b4
rust: start plugging the dirstate tree behind a feature gate
Rapha?l Gom?s <rgomes@octobus.net>
parents:
45378
diff
changeset
|
56 .expect("old results should exist"), |
496537c9c1b4
rust: start plugging the dirstate tree behind a feature gate
Rapha?l Gom?s <rgomes@octobus.net>
parents:
45378
diff
changeset
|
57 &mut results, |
496537c9c1b4
rust: start plugging the dirstate tree behind a feature gate
Rapha?l Gom?s <rgomes@octobus.net>
parents:
45378
diff
changeset
|
58 traversed_sender.clone(), |
45877
5c736ba5dc27
rust-status: don't bubble up os errors, translate them to bad matches
Rapha?l Gom?s <rgomes@octobus.net>
parents:
45613
diff
changeset
|
59 ); |
45613
496537c9c1b4
rust: start plugging the dirstate tree behind a feature gate
Rapha?l Gom?s <rgomes@octobus.net>
parents:
45378
diff
changeset
|
60 } |
496537c9c1b4
rust: start plugging the dirstate tree behind a feature gate
Rapha?l Gom?s <rgomes@octobus.net>
parents:
45378
diff
changeset
|
61 } |
496537c9c1b4
rust: start plugging the dirstate tree behind a feature gate
Rapha?l Gom?s <rgomes@octobus.net>
parents:
45378
diff
changeset
|
62 _ => { |
496537c9c1b4
rust: start plugging the dirstate tree behind a feature gate
Rapha?l Gom?s <rgomes@octobus.net>
parents:
45378
diff
changeset
|
63 unreachable!("There can only be directories in `work`") |
496537c9c1b4
rust: start plugging the dirstate tree behind a feature gate
Rapha?l Gom?s <rgomes@octobus.net>
parents:
45378
diff
changeset
|
64 } |
496537c9c1b4
rust: start plugging the dirstate tree behind a feature gate
Rapha?l Gom?s <rgomes@octobus.net>
parents:
45378
diff
changeset
|
65 } |
496537c9c1b4
rust: start plugging the dirstate tree behind a feature gate
Rapha?l Gom?s <rgomes@octobus.net>
parents:
45378
diff
changeset
|
66 } |
496537c9c1b4
rust: start plugging the dirstate tree behind a feature gate
Rapha?l Gom?s <rgomes@octobus.net>
parents:
45378
diff
changeset
|
67 } |
496537c9c1b4
rust: start plugging the dirstate tree behind a feature gate
Rapha?l Gom?s <rgomes@octobus.net>
parents:
45378
diff
changeset
|
68 |
496537c9c1b4
rust: start plugging the dirstate tree behind a feature gate
Rapha?l Gom?s <rgomes@octobus.net>
parents:
45378
diff
changeset
|
69 drop(traversed_sender); |
496537c9c1b4
rust: start plugging the dirstate tree behind a feature gate
Rapha?l Gom?s <rgomes@octobus.net>
parents:
45378
diff
changeset
|
70 let traversed = traversed_receiver.into_iter().collect(); |
496537c9c1b4
rust: start plugging the dirstate tree behind a feature gate
Rapha?l Gom?s <rgomes@octobus.net>
parents:
45378
diff
changeset
|
71 |
496537c9c1b4
rust: start plugging the dirstate tree behind a feature gate
Rapha?l Gom?s <rgomes@octobus.net>
parents:
45378
diff
changeset
|
72 Ok(build_response(results, traversed)) |
496537c9c1b4
rust: start plugging the dirstate tree behind a feature gate
Rapha?l Gom?s <rgomes@octobus.net>
parents:
45378
diff
changeset
|
73 } |
496537c9c1b4
rust: start plugging the dirstate tree behind a feature gate
Rapha?l Gom?s <rgomes@octobus.net>
parents:
45378
diff
changeset
|
74 } |
496537c9c1b4
rust: start plugging the dirstate tree behind a feature gate
Rapha?l Gom?s <rgomes@octobus.net>
parents:
45378
diff
changeset
|
75 |
496537c9c1b4
rust: start plugging the dirstate tree behind a feature gate
Rapha?l Gom?s <rgomes@octobus.net>
parents:
45378
diff
changeset
|
76 #[cfg(not(feature = "dirstate-tree"))] |
45378
452ece5654c5
hg-core: remove the `Operation` trait
Antoine Cezar <antoine.cezar@octobus.net>
parents:
45113
diff
changeset
|
77 impl<'a, M: Matcher + Sync> Status<'a, M> { |
452ece5654c5
hg-core: remove the `Operation` trait
Antoine Cezar <antoine.cezar@octobus.net>
parents:
45113
diff
changeset
|
78 pub(crate) fn run(&self) -> Result<LookupAndStatus<'a>, StatusError> { |
45113
98817e5daca7
hg-core: define a `dirstate_status` `Operation`
Rapha?l Gom?s <rgomes@octobus.net>
parents:
diff
changeset
|
79 let (traversed_sender, traversed_receiver) = |
98817e5daca7
hg-core: define a `dirstate_status` `Operation`
Rapha?l Gom?s <rgomes@octobus.net>
parents:
diff
changeset
|
80 crossbeam::channel::unbounded(); |
98817e5daca7
hg-core: define a `dirstate_status` `Operation`
Rapha?l Gom?s <rgomes@octobus.net>
parents:
diff
changeset
|
81 |
98817e5daca7
hg-core: define a `dirstate_status` `Operation`
Rapha?l Gom?s <rgomes@octobus.net>
parents:
diff
changeset
|
82 // Step 1: check the files explicitly mentioned by the user |
98817e5daca7
hg-core: define a `dirstate_status` `Operation`
Rapha?l Gom?s <rgomes@octobus.net>
parents:
diff
changeset
|
83 let (work, mut results) = self.walk_explicit(traversed_sender.clone()); |
98817e5daca7
hg-core: define a `dirstate_status` `Operation`
Rapha?l Gom?s <rgomes@octobus.net>
parents:
diff
changeset
|
84 |
98817e5daca7
hg-core: define a `dirstate_status` `Operation`
Rapha?l Gom?s <rgomes@octobus.net>
parents:
diff
changeset
|
85 if !work.is_empty() { |
98817e5daca7
hg-core: define a `dirstate_status` `Operation`
Rapha?l Gom?s <rgomes@octobus.net>
parents:
diff
changeset
|
86 // Hashmaps are quite a bit slower to build than vecs, so only |
98817e5daca7
hg-core: define a `dirstate_status` `Operation`
Rapha?l Gom?s <rgomes@octobus.net>
parents:
diff
changeset
|
87 // build it if needed. |
98817e5daca7
hg-core: define a `dirstate_status` `Operation`
Rapha?l Gom?s <rgomes@octobus.net>
parents:
diff
changeset
|
88 let old_results = results.iter().cloned().collect(); |
98817e5daca7
hg-core: define a `dirstate_status` `Operation`
Rapha?l Gom?s <rgomes@octobus.net>
parents:
diff
changeset
|
89 |
98817e5daca7
hg-core: define a `dirstate_status` `Operation`
Rapha?l Gom?s <rgomes@octobus.net>
parents:
diff
changeset
|
90 // Step 2: recursively check the working directory for changes if |
98817e5daca7
hg-core: define a `dirstate_status` `Operation`
Rapha?l Gom?s <rgomes@octobus.net>
parents:
diff
changeset
|
91 // needed |
98817e5daca7
hg-core: define a `dirstate_status` `Operation`
Rapha?l Gom?s <rgomes@octobus.net>
parents:
diff
changeset
|
92 for (dir, dispatch) in work { |
98817e5daca7
hg-core: define a `dirstate_status` `Operation`
Rapha?l Gom?s <rgomes@octobus.net>
parents:
diff
changeset
|
93 match dispatch { |
98817e5daca7
hg-core: define a `dirstate_status` `Operation`
Rapha?l Gom?s <rgomes@octobus.net>
parents:
diff
changeset
|
94 Dispatch::Directory { was_file } => { |
98817e5daca7
hg-core: define a `dirstate_status` `Operation`
Rapha?l Gom?s <rgomes@octobus.net>
parents:
diff
changeset
|
95 if was_file { |
98817e5daca7
hg-core: define a `dirstate_status` `Operation`
Rapha?l Gom?s <rgomes@octobus.net>
parents:
diff
changeset
|
96 results.push((dir.to_owned(), Dispatch::Removed)); |
98817e5daca7
hg-core: define a `dirstate_status` `Operation`
Rapha?l Gom?s <rgomes@octobus.net>
parents:
diff
changeset
|
97 } |
98817e5daca7
hg-core: define a `dirstate_status` `Operation`
Rapha?l Gom?s <rgomes@octobus.net>
parents:
diff
changeset
|
98 if self.options.list_ignored |
98817e5daca7
hg-core: define a `dirstate_status` `Operation`
Rapha?l Gom?s <rgomes@octobus.net>
parents:
diff
changeset
|
99 || self.options.list_unknown |
98817e5daca7
hg-core: define a `dirstate_status` `Operation`
Rapha?l Gom?s <rgomes@octobus.net>
parents:
diff
changeset
|
100 && !self.dir_ignore(&dir) |
98817e5daca7
hg-core: define a `dirstate_status` `Operation`
Rapha?l Gom?s <rgomes@octobus.net>
parents:
diff
changeset
|
101 { |
98817e5daca7
hg-core: define a `dirstate_status` `Operation`
Rapha?l Gom?s <rgomes@octobus.net>
parents:
diff
changeset
|
102 self.traverse( |
98817e5daca7
hg-core: define a `dirstate_status` `Operation`
Rapha?l Gom?s <rgomes@octobus.net>
parents:
diff
changeset
|
103 &dir, |
98817e5daca7
hg-core: define a `dirstate_status` `Operation`
Rapha?l Gom?s <rgomes@octobus.net>
parents:
diff
changeset
|
104 &old_results, |
98817e5daca7
hg-core: define a `dirstate_status` `Operation`
Rapha?l Gom?s <rgomes@octobus.net>
parents:
diff
changeset
|
105 &mut results, |
98817e5daca7
hg-core: define a `dirstate_status` `Operation`
Rapha?l Gom?s <rgomes@octobus.net>
parents:
diff
changeset
|
106 traversed_sender.clone(), |
45877
5c736ba5dc27
rust-status: don't bubble up os errors, translate them to bad matches
Rapha?l Gom?s <rgomes@octobus.net>
parents:
45613
diff
changeset
|
107 ); |
45113
98817e5daca7
hg-core: define a `dirstate_status` `Operation`
Rapha?l Gom?s <rgomes@octobus.net>
parents:
diff
changeset
|
108 } |
98817e5daca7
hg-core: define a `dirstate_status` `Operation`
Rapha?l Gom?s <rgomes@octobus.net>
parents:
diff
changeset
|
109 } |
98817e5daca7
hg-core: define a `dirstate_status` `Operation`
Rapha?l Gom?s <rgomes@octobus.net>
parents:
diff
changeset
|
110 _ => { |
98817e5daca7
hg-core: define a `dirstate_status` `Operation`
Rapha?l Gom?s <rgomes@octobus.net>
parents:
diff
changeset
|
111 unreachable!("There can only be directories in `work`") |
98817e5daca7
hg-core: define a `dirstate_status` `Operation`
Rapha?l Gom?s <rgomes@octobus.net>
parents:
diff
changeset
|
112 } |
98817e5daca7
hg-core: define a `dirstate_status` `Operation`
Rapha?l Gom?s <rgomes@octobus.net>
parents:
diff
changeset
|
113 } |
98817e5daca7
hg-core: define a `dirstate_status` `Operation`
Rapha?l Gom?s <rgomes@octobus.net>
parents:
diff
changeset
|
114 } |
98817e5daca7
hg-core: define a `dirstate_status` `Operation`
Rapha?l Gom?s <rgomes@octobus.net>
parents:
diff
changeset
|
115 } |
98817e5daca7
hg-core: define a `dirstate_status` `Operation`
Rapha?l Gom?s <rgomes@octobus.net>
parents:
diff
changeset
|
116 |
98817e5daca7
hg-core: define a `dirstate_status` `Operation`
Rapha?l Gom?s <rgomes@octobus.net>
parents:
diff
changeset
|
117 if !self.matcher.is_exact() { |
98817e5daca7
hg-core: define a `dirstate_status` `Operation`
Rapha?l Gom?s <rgomes@octobus.net>
parents:
diff
changeset
|
118 if self.options.list_unknown { |
45877
5c736ba5dc27
rust-status: don't bubble up os errors, translate them to bad matches
Rapha?l Gom?s <rgomes@octobus.net>
parents:
45613
diff
changeset
|
119 self.handle_unknowns(&mut results); |
45113
98817e5daca7
hg-core: define a `dirstate_status` `Operation`
Rapha?l Gom?s <rgomes@octobus.net>
parents:
diff
changeset
|
120 } else { |
98817e5daca7
hg-core: define a `dirstate_status` `Operation`
Rapha?l Gom?s <rgomes@octobus.net>
parents:
diff
changeset
|
121 // TODO this is incorrect, see issue6335 |
98817e5daca7
hg-core: define a `dirstate_status` `Operation`
Rapha?l Gom?s <rgomes@octobus.net>
parents:
diff
changeset
|
122 // This requires a fix in both Python and Rust that can happen |
98817e5daca7
hg-core: define a `dirstate_status` `Operation`
Rapha?l Gom?s <rgomes@octobus.net>
parents:
diff
changeset
|
123 // with other pending changes to `status`. |
98817e5daca7
hg-core: define a `dirstate_status` `Operation`
Rapha?l Gom?s <rgomes@octobus.net>
parents:
diff
changeset
|
124 self.extend_from_dmap(&mut results); |
98817e5daca7
hg-core: define a `dirstate_status` `Operation`
Rapha?l Gom?s <rgomes@octobus.net>
parents:
diff
changeset
|
125 } |
98817e5daca7
hg-core: define a `dirstate_status` `Operation`
Rapha?l Gom?s <rgomes@octobus.net>
parents:
diff
changeset
|
126 } |
98817e5daca7
hg-core: define a `dirstate_status` `Operation`
Rapha?l Gom?s <rgomes@octobus.net>
parents:
diff
changeset
|
127 |
98817e5daca7
hg-core: define a `dirstate_status` `Operation`
Rapha?l Gom?s <rgomes@octobus.net>
parents:
diff
changeset
|
128 drop(traversed_sender); |
98817e5daca7
hg-core: define a `dirstate_status` `Operation`
Rapha?l Gom?s <rgomes@octobus.net>
parents:
diff
changeset
|
129 let traversed = traversed_receiver.into_iter().collect(); |
98817e5daca7
hg-core: define a `dirstate_status` `Operation`
Rapha?l Gom?s <rgomes@octobus.net>
parents:
diff
changeset
|
130 |
98817e5daca7
hg-core: define a `dirstate_status` `Operation`
Rapha?l Gom?s <rgomes@octobus.net>
parents:
diff
changeset
|
131 Ok(build_response(results, traversed)) |
98817e5daca7
hg-core: define a `dirstate_status` `Operation`
Rapha?l Gom?s <rgomes@octobus.net>
parents:
diff
changeset
|
132 } |
98817e5daca7
hg-core: define a `dirstate_status` `Operation`
Rapha?l Gom?s <rgomes@octobus.net>
parents:
diff
changeset
|
133 } |