Show More
This diff has been collapsed as it changes many lines, (595 lines changed) Show them Hide them | |||||
@@ -1,701 +1,482 | |||||
1 | # This file is automatically @generated by Cargo. |
|
1 | # This file is automatically @generated by Cargo. | |
2 | # It is not intended for manual editing. |
|
2 | # It is not intended for manual editing. | |
3 | [[package]] |
|
3 | [[package]] | |
4 | name = "arc-swap" |
|
4 | name = "arc-swap" | |
5 | version = "0.4.5" |
|
5 | version = "0.4.5" | |
6 | source = "registry+https://github.com/rust-lang/crates.io-index" |
|
6 | source = "registry+https://github.com/rust-lang/crates.io-index" | |
7 |
|
7 | |||
8 | [[package]] |
|
8 | [[package]] | |
9 |
name = "a |
|
9 | name = "async-trait" | |
10 |
version = " |
|
10 | version = "0.1.30" | |
11 | source = "registry+https://github.com/rust-lang/crates.io-index" |
|
11 | source = "registry+https://github.com/rust-lang/crates.io-index" | |
|
12 | dependencies = [ | |||
|
13 | "proc-macro2 1.0.10 (registry+https://github.com/rust-lang/crates.io-index)", | |||
|
14 | "quote 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)", | |||
|
15 | "syn 1.0.17 (registry+https://github.com/rust-lang/crates.io-index)", | |||
|
16 | ] | |||
12 |
|
17 | |||
13 | [[package]] |
|
18 | [[package]] | |
14 | name = "bitflags" |
|
19 | name = "bitflags" | |
15 | version = "1.2.1" |
|
20 | version = "1.2.1" | |
16 | source = "registry+https://github.com/rust-lang/crates.io-index" |
|
21 | source = "registry+https://github.com/rust-lang/crates.io-index" | |
17 |
|
22 | |||
18 | [[package]] |
|
23 | [[package]] | |
19 |
name = "byte |
|
24 | name = "bytes" | |
20 |
version = " |
|
25 | version = "0.5.4" | |
21 | source = "registry+https://github.com/rust-lang/crates.io-index" |
|
26 | source = "registry+https://github.com/rust-lang/crates.io-index" | |
22 |
|
27 | |||
23 | [[package]] |
|
28 | [[package]] | |
24 | name = "bytes" |
|
|||
25 | version = "0.4.12" |
|
|||
26 | source = "registry+https://github.com/rust-lang/crates.io-index" |
|
|||
27 | dependencies = [ |
|
|||
28 | "byteorder 1.3.4 (registry+https://github.com/rust-lang/crates.io-index)", |
|
|||
29 | "iovec 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", |
|
|||
30 | ] |
|
|||
31 |
|
||||
32 | [[package]] |
|
|||
33 | name = "cc" |
|
29 | name = "cc" | |
34 | version = "1.0.50" |
|
30 | version = "1.0.50" | |
35 | source = "registry+https://github.com/rust-lang/crates.io-index" |
|
31 | source = "registry+https://github.com/rust-lang/crates.io-index" | |
36 |
|
32 | |||
37 | [[package]] |
|
33 | [[package]] | |
38 | name = "cfg-if" |
|
34 | name = "cfg-if" | |
39 | version = "0.1.10" |
|
35 | version = "0.1.10" | |
40 | source = "registry+https://github.com/rust-lang/crates.io-index" |
|
36 | source = "registry+https://github.com/rust-lang/crates.io-index" | |
41 |
|
37 | |||
42 | [[package]] |
|
38 | [[package]] | |
43 | name = "chg" |
|
39 | name = "chg" | |
44 | version = "0.1.0" |
|
40 | version = "0.1.0" | |
45 | dependencies = [ |
|
41 | dependencies = [ | |
46 |
" |
|
42 | "async-trait 0.1.30 (registry+https://github.com/rust-lang/crates.io-index)", | |
|
43 | "bytes 0.5.4 (registry+https://github.com/rust-lang/crates.io-index)", | |||
47 | "cc 1.0.50 (registry+https://github.com/rust-lang/crates.io-index)", |
|
44 | "cc 1.0.50 (registry+https://github.com/rust-lang/crates.io-index)", | |
48 |
"futures 0. |
|
45 | "futures 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", | |
49 |
"libc 0.2.6 |
|
46 | "libc 0.2.69 (registry+https://github.com/rust-lang/crates.io-index)", | |
50 | "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", |
|
47 | "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", | |
51 |
"tokio 0. |
|
48 | "tokio 0.2.18 (registry+https://github.com/rust-lang/crates.io-index)", | |
52 |
"tokio-hglib 0. |
|
49 | "tokio-hglib 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", | |
53 | "tokio-process 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)", |
|
|||
54 | "tokio-timer 0.2.13 (registry+https://github.com/rust-lang/crates.io-index)", |
|
|||
55 | ] |
|
|||
56 |
|
||||
57 | [[package]] |
|
|||
58 | name = "cloudabi" |
|
|||
59 | version = "0.0.3" |
|
|||
60 | source = "registry+https://github.com/rust-lang/crates.io-index" |
|
|||
61 | dependencies = [ |
|
|||
62 | "bitflags 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)", |
|
|||
63 | ] |
|
|||
64 |
|
||||
65 | [[package]] |
|
|||
66 | name = "crossbeam-deque" |
|
|||
67 | version = "0.7.3" |
|
|||
68 | source = "registry+https://github.com/rust-lang/crates.io-index" |
|
|||
69 | dependencies = [ |
|
|||
70 | "crossbeam-epoch 0.8.2 (registry+https://github.com/rust-lang/crates.io-index)", |
|
|||
71 | "crossbeam-utils 0.7.2 (registry+https://github.com/rust-lang/crates.io-index)", |
|
|||
72 | "maybe-uninit 2.0.0 (registry+https://github.com/rust-lang/crates.io-index)", |
|
|||
73 | ] |
|
|||
74 |
|
||||
75 | [[package]] |
|
|||
76 | name = "crossbeam-epoch" |
|
|||
77 | version = "0.8.2" |
|
|||
78 | source = "registry+https://github.com/rust-lang/crates.io-index" |
|
|||
79 | dependencies = [ |
|
|||
80 | "autocfg 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", |
|
|||
81 | "cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", |
|
|||
82 | "crossbeam-utils 0.7.2 (registry+https://github.com/rust-lang/crates.io-index)", |
|
|||
83 | "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", |
|
|||
84 | "maybe-uninit 2.0.0 (registry+https://github.com/rust-lang/crates.io-index)", |
|
|||
85 | "memoffset 0.5.4 (registry+https://github.com/rust-lang/crates.io-index)", |
|
|||
86 | "scopeguard 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)", |
|
|||
87 | ] |
|
50 | ] | |
88 |
|
51 | |||
89 | [[package]] |
|
52 | [[package]] | |
90 | name = "crossbeam-queue" |
|
|||
91 | version = "0.1.2" |
|
|||
92 | source = "registry+https://github.com/rust-lang/crates.io-index" |
|
|||
93 | dependencies = [ |
|
|||
94 | "crossbeam-utils 0.6.6 (registry+https://github.com/rust-lang/crates.io-index)", |
|
|||
95 | ] |
|
|||
96 |
|
||||
97 | [[package]] |
|
|||
98 | name = "crossbeam-queue" |
|
|||
99 | version = "0.2.1" |
|
|||
100 | source = "registry+https://github.com/rust-lang/crates.io-index" |
|
|||
101 | dependencies = [ |
|
|||
102 | "cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", |
|
|||
103 | "crossbeam-utils 0.7.2 (registry+https://github.com/rust-lang/crates.io-index)", |
|
|||
104 | ] |
|
|||
105 |
|
||||
106 | [[package]] |
|
|||
107 | name = "crossbeam-utils" |
|
|||
108 | version = "0.6.6" |
|
|||
109 | source = "registry+https://github.com/rust-lang/crates.io-index" |
|
|||
110 | dependencies = [ |
|
|||
111 | "cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", |
|
|||
112 | "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", |
|
|||
113 | ] |
|
|||
114 |
|
||||
115 | [[package]] |
|
|||
116 | name = "crossbeam-utils" |
|
|||
117 | version = "0.7.2" |
|
|||
118 | source = "registry+https://github.com/rust-lang/crates.io-index" |
|
|||
119 | dependencies = [ |
|
|||
120 | "autocfg 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", |
|
|||
121 | "cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", |
|
|||
122 | "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", |
|
|||
123 | ] |
|
|||
124 |
|
||||
125 | [[package]] |
|
|||
126 | name = "fnv" |
|
|||
127 | version = "1.0.6" |
|
|||
128 | source = "registry+https://github.com/rust-lang/crates.io-index" |
|
|||
129 |
|
||||
130 | [[package]] |
|
|||
131 | name = "fuchsia-zircon" |
|
53 | name = "fuchsia-zircon" | |
132 | version = "0.3.3" |
|
54 | version = "0.3.3" | |
133 | source = "registry+https://github.com/rust-lang/crates.io-index" |
|
55 | source = "registry+https://github.com/rust-lang/crates.io-index" | |
134 | dependencies = [ |
|
56 | dependencies = [ | |
135 | "bitflags 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)", |
|
57 | "bitflags 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)", | |
136 | "fuchsia-zircon-sys 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", |
|
58 | "fuchsia-zircon-sys 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", | |
137 | ] |
|
59 | ] | |
138 |
|
60 | |||
139 | [[package]] |
|
61 | [[package]] | |
140 | name = "fuchsia-zircon-sys" |
|
62 | name = "fuchsia-zircon-sys" | |
141 | version = "0.3.3" |
|
63 | version = "0.3.3" | |
142 | source = "registry+https://github.com/rust-lang/crates.io-index" |
|
64 | source = "registry+https://github.com/rust-lang/crates.io-index" | |
143 |
|
65 | |||
144 | [[package]] |
|
66 | [[package]] | |
145 | name = "futures" |
|
67 | name = "futures" | |
146 |
version = "0. |
|
68 | version = "0.3.4" | |
|
69 | source = "registry+https://github.com/rust-lang/crates.io-index" | |||
|
70 | dependencies = [ | |||
|
71 | "futures-channel 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", | |||
|
72 | "futures-core 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", | |||
|
73 | "futures-executor 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", | |||
|
74 | "futures-io 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", | |||
|
75 | "futures-sink 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", | |||
|
76 | "futures-task 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", | |||
|
77 | "futures-util 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", | |||
|
78 | ] | |||
|
79 | ||||
|
80 | [[package]] | |||
|
81 | name = "futures-channel" | |||
|
82 | version = "0.3.4" | |||
|
83 | source = "registry+https://github.com/rust-lang/crates.io-index" | |||
|
84 | dependencies = [ | |||
|
85 | "futures-core 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", | |||
|
86 | "futures-sink 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", | |||
|
87 | ] | |||
|
88 | ||||
|
89 | [[package]] | |||
|
90 | name = "futures-core" | |||
|
91 | version = "0.3.4" | |||
147 | source = "registry+https://github.com/rust-lang/crates.io-index" |
|
92 | source = "registry+https://github.com/rust-lang/crates.io-index" | |
148 |
|
93 | |||
149 | [[package]] |
|
94 | [[package]] | |
150 | name = "hermit-abi" |
|
95 | name = "futures-executor" | |
151 |
version = "0. |
|
96 | version = "0.3.4" | |
|
97 | source = "registry+https://github.com/rust-lang/crates.io-index" | |||
|
98 | dependencies = [ | |||
|
99 | "futures-core 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", | |||
|
100 | "futures-task 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", | |||
|
101 | "futures-util 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", | |||
|
102 | ] | |||
|
103 | ||||
|
104 | [[package]] | |||
|
105 | name = "futures-io" | |||
|
106 | version = "0.3.4" | |||
|
107 | source = "registry+https://github.com/rust-lang/crates.io-index" | |||
|
108 | ||||
|
109 | [[package]] | |||
|
110 | name = "futures-macro" | |||
|
111 | version = "0.3.4" | |||
152 | source = "registry+https://github.com/rust-lang/crates.io-index" |
|
112 | source = "registry+https://github.com/rust-lang/crates.io-index" | |
153 | dependencies = [ |
|
113 | dependencies = [ | |
154 |
" |
|
114 | "proc-macro-hack 0.5.15 (registry+https://github.com/rust-lang/crates.io-index)", | |
|
115 | "proc-macro2 1.0.10 (registry+https://github.com/rust-lang/crates.io-index)", | |||
|
116 | "quote 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)", | |||
|
117 | "syn 1.0.17 (registry+https://github.com/rust-lang/crates.io-index)", | |||
|
118 | ] | |||
|
119 | ||||
|
120 | [[package]] | |||
|
121 | name = "futures-sink" | |||
|
122 | version = "0.3.4" | |||
|
123 | source = "registry+https://github.com/rust-lang/crates.io-index" | |||
|
124 | ||||
|
125 | [[package]] | |||
|
126 | name = "futures-task" | |||
|
127 | version = "0.3.4" | |||
|
128 | source = "registry+https://github.com/rust-lang/crates.io-index" | |||
|
129 | ||||
|
130 | [[package]] | |||
|
131 | name = "futures-util" | |||
|
132 | version = "0.3.4" | |||
|
133 | source = "registry+https://github.com/rust-lang/crates.io-index" | |||
|
134 | dependencies = [ | |||
|
135 | "futures-channel 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", | |||
|
136 | "futures-core 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", | |||
|
137 | "futures-io 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", | |||
|
138 | "futures-macro 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", | |||
|
139 | "futures-sink 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", | |||
|
140 | "futures-task 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", | |||
|
141 | "memchr 2.3.3 (registry+https://github.com/rust-lang/crates.io-index)", | |||
|
142 | "pin-utils 0.1.0-alpha.4 (registry+https://github.com/rust-lang/crates.io-index)", | |||
|
143 | "proc-macro-hack 0.5.15 (registry+https://github.com/rust-lang/crates.io-index)", | |||
|
144 | "proc-macro-nested 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", | |||
|
145 | "slab 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", | |||
155 | ] |
|
146 | ] | |
156 |
|
147 | |||
157 | [[package]] |
|
148 | [[package]] | |
158 | name = "iovec" |
|
149 | name = "iovec" | |
159 | version = "0.1.4" |
|
150 | version = "0.1.4" | |
160 | source = "registry+https://github.com/rust-lang/crates.io-index" |
|
151 | source = "registry+https://github.com/rust-lang/crates.io-index" | |
161 | dependencies = [ |
|
152 | dependencies = [ | |
162 |
"libc 0.2.6 |
|
153 | "libc 0.2.69 (registry+https://github.com/rust-lang/crates.io-index)", | |
163 | ] |
|
154 | ] | |
164 |
|
155 | |||
165 | [[package]] |
|
156 | [[package]] | |
166 | name = "kernel32-sys" |
|
157 | name = "kernel32-sys" | |
167 | version = "0.2.2" |
|
158 | version = "0.2.2" | |
168 | source = "registry+https://github.com/rust-lang/crates.io-index" |
|
159 | source = "registry+https://github.com/rust-lang/crates.io-index" | |
169 | dependencies = [ |
|
160 | dependencies = [ | |
170 | "winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", |
|
161 | "winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", | |
171 | "winapi-build 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", |
|
162 | "winapi-build 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", | |
172 | ] |
|
163 | ] | |
173 |
|
164 | |||
174 | [[package]] |
|
165 | [[package]] | |
175 | name = "lazy_static" |
|
166 | name = "lazy_static" | |
176 | version = "1.4.0" |
|
167 | version = "1.4.0" | |
177 | source = "registry+https://github.com/rust-lang/crates.io-index" |
|
168 | source = "registry+https://github.com/rust-lang/crates.io-index" | |
178 |
|
169 | |||
179 | [[package]] |
|
170 | [[package]] | |
180 | name = "libc" |
|
171 | name = "libc" | |
181 |
version = "0.2.6 |
|
172 | version = "0.2.69" | |
182 | source = "registry+https://github.com/rust-lang/crates.io-index" |
|
173 | source = "registry+https://github.com/rust-lang/crates.io-index" | |
183 |
|
174 | |||
184 | [[package]] |
|
175 | [[package]] | |
185 | name = "lock_api" |
|
|||
186 | version = "0.3.3" |
|
|||
187 | source = "registry+https://github.com/rust-lang/crates.io-index" |
|
|||
188 | dependencies = [ |
|
|||
189 | "scopeguard 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)", |
|
|||
190 | ] |
|
|||
191 |
|
||||
192 | [[package]] |
|
|||
193 | name = "log" |
|
176 | name = "log" | |
194 | version = "0.4.8" |
|
177 | version = "0.4.8" | |
195 | source = "registry+https://github.com/rust-lang/crates.io-index" |
|
178 | source = "registry+https://github.com/rust-lang/crates.io-index" | |
196 | dependencies = [ |
|
179 | dependencies = [ | |
197 | "cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", |
|
180 | "cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", | |
198 | ] |
|
181 | ] | |
199 |
|
182 | |||
200 | [[package]] |
|
183 | [[package]] | |
201 |
name = "m |
|
184 | name = "memchr" | |
202 |
version = "2. |
|
185 | version = "2.3.3" | |
203 | source = "registry+https://github.com/rust-lang/crates.io-index" |
|
186 | source = "registry+https://github.com/rust-lang/crates.io-index" | |
204 |
|
187 | |||
205 | [[package]] |
|
188 | [[package]] | |
206 | name = "memoffset" |
|
|||
207 | version = "0.5.4" |
|
|||
208 | source = "registry+https://github.com/rust-lang/crates.io-index" |
|
|||
209 | dependencies = [ |
|
|||
210 | "autocfg 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", |
|
|||
211 | ] |
|
|||
212 |
|
||||
213 | [[package]] |
|
|||
214 | name = "mio" |
|
189 | name = "mio" | |
215 | version = "0.6.21" |
|
190 | version = "0.6.21" | |
216 | source = "registry+https://github.com/rust-lang/crates.io-index" |
|
191 | source = "registry+https://github.com/rust-lang/crates.io-index" | |
217 | dependencies = [ |
|
192 | dependencies = [ | |
218 | "cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", |
|
193 | "cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", | |
219 | "fuchsia-zircon 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", |
|
194 | "fuchsia-zircon 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", | |
220 | "fuchsia-zircon-sys 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", |
|
195 | "fuchsia-zircon-sys 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", | |
221 | "iovec 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", |
|
196 | "iovec 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", | |
222 | "kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", |
|
197 | "kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", | |
223 |
"libc 0.2.6 |
|
198 | "libc 0.2.69 (registry+https://github.com/rust-lang/crates.io-index)", | |
224 | "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", |
|
199 | "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", | |
225 | "miow 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", |
|
200 | "miow 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", | |
226 | "net2 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)", |
|
201 | "net2 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)", | |
227 | "slab 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", |
|
202 | "slab 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", | |
228 | "winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", |
|
203 | "winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", | |
229 | ] |
|
204 | ] | |
230 |
|
205 | |||
231 | [[package]] |
|
206 | [[package]] | |
232 | name = "mio-named-pipes" |
|
207 | name = "mio-named-pipes" | |
233 | version = "0.1.6" |
|
208 | version = "0.1.6" | |
234 | source = "registry+https://github.com/rust-lang/crates.io-index" |
|
209 | source = "registry+https://github.com/rust-lang/crates.io-index" | |
235 | dependencies = [ |
|
210 | dependencies = [ | |
236 | "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", |
|
211 | "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", | |
237 | "mio 0.6.21 (registry+https://github.com/rust-lang/crates.io-index)", |
|
212 | "mio 0.6.21 (registry+https://github.com/rust-lang/crates.io-index)", | |
238 | "miow 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", |
|
213 | "miow 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", | |
239 | "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", |
|
214 | "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", | |
240 | ] |
|
215 | ] | |
241 |
|
216 | |||
242 | [[package]] |
|
217 | [[package]] | |
243 | name = "mio-uds" |
|
218 | name = "mio-uds" | |
244 | version = "0.6.7" |
|
219 | version = "0.6.7" | |
245 | source = "registry+https://github.com/rust-lang/crates.io-index" |
|
220 | source = "registry+https://github.com/rust-lang/crates.io-index" | |
246 | dependencies = [ |
|
221 | dependencies = [ | |
247 | "iovec 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", |
|
222 | "iovec 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", | |
248 |
"libc 0.2.6 |
|
223 | "libc 0.2.69 (registry+https://github.com/rust-lang/crates.io-index)", | |
249 | "mio 0.6.21 (registry+https://github.com/rust-lang/crates.io-index)", |
|
224 | "mio 0.6.21 (registry+https://github.com/rust-lang/crates.io-index)", | |
250 | ] |
|
225 | ] | |
251 |
|
226 | |||
252 | [[package]] |
|
227 | [[package]] | |
253 | name = "miow" |
|
228 | name = "miow" | |
254 | version = "0.2.1" |
|
229 | version = "0.2.1" | |
255 | source = "registry+https://github.com/rust-lang/crates.io-index" |
|
230 | source = "registry+https://github.com/rust-lang/crates.io-index" | |
256 | dependencies = [ |
|
231 | dependencies = [ | |
257 | "kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", |
|
232 | "kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", | |
258 | "net2 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)", |
|
233 | "net2 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)", | |
259 | "winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", |
|
234 | "winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", | |
260 | "ws2_32-sys 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", |
|
235 | "ws2_32-sys 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", | |
261 | ] |
|
236 | ] | |
262 |
|
237 | |||
263 | [[package]] |
|
238 | [[package]] | |
264 | name = "miow" |
|
239 | name = "miow" | |
265 | version = "0.3.3" |
|
240 | version = "0.3.3" | |
266 | source = "registry+https://github.com/rust-lang/crates.io-index" |
|
241 | source = "registry+https://github.com/rust-lang/crates.io-index" | |
267 | dependencies = [ |
|
242 | dependencies = [ | |
268 |
"socket2 0.3.1 |
|
243 | "socket2 0.3.12 (registry+https://github.com/rust-lang/crates.io-index)", | |
269 | "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", |
|
244 | "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", | |
270 | ] |
|
245 | ] | |
271 |
|
246 | |||
272 | [[package]] |
|
247 | [[package]] | |
273 | name = "net2" |
|
248 | name = "net2" | |
274 | version = "0.2.33" |
|
249 | version = "0.2.33" | |
275 | source = "registry+https://github.com/rust-lang/crates.io-index" |
|
250 | source = "registry+https://github.com/rust-lang/crates.io-index" | |
276 | dependencies = [ |
|
251 | dependencies = [ | |
277 | "cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", |
|
252 | "cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", | |
278 |
"libc 0.2.6 |
|
253 | "libc 0.2.69 (registry+https://github.com/rust-lang/crates.io-index)", | |
279 | "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", |
|
254 | "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", | |
280 | ] |
|
255 | ] | |
281 |
|
256 | |||
282 | [[package]] |
|
257 | [[package]] | |
283 | name = "num_cpus" |
|
258 | name = "pin-project-lite" | |
284 |
version = " |
|
259 | version = "0.1.4" | |
|
260 | source = "registry+https://github.com/rust-lang/crates.io-index" | |||
|
261 | ||||
|
262 | [[package]] | |||
|
263 | name = "pin-utils" | |||
|
264 | version = "0.1.0-alpha.4" | |||
|
265 | source = "registry+https://github.com/rust-lang/crates.io-index" | |||
|
266 | ||||
|
267 | [[package]] | |||
|
268 | name = "proc-macro-hack" | |||
|
269 | version = "0.5.15" | |||
|
270 | source = "registry+https://github.com/rust-lang/crates.io-index" | |||
|
271 | ||||
|
272 | [[package]] | |||
|
273 | name = "proc-macro-nested" | |||
|
274 | version = "0.1.4" | |||
|
275 | source = "registry+https://github.com/rust-lang/crates.io-index" | |||
|
276 | ||||
|
277 | [[package]] | |||
|
278 | name = "proc-macro2" | |||
|
279 | version = "1.0.10" | |||
285 | source = "registry+https://github.com/rust-lang/crates.io-index" |
|
280 | source = "registry+https://github.com/rust-lang/crates.io-index" | |
286 | dependencies = [ |
|
281 | dependencies = [ | |
287 |
" |
|
282 | "unicode-xid 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", | |
288 | "libc 0.2.68 (registry+https://github.com/rust-lang/crates.io-index)", |
|
|||
289 | ] |
|
283 | ] | |
290 |
|
284 | |||
291 | [[package]] |
|
285 | [[package]] | |
292 |
name = " |
|
286 | name = "quote" | |
293 |
version = " |
|
287 | version = "1.0.3" | |
294 | source = "registry+https://github.com/rust-lang/crates.io-index" |
|
288 | source = "registry+https://github.com/rust-lang/crates.io-index" | |
295 | dependencies = [ |
|
289 | dependencies = [ | |
296 |
" |
|
290 | "proc-macro2 1.0.10 (registry+https://github.com/rust-lang/crates.io-index)", | |
297 | "parking_lot_core 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)", |
|
|||
298 | "rustc_version 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", |
|
|||
299 | ] |
|
|||
300 |
|
||||
301 | [[package]] |
|
|||
302 | name = "parking_lot_core" |
|
|||
303 | version = "0.6.2" |
|
|||
304 | source = "registry+https://github.com/rust-lang/crates.io-index" |
|
|||
305 | dependencies = [ |
|
|||
306 | "cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", |
|
|||
307 | "cloudabi 0.0.3 (registry+https://github.com/rust-lang/crates.io-index)", |
|
|||
308 | "libc 0.2.68 (registry+https://github.com/rust-lang/crates.io-index)", |
|
|||
309 | "redox_syscall 0.1.56 (registry+https://github.com/rust-lang/crates.io-index)", |
|
|||
310 | "rustc_version 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", |
|
|||
311 | "smallvec 0.6.13 (registry+https://github.com/rust-lang/crates.io-index)", |
|
|||
312 | "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", |
|
|||
313 | ] |
|
291 | ] | |
314 |
|
292 | |||
315 | [[package]] |
|
293 | [[package]] | |
316 | name = "redox_syscall" |
|
294 | name = "redox_syscall" | |
317 | version = "0.1.56" |
|
295 | version = "0.1.56" | |
318 | source = "registry+https://github.com/rust-lang/crates.io-index" |
|
296 | source = "registry+https://github.com/rust-lang/crates.io-index" | |
319 |
|
297 | |||
320 | [[package]] |
|
298 | [[package]] | |
321 | name = "rustc_version" |
|
|||
322 | version = "0.2.3" |
|
|||
323 | source = "registry+https://github.com/rust-lang/crates.io-index" |
|
|||
324 | dependencies = [ |
|
|||
325 | "semver 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)", |
|
|||
326 | ] |
|
|||
327 |
|
||||
328 | [[package]] |
|
|||
329 | name = "scopeguard" |
|
|||
330 | version = "1.1.0" |
|
|||
331 | source = "registry+https://github.com/rust-lang/crates.io-index" |
|
|||
332 |
|
||||
333 | [[package]] |
|
|||
334 | name = "semver" |
|
|||
335 | version = "0.9.0" |
|
|||
336 | source = "registry+https://github.com/rust-lang/crates.io-index" |
|
|||
337 | dependencies = [ |
|
|||
338 | "semver-parser 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", |
|
|||
339 | ] |
|
|||
340 |
|
||||
341 | [[package]] |
|
|||
342 | name = "semver-parser" |
|
|||
343 | version = "0.7.0" |
|
|||
344 | source = "registry+https://github.com/rust-lang/crates.io-index" |
|
|||
345 |
|
||||
346 | [[package]] |
|
|||
347 | name = "signal-hook-registry" |
|
299 | name = "signal-hook-registry" | |
348 | version = "1.2.0" |
|
300 | version = "1.2.0" | |
349 | source = "registry+https://github.com/rust-lang/crates.io-index" |
|
301 | source = "registry+https://github.com/rust-lang/crates.io-index" | |
350 | dependencies = [ |
|
302 | dependencies = [ | |
351 | "arc-swap 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)", |
|
303 | "arc-swap 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)", | |
352 |
"libc 0.2.6 |
|
304 | "libc 0.2.69 (registry+https://github.com/rust-lang/crates.io-index)", | |
353 | ] |
|
305 | ] | |
354 |
|
306 | |||
355 | [[package]] |
|
307 | [[package]] | |
356 | name = "slab" |
|
308 | name = "slab" | |
357 | version = "0.4.2" |
|
309 | version = "0.4.2" | |
358 | source = "registry+https://github.com/rust-lang/crates.io-index" |
|
310 | source = "registry+https://github.com/rust-lang/crates.io-index" | |
359 |
|
311 | |||
360 | [[package]] |
|
312 | [[package]] | |
361 | name = "smallvec" |
|
|||
362 | version = "0.6.13" |
|
|||
363 | source = "registry+https://github.com/rust-lang/crates.io-index" |
|
|||
364 | dependencies = [ |
|
|||
365 | "maybe-uninit 2.0.0 (registry+https://github.com/rust-lang/crates.io-index)", |
|
|||
366 | ] |
|
|||
367 |
|
||||
368 | [[package]] |
|
|||
369 | name = "socket2" |
|
313 | name = "socket2" | |
370 |
version = "0.3.1 |
|
314 | version = "0.3.12" | |
371 | source = "registry+https://github.com/rust-lang/crates.io-index" |
|
315 | source = "registry+https://github.com/rust-lang/crates.io-index" | |
372 | dependencies = [ |
|
316 | dependencies = [ | |
373 | "cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", |
|
317 | "cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", | |
374 |
"libc 0.2.6 |
|
318 | "libc 0.2.69 (registry+https://github.com/rust-lang/crates.io-index)", | |
375 | "redox_syscall 0.1.56 (registry+https://github.com/rust-lang/crates.io-index)", |
|
319 | "redox_syscall 0.1.56 (registry+https://github.com/rust-lang/crates.io-index)", | |
376 | "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", |
|
320 | "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", | |
377 | ] |
|
321 | ] | |
378 |
|
322 | |||
379 | [[package]] |
|
323 | [[package]] | |
380 |
name = " |
|
324 | name = "syn" | |
381 |
version = " |
|
325 | version = "1.0.17" | |
382 | source = "registry+https://github.com/rust-lang/crates.io-index" |
|
326 | source = "registry+https://github.com/rust-lang/crates.io-index" | |
383 | dependencies = [ |
|
327 | dependencies = [ | |
384 |
" |
|
328 | "proc-macro2 1.0.10 (registry+https://github.com/rust-lang/crates.io-index)", | |
385 |
" |
|
329 | "quote 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)", | |
386 |
" |
|
330 | "unicode-xid 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", | |
387 | "num_cpus 1.12.0 (registry+https://github.com/rust-lang/crates.io-index)", |
|
|||
388 | "tokio-codec 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", |
|
|||
389 | "tokio-current-thread 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", |
|
|||
390 | "tokio-executor 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", |
|
|||
391 | "tokio-fs 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", |
|
|||
392 | "tokio-io 0.1.13 (registry+https://github.com/rust-lang/crates.io-index)", |
|
|||
393 | "tokio-reactor 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)", |
|
|||
394 | "tokio-sync 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", |
|
|||
395 | "tokio-tcp 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", |
|
|||
396 | "tokio-threadpool 0.1.18 (registry+https://github.com/rust-lang/crates.io-index)", |
|
|||
397 | "tokio-timer 0.2.13 (registry+https://github.com/rust-lang/crates.io-index)", |
|
|||
398 | "tokio-udp 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", |
|
|||
399 | "tokio-uds 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)", |
|
|||
400 | ] |
|
|||
401 |
|
||||
402 | [[package]] |
|
|||
403 | name = "tokio-codec" |
|
|||
404 | version = "0.1.2" |
|
|||
405 | source = "registry+https://github.com/rust-lang/crates.io-index" |
|
|||
406 | dependencies = [ |
|
|||
407 | "bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)", |
|
|||
408 | "futures 0.1.29 (registry+https://github.com/rust-lang/crates.io-index)", |
|
|||
409 | "tokio-io 0.1.13 (registry+https://github.com/rust-lang/crates.io-index)", |
|
|||
410 | ] |
|
|||
411 |
|
||||
412 | [[package]] |
|
|||
413 | name = "tokio-current-thread" |
|
|||
414 | version = "0.1.7" |
|
|||
415 | source = "registry+https://github.com/rust-lang/crates.io-index" |
|
|||
416 | dependencies = [ |
|
|||
417 | "futures 0.1.29 (registry+https://github.com/rust-lang/crates.io-index)", |
|
|||
418 | "tokio-executor 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", |
|
|||
419 | ] |
|
331 | ] | |
420 |
|
332 | |||
421 | [[package]] |
|
333 | [[package]] | |
422 |
name = "tokio |
|
334 | name = "tokio" | |
423 |
version = "0. |
|
335 | version = "0.2.18" | |
424 | source = "registry+https://github.com/rust-lang/crates.io-index" |
|
|||
425 | dependencies = [ |
|
|||
426 | "crossbeam-utils 0.7.2 (registry+https://github.com/rust-lang/crates.io-index)", |
|
|||
427 | "futures 0.1.29 (registry+https://github.com/rust-lang/crates.io-index)", |
|
|||
428 | ] |
|
|||
429 |
|
||||
430 | [[package]] |
|
|||
431 | name = "tokio-fs" |
|
|||
432 | version = "0.1.7" |
|
|||
433 | source = "registry+https://github.com/rust-lang/crates.io-index" |
|
|||
434 | dependencies = [ |
|
|||
435 | "futures 0.1.29 (registry+https://github.com/rust-lang/crates.io-index)", |
|
|||
436 | "tokio-io 0.1.13 (registry+https://github.com/rust-lang/crates.io-index)", |
|
|||
437 | "tokio-threadpool 0.1.18 (registry+https://github.com/rust-lang/crates.io-index)", |
|
|||
438 | ] |
|
|||
439 |
|
||||
440 | [[package]] |
|
|||
441 | name = "tokio-hglib" |
|
|||
442 | version = "0.2.0" |
|
|||
443 | source = "registry+https://github.com/rust-lang/crates.io-index" |
|
336 | source = "registry+https://github.com/rust-lang/crates.io-index" | |
444 | dependencies = [ |
|
337 | dependencies = [ | |
445 |
"bytes 0.4 |
|
338 | "bytes 0.5.4 (registry+https://github.com/rust-lang/crates.io-index)", | |
446 |
"futures |
|
339 | "futures-core 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", | |
447 | "tokio 0.1.22 (registry+https://github.com/rust-lang/crates.io-index)", |
|
|||
448 | "tokio-codec 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", |
|
|||
449 | "tokio-io 0.1.13 (registry+https://github.com/rust-lang/crates.io-index)", |
|
|||
450 | "tokio-process 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)", |
|
|||
451 | "tokio-uds 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)", |
|
|||
452 | ] |
|
|||
453 |
|
||||
454 | [[package]] |
|
|||
455 | name = "tokio-io" |
|
|||
456 | version = "0.1.13" |
|
|||
457 | source = "registry+https://github.com/rust-lang/crates.io-index" |
|
|||
458 | dependencies = [ |
|
|||
459 | "bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)", |
|
|||
460 | "futures 0.1.29 (registry+https://github.com/rust-lang/crates.io-index)", |
|
|||
461 | "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", |
|
|||
462 | ] |
|
|||
463 |
|
||||
464 | [[package]] |
|
|||
465 | name = "tokio-process" |
|
|||
466 | version = "0.2.5" |
|
|||
467 | source = "registry+https://github.com/rust-lang/crates.io-index" |
|
|||
468 | dependencies = [ |
|
|||
469 | "crossbeam-queue 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", |
|
|||
470 | "futures 0.1.29 (registry+https://github.com/rust-lang/crates.io-index)", |
|
|||
471 | "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", |
|
340 | "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", | |
472 |
"libc 0.2.6 |
|
341 | "libc 0.2.69 (registry+https://github.com/rust-lang/crates.io-index)", | |
473 |
" |
|
342 | "memchr 2.3.3 (registry+https://github.com/rust-lang/crates.io-index)", | |
474 | "mio 0.6.21 (registry+https://github.com/rust-lang/crates.io-index)", |
|
343 | "mio 0.6.21 (registry+https://github.com/rust-lang/crates.io-index)", | |
475 | "mio-named-pipes 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", |
|
344 | "mio-named-pipes 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", | |
476 |
" |
|
345 | "mio-uds 0.6.7 (registry+https://github.com/rust-lang/crates.io-index)", | |
477 |
" |
|
346 | "pin-project-lite 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", | |
478 |
" |
|
347 | "signal-hook-registry 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)", | |
|
348 | "slab 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", | |||
|
349 | "tokio-macros 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)", | |||
479 | "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", |
|
350 | "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", | |
480 | ] |
|
351 | ] | |
481 |
|
352 | |||
482 | [[package]] |
|
353 | [[package]] | |
483 |
name = "tokio- |
|
354 | name = "tokio-hglib" | |
484 |
version = "0. |
|
355 | version = "0.3.0" | |
485 | source = "registry+https://github.com/rust-lang/crates.io-index" |
|
|||
486 | dependencies = [ |
|
|||
487 | "crossbeam-utils 0.7.2 (registry+https://github.com/rust-lang/crates.io-index)", |
|
|||
488 | "futures 0.1.29 (registry+https://github.com/rust-lang/crates.io-index)", |
|
|||
489 | "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", |
|
|||
490 | "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", |
|
|||
491 | "mio 0.6.21 (registry+https://github.com/rust-lang/crates.io-index)", |
|
|||
492 | "num_cpus 1.12.0 (registry+https://github.com/rust-lang/crates.io-index)", |
|
|||
493 | "parking_lot 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)", |
|
|||
494 | "slab 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", |
|
|||
495 | "tokio-executor 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", |
|
|||
496 | "tokio-io 0.1.13 (registry+https://github.com/rust-lang/crates.io-index)", |
|
|||
497 | "tokio-sync 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", |
|
|||
498 | ] |
|
|||
499 |
|
||||
500 | [[package]] |
|
|||
501 | name = "tokio-signal" |
|
|||
502 | version = "0.2.9" |
|
|||
503 | source = "registry+https://github.com/rust-lang/crates.io-index" |
|
356 | source = "registry+https://github.com/rust-lang/crates.io-index" | |
504 | dependencies = [ |
|
357 | dependencies = [ | |
505 |
" |
|
358 | "async-trait 0.1.30 (registry+https://github.com/rust-lang/crates.io-index)", | |
506 |
" |
|
359 | "bytes 0.5.4 (registry+https://github.com/rust-lang/crates.io-index)", | |
507 |
" |
|
360 | "futures 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", | |
508 |
" |
|
361 | "tokio 0.2.18 (registry+https://github.com/rust-lang/crates.io-index)", | |
509 |
" |
|
362 | "tokio-util 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", | |
510 | "tokio-executor 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", |
|
|||
511 | "tokio-io 0.1.13 (registry+https://github.com/rust-lang/crates.io-index)", |
|
|||
512 | "tokio-reactor 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)", |
|
|||
513 | "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", |
|
|||
514 | ] |
|
|||
515 |
|
||||
516 | [[package]] |
|
|||
517 | name = "tokio-sync" |
|
|||
518 | version = "0.1.8" |
|
|||
519 | source = "registry+https://github.com/rust-lang/crates.io-index" |
|
|||
520 | dependencies = [ |
|
|||
521 | "fnv 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", |
|
|||
522 | "futures 0.1.29 (registry+https://github.com/rust-lang/crates.io-index)", |
|
|||
523 | ] |
|
|||
524 |
|
||||
525 | [[package]] |
|
|||
526 | name = "tokio-tcp" |
|
|||
527 | version = "0.1.4" |
|
|||
528 | source = "registry+https://github.com/rust-lang/crates.io-index" |
|
|||
529 | dependencies = [ |
|
|||
530 | "bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)", |
|
|||
531 | "futures 0.1.29 (registry+https://github.com/rust-lang/crates.io-index)", |
|
|||
532 | "iovec 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", |
|
|||
533 | "mio 0.6.21 (registry+https://github.com/rust-lang/crates.io-index)", |
|
|||
534 | "tokio-io 0.1.13 (registry+https://github.com/rust-lang/crates.io-index)", |
|
|||
535 | "tokio-reactor 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)", |
|
|||
536 | ] |
|
363 | ] | |
537 |
|
364 | |||
538 | [[package]] |
|
365 | [[package]] | |
539 |
name = "tokio- |
|
366 | name = "tokio-macros" | |
540 |
version = "0. |
|
367 | version = "0.2.5" | |
541 | source = "registry+https://github.com/rust-lang/crates.io-index" |
|
368 | source = "registry+https://github.com/rust-lang/crates.io-index" | |
542 | dependencies = [ |
|
369 | dependencies = [ | |
543 |
" |
|
370 | "proc-macro2 1.0.10 (registry+https://github.com/rust-lang/crates.io-index)", | |
544 |
" |
|
371 | "quote 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)", | |
545 |
" |
|
372 | "syn 1.0.17 (registry+https://github.com/rust-lang/crates.io-index)", | |
546 | "futures 0.1.29 (registry+https://github.com/rust-lang/crates.io-index)", |
|
|||
547 | "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", |
|
|||
548 | "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", |
|
|||
549 | "num_cpus 1.12.0 (registry+https://github.com/rust-lang/crates.io-index)", |
|
|||
550 | "slab 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", |
|
|||
551 | "tokio-executor 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", |
|
|||
552 | ] |
|
|||
553 |
|
||||
554 | [[package]] |
|
|||
555 | name = "tokio-timer" |
|
|||
556 | version = "0.2.13" |
|
|||
557 | source = "registry+https://github.com/rust-lang/crates.io-index" |
|
|||
558 | dependencies = [ |
|
|||
559 | "crossbeam-utils 0.7.2 (registry+https://github.com/rust-lang/crates.io-index)", |
|
|||
560 | "futures 0.1.29 (registry+https://github.com/rust-lang/crates.io-index)", |
|
|||
561 | "slab 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", |
|
|||
562 | "tokio-executor 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", |
|
|||
563 | ] |
|
373 | ] | |
564 |
|
374 | |||
565 | [[package]] |
|
375 | [[package]] | |
566 |
name = "tokio-u |
|
376 | name = "tokio-util" | |
567 |
version = "0. |
|
377 | version = "0.3.1" | |
568 | source = "registry+https://github.com/rust-lang/crates.io-index" |
|
378 | source = "registry+https://github.com/rust-lang/crates.io-index" | |
569 | dependencies = [ |
|
379 | dependencies = [ | |
570 |
"bytes 0.4 |
|
380 | "bytes 0.5.4 (registry+https://github.com/rust-lang/crates.io-index)", | |
571 |
"futures |
|
381 | "futures-core 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", | |
|
382 | "futures-sink 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", | |||
572 | "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", |
|
383 | "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", | |
573 |
" |
|
384 | "pin-project-lite 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", | |
574 |
"tokio |
|
385 | "tokio 0.2.18 (registry+https://github.com/rust-lang/crates.io-index)", | |
575 | "tokio-io 0.1.13 (registry+https://github.com/rust-lang/crates.io-index)", |
|
|||
576 | "tokio-reactor 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)", |
|
|||
577 | ] |
|
386 | ] | |
578 |
|
387 | |||
579 | [[package]] |
|
388 | [[package]] | |
580 |
name = " |
|
389 | name = "unicode-xid" | |
581 |
version = "0.2. |
|
390 | version = "0.2.0" | |
582 | source = "registry+https://github.com/rust-lang/crates.io-index" |
|
391 | source = "registry+https://github.com/rust-lang/crates.io-index" | |
583 | dependencies = [ |
|
|||
584 | "bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)", |
|
|||
585 | "futures 0.1.29 (registry+https://github.com/rust-lang/crates.io-index)", |
|
|||
586 | "iovec 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", |
|
|||
587 | "libc 0.2.68 (registry+https://github.com/rust-lang/crates.io-index)", |
|
|||
588 | "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", |
|
|||
589 | "mio 0.6.21 (registry+https://github.com/rust-lang/crates.io-index)", |
|
|||
590 | "mio-uds 0.6.7 (registry+https://github.com/rust-lang/crates.io-index)", |
|
|||
591 | "tokio-codec 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", |
|
|||
592 | "tokio-io 0.1.13 (registry+https://github.com/rust-lang/crates.io-index)", |
|
|||
593 | "tokio-reactor 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)", |
|
|||
594 | ] |
|
|||
595 |
|
392 | |||
596 | [[package]] |
|
393 | [[package]] | |
597 | name = "winapi" |
|
394 | name = "winapi" | |
598 | version = "0.2.8" |
|
395 | version = "0.2.8" | |
599 | source = "registry+https://github.com/rust-lang/crates.io-index" |
|
396 | source = "registry+https://github.com/rust-lang/crates.io-index" | |
600 |
|
397 | |||
601 | [[package]] |
|
398 | [[package]] | |
602 | name = "winapi" |
|
399 | name = "winapi" | |
603 | version = "0.3.8" |
|
400 | version = "0.3.8" | |
604 | source = "registry+https://github.com/rust-lang/crates.io-index" |
|
401 | source = "registry+https://github.com/rust-lang/crates.io-index" | |
605 | dependencies = [ |
|
402 | dependencies = [ | |
606 | "winapi-i686-pc-windows-gnu 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", |
|
403 | "winapi-i686-pc-windows-gnu 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", | |
607 | "winapi-x86_64-pc-windows-gnu 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", |
|
404 | "winapi-x86_64-pc-windows-gnu 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", | |
608 | ] |
|
405 | ] | |
609 |
|
406 | |||
610 | [[package]] |
|
407 | [[package]] | |
611 | name = "winapi-build" |
|
408 | name = "winapi-build" | |
612 | version = "0.1.1" |
|
409 | version = "0.1.1" | |
613 | source = "registry+https://github.com/rust-lang/crates.io-index" |
|
410 | source = "registry+https://github.com/rust-lang/crates.io-index" | |
614 |
|
411 | |||
615 | [[package]] |
|
412 | [[package]] | |
616 | name = "winapi-i686-pc-windows-gnu" |
|
413 | name = "winapi-i686-pc-windows-gnu" | |
617 | version = "0.4.0" |
|
414 | version = "0.4.0" | |
618 | source = "registry+https://github.com/rust-lang/crates.io-index" |
|
415 | source = "registry+https://github.com/rust-lang/crates.io-index" | |
619 |
|
416 | |||
620 | [[package]] |
|
417 | [[package]] | |
621 | name = "winapi-x86_64-pc-windows-gnu" |
|
418 | name = "winapi-x86_64-pc-windows-gnu" | |
622 | version = "0.4.0" |
|
419 | version = "0.4.0" | |
623 | source = "registry+https://github.com/rust-lang/crates.io-index" |
|
420 | source = "registry+https://github.com/rust-lang/crates.io-index" | |
624 |
|
421 | |||
625 | [[package]] |
|
422 | [[package]] | |
626 | name = "ws2_32-sys" |
|
423 | name = "ws2_32-sys" | |
627 | version = "0.2.1" |
|
424 | version = "0.2.1" | |
628 | source = "registry+https://github.com/rust-lang/crates.io-index" |
|
425 | source = "registry+https://github.com/rust-lang/crates.io-index" | |
629 | dependencies = [ |
|
426 | dependencies = [ | |
630 | "winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", |
|
427 | "winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", | |
631 | "winapi-build 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", |
|
428 | "winapi-build 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", | |
632 | ] |
|
429 | ] | |
633 |
|
430 | |||
634 | [metadata] |
|
431 | [metadata] | |
635 | "checksum arc-swap 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)" = "d663a8e9a99154b5fb793032533f6328da35e23aac63d5c152279aa8ba356825" |
|
432 | "checksum arc-swap 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)" = "d663a8e9a99154b5fb793032533f6328da35e23aac63d5c152279aa8ba356825" | |
636 |
"checksum a |
|
433 | "checksum async-trait 0.1.30 (registry+https://github.com/rust-lang/crates.io-index)" = "da71fef07bc806586090247e971229289f64c210a278ee5ae419314eb386b31d" | |
637 | "checksum bitflags 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "cf1de2fe8c75bc145a2f577add951f8134889b4795d47466a54a5c846d691693" |
|
434 | "checksum bitflags 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "cf1de2fe8c75bc145a2f577add951f8134889b4795d47466a54a5c846d691693" | |
638 |
"checksum byte |
|
435 | "checksum bytes 0.5.4 (registry+https://github.com/rust-lang/crates.io-index)" = "130aac562c0dd69c56b3b1cc8ffd2e17be31d0b6c25b61c96b76231aa23e39e1" | |
639 | "checksum bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)" = "206fdffcfa2df7cbe15601ef46c813fce0965eb3286db6b56c583b814b51c81c" |
|
|||
640 | "checksum cc 1.0.50 (registry+https://github.com/rust-lang/crates.io-index)" = "95e28fa049fda1c330bcf9d723be7663a899c4679724b34c81e9f5a326aab8cd" |
|
436 | "checksum cc 1.0.50 (registry+https://github.com/rust-lang/crates.io-index)" = "95e28fa049fda1c330bcf9d723be7663a899c4679724b34c81e9f5a326aab8cd" | |
641 | "checksum cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)" = "4785bdd1c96b2a846b2bd7cc02e86b6b3dbf14e7e53446c4f54c92a361040822" |
|
437 | "checksum cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)" = "4785bdd1c96b2a846b2bd7cc02e86b6b3dbf14e7e53446c4f54c92a361040822" | |
642 | "checksum cloudabi 0.0.3 (registry+https://github.com/rust-lang/crates.io-index)" = "ddfc5b9aa5d4507acaf872de71051dfd0e309860e88966e1051e462a077aac4f" |
|
|||
643 | "checksum crossbeam-deque 0.7.3 (registry+https://github.com/rust-lang/crates.io-index)" = "9f02af974daeee82218205558e51ec8768b48cf524bd01d550abe5573a608285" |
|
|||
644 | "checksum crossbeam-epoch 0.8.2 (registry+https://github.com/rust-lang/crates.io-index)" = "058ed274caafc1f60c4997b5fc07bf7dc7cca454af7c6e81edffe5f33f70dace" |
|
|||
645 | "checksum crossbeam-queue 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "7c979cd6cfe72335896575c6b5688da489e420d36a27a0b9eb0c73db574b4a4b" |
|
|||
646 | "checksum crossbeam-queue 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "c695eeca1e7173472a32221542ae469b3e9aac3a4fc81f7696bcad82029493db" |
|
|||
647 | "checksum crossbeam-utils 0.6.6 (registry+https://github.com/rust-lang/crates.io-index)" = "04973fa96e96579258a5091af6003abde64af786b860f18622b82e026cca60e6" |
|
|||
648 | "checksum crossbeam-utils 0.7.2 (registry+https://github.com/rust-lang/crates.io-index)" = "c3c7c73a2d1e9fc0886a08b93e98eb643461230d5f1925e4036204d5f2e261a8" |
|
|||
649 | "checksum fnv 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)" = "2fad85553e09a6f881f739c29f0b00b0f01357c743266d478b68951ce23285f3" |
|
|||
650 | "checksum fuchsia-zircon 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "2e9763c69ebaae630ba35f74888db465e49e259ba1bc0eda7d06f4a067615d82" |
|
438 | "checksum fuchsia-zircon 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "2e9763c69ebaae630ba35f74888db465e49e259ba1bc0eda7d06f4a067615d82" | |
651 | "checksum fuchsia-zircon-sys 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "3dcaa9ae7725d12cdb85b3ad99a434db70b468c09ded17e012d86b5c1010f7a7" |
|
439 | "checksum fuchsia-zircon-sys 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "3dcaa9ae7725d12cdb85b3ad99a434db70b468c09ded17e012d86b5c1010f7a7" | |
652 |
"checksum futures 0. |
|
440 | "checksum futures 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)" = "5c329ae8753502fb44ae4fc2b622fa2a94652c41e795143765ba0927f92ab780" | |
653 | "checksum hermit-abi 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)" = "725cf19794cf90aa94e65050cb4191ff5d8fa87a498383774c47b332e3af952e" |
|
441 | "checksum futures-channel 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)" = "f0c77d04ce8edd9cb903932b608268b3fffec4163dc053b3b402bf47eac1f1a8" | |
|
442 | "checksum futures-core 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)" = "f25592f769825e89b92358db00d26f965761e094951ac44d3663ef25b7ac464a" | |||
|
443 | "checksum futures-executor 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)" = "f674f3e1bcb15b37284a90cedf55afdba482ab061c407a9c0ebbd0f3109741ba" | |||
|
444 | "checksum futures-io 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)" = "a638959aa96152c7a4cddf50fcb1e3fede0583b27157c26e67d6f99904090dc6" | |||
|
445 | "checksum futures-macro 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)" = "9a5081aa3de1f7542a794a397cde100ed903b0630152d0973479018fd85423a7" | |||
|
446 | "checksum futures-sink 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)" = "3466821b4bc114d95b087b850a724c6f83115e929bc88f1fa98a3304a944c8a6" | |||
|
447 | "checksum futures-task 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)" = "7b0a34e53cf6cdcd0178aa573aed466b646eb3db769570841fda0c7ede375a27" | |||
|
448 | "checksum futures-util 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)" = "22766cf25d64306bedf0384da004d05c9974ab104fcc4528f1236181c18004c5" | |||
654 | "checksum iovec 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)" = "b2b3ea6ff95e175473f8ffe6a7eb7c00d054240321b84c57051175fe3c1e075e" |
|
449 | "checksum iovec 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)" = "b2b3ea6ff95e175473f8ffe6a7eb7c00d054240321b84c57051175fe3c1e075e" | |
655 | "checksum kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "7507624b29483431c0ba2d82aece8ca6cdba9382bff4ddd0f7490560c056098d" |
|
450 | "checksum kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "7507624b29483431c0ba2d82aece8ca6cdba9382bff4ddd0f7490560c056098d" | |
656 | "checksum lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" |
|
451 | "checksum lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" | |
657 |
"checksum libc 0.2.6 |
|
452 | "checksum libc 0.2.69 (registry+https://github.com/rust-lang/crates.io-index)" = "99e85c08494b21a9054e7fe1374a732aeadaff3980b6990b94bfd3a70f690005" | |
658 | "checksum lock_api 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "79b2de95ecb4691949fea4716ca53cdbcfccb2c612e19644a8bad05edcf9f47b" |
|
|||
659 | "checksum log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)" = "14b6052be84e6b71ab17edffc2eeabf5c2c3ae1fdb464aae35ac50c67a44e1f7" |
|
453 | "checksum log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)" = "14b6052be84e6b71ab17edffc2eeabf5c2c3ae1fdb464aae35ac50c67a44e1f7" | |
660 | "checksum maybe-uninit 2.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "60302e4db3a61da70c0cb7991976248362f30319e88850c487b9b95bbf059e00" |
|
454 | "checksum memchr 2.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "3728d817d99e5ac407411fa471ff9800a778d88a24685968b36824eaf4bee400" | |
661 | "checksum memoffset 0.5.4 (registry+https://github.com/rust-lang/crates.io-index)" = "b4fc2c02a7e374099d4ee95a193111f72d2110197fe200272371758f6c3643d8" |
|
|||
662 | "checksum mio 0.6.21 (registry+https://github.com/rust-lang/crates.io-index)" = "302dec22bcf6bae6dfb69c647187f4b4d0fb6f535521f7bc022430ce8e12008f" |
|
455 | "checksum mio 0.6.21 (registry+https://github.com/rust-lang/crates.io-index)" = "302dec22bcf6bae6dfb69c647187f4b4d0fb6f535521f7bc022430ce8e12008f" | |
663 | "checksum mio-named-pipes 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)" = "f5e374eff525ce1c5b7687c4cef63943e7686524a387933ad27ca7ec43779cb3" |
|
456 | "checksum mio-named-pipes 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)" = "f5e374eff525ce1c5b7687c4cef63943e7686524a387933ad27ca7ec43779cb3" | |
664 | "checksum mio-uds 0.6.7 (registry+https://github.com/rust-lang/crates.io-index)" = "966257a94e196b11bb43aca423754d87429960a768de9414f3691d6957abf125" |
|
457 | "checksum mio-uds 0.6.7 (registry+https://github.com/rust-lang/crates.io-index)" = "966257a94e196b11bb43aca423754d87429960a768de9414f3691d6957abf125" | |
665 | "checksum miow 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "8c1f2f3b1cf331de6896aabf6e9d55dca90356cc9960cca7eaaf408a355ae919" |
|
458 | "checksum miow 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "8c1f2f3b1cf331de6896aabf6e9d55dca90356cc9960cca7eaaf408a355ae919" | |
666 | "checksum miow 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "396aa0f2003d7df8395cb93e09871561ccc3e785f0acb369170e8cc74ddf9226" |
|
459 | "checksum miow 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "396aa0f2003d7df8395cb93e09871561ccc3e785f0acb369170e8cc74ddf9226" | |
667 | "checksum net2 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)" = "42550d9fb7b6684a6d404d9fa7250c2eb2646df731d1c06afc06dcee9e1bcf88" |
|
460 | "checksum net2 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)" = "42550d9fb7b6684a6d404d9fa7250c2eb2646df731d1c06afc06dcee9e1bcf88" | |
668 |
"checksum |
|
461 | "checksum pin-project-lite 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)" = "237844750cfbb86f67afe27eee600dfbbcb6188d734139b534cbfbf4f96792ae" | |
669 |
"checksum p |
|
462 | "checksum pin-utils 0.1.0-alpha.4 (registry+https://github.com/rust-lang/crates.io-index)" = "5894c618ce612a3fa23881b152b608bafb8c56cfc22f434a3ba3120b40f7b587" | |
670 |
"checksum p |
|
463 | "checksum proc-macro-hack 0.5.15 (registry+https://github.com/rust-lang/crates.io-index)" = "0d659fe7c6d27f25e9d80a1a094c223f5246f6a6596453e09d7229bf42750b63" | |
|
464 | "checksum proc-macro-nested 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)" = "8e946095f9d3ed29ec38de908c22f95d9ac008e424c7bcae54c75a79c527c694" | |||
|
465 | "checksum proc-macro2 1.0.10 (registry+https://github.com/rust-lang/crates.io-index)" = "df246d292ff63439fea9bc8c0a270bed0e390d5ebd4db4ba15aba81111b5abe3" | |||
|
466 | "checksum quote 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)" = "2bdc6c187c65bca4260c9011c9e3132efe4909da44726bad24cf7572ae338d7f" | |||
671 | "checksum redox_syscall 0.1.56 (registry+https://github.com/rust-lang/crates.io-index)" = "2439c63f3f6139d1b57529d16bc3b8bb855230c8efcc5d3a896c8bea7c3b1e84" |
|
467 | "checksum redox_syscall 0.1.56 (registry+https://github.com/rust-lang/crates.io-index)" = "2439c63f3f6139d1b57529d16bc3b8bb855230c8efcc5d3a896c8bea7c3b1e84" | |
672 | "checksum rustc_version 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "138e3e0acb6c9fb258b19b67cb8abd63c00679d2851805ea151465464fe9030a" |
|
|||
673 | "checksum scopeguard 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "d29ab0c6d3fc0ee92fe66e2d99f700eab17a8d57d1c1d3b748380fb20baa78cd" |
|
|||
674 | "checksum semver 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)" = "1d7eb9ef2c18661902cc47e535f9bc51b78acd254da71d375c2f6720d9a40403" |
|
|||
675 | "checksum semver-parser 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "388a1df253eca08550bef6c72392cfe7c30914bf41df5269b68cbd6ff8f570a3" |
|
|||
676 | "checksum signal-hook-registry 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "94f478ede9f64724c5d173d7bb56099ec3e2d9fc2774aac65d34b8b890405f41" |
|
468 | "checksum signal-hook-registry 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "94f478ede9f64724c5d173d7bb56099ec3e2d9fc2774aac65d34b8b890405f41" | |
677 | "checksum slab 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)" = "c111b5bd5695e56cffe5129854aa230b39c93a305372fdbb2668ca2394eea9f8" |
|
469 | "checksum slab 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)" = "c111b5bd5695e56cffe5129854aa230b39c93a305372fdbb2668ca2394eea9f8" | |
678 |
"checksum s |
|
470 | "checksum socket2 0.3.12 (registry+https://github.com/rust-lang/crates.io-index)" = "03088793f677dce356f3ccc2edb1b314ad191ab702a5de3faf49304f7e104918" | |
679 |
"checksum s |
|
471 | "checksum syn 1.0.17 (registry+https://github.com/rust-lang/crates.io-index)" = "0df0eb663f387145cab623dea85b09c2c5b4b0aef44e945d928e682fce71bb03" | |
680 |
"checksum tokio 0. |
|
472 | "checksum tokio 0.2.18 (registry+https://github.com/rust-lang/crates.io-index)" = "34ef16d072d2b6dc8b4a56c70f5c5ced1a37752116f8e7c1e80c659aa7cb6713" | |
681 |
"checksum tokio- |
|
473 | "checksum tokio-hglib 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "8d7e2b5d44911ebf67a1044423604f5f69206c5cbbd7e911b4966e6831514bca" | |
682 | "checksum tokio-current-thread 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)" = "b1de0e32a83f131e002238d7ccde18211c0a5397f60cbfffcb112868c2e0e20e" |
|
474 | "checksum tokio-macros 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)" = "f0c3acc6aa564495a0f2e1d59fab677cd7f81a19994cfc7f3ad0e64301560389" | |
683 |
"checksum tokio- |
|
475 | "checksum tokio-util 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "be8242891f2b6cbef26a2d7e8605133c2c554cd35b3e4948ea892d6d68436499" | |
684 | "checksum tokio-fs 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)" = "297a1206e0ca6302a0eed35b700d292b275256f596e2f3fea7729d5e629b6ff4" |
|
476 | "checksum unicode-xid 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "826e7639553986605ec5979c7dd957c7895e93eabed50ab2ffa7f6128a75097c" | |
685 | "checksum tokio-hglib 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "8a138c3cb866c8a95ceddae44634bb159eefeebcdba45aec2158f8ad6c201e6d" |
|
|||
686 | "checksum tokio-io 0.1.13 (registry+https://github.com/rust-lang/crates.io-index)" = "57fc868aae093479e3131e3d165c93b1c7474109d13c90ec0dda2a1bbfff0674" |
|
|||
687 | "checksum tokio-process 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)" = "382d90f43fa31caebe5d3bc6cfd854963394fff3b8cb59d5146607aaae7e7e43" |
|
|||
688 | "checksum tokio-reactor 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)" = "09bc590ec4ba8ba87652da2068d150dcada2cfa2e07faae270a5e0409aa51351" |
|
|||
689 | "checksum tokio-signal 0.2.9 (registry+https://github.com/rust-lang/crates.io-index)" = "d0c34c6e548f101053321cba3da7cbb87a610b85555884c41b07da2eb91aff12" |
|
|||
690 | "checksum tokio-sync 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)" = "edfe50152bc8164fcc456dab7891fa9bf8beaf01c5ee7e1dd43a397c3cf87dee" |
|
|||
691 | "checksum tokio-tcp 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)" = "98df18ed66e3b72e742f185882a9e201892407957e45fbff8da17ae7a7c51f72" |
|
|||
692 | "checksum tokio-threadpool 0.1.18 (registry+https://github.com/rust-lang/crates.io-index)" = "df720b6581784c118f0eb4310796b12b1d242a7eb95f716a8367855325c25f89" |
|
|||
693 | "checksum tokio-timer 0.2.13 (registry+https://github.com/rust-lang/crates.io-index)" = "93044f2d313c95ff1cb7809ce9a7a05735b012288a888b62d4434fd58c94f296" |
|
|||
694 | "checksum tokio-udp 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)" = "e2a0b10e610b39c38b031a2fcab08e4b82f16ece36504988dcbd81dbba650d82" |
|
|||
695 | "checksum tokio-uds 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)" = "5076db410d6fdc6523df7595447629099a1fdc47b3d9f896220780fa48faf798" |
|
|||
696 | "checksum winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)" = "167dc9d6949a9b857f3451275e911c3f44255842c1f7a76f33c55103a909087a" |
|
477 | "checksum winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)" = "167dc9d6949a9b857f3451275e911c3f44255842c1f7a76f33c55103a909087a" | |
697 | "checksum winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)" = "8093091eeb260906a183e6ae1abdba2ef5ef2257a21801128899c3fc699229c6" |
|
478 | "checksum winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)" = "8093091eeb260906a183e6ae1abdba2ef5ef2257a21801128899c3fc699229c6" | |
698 | "checksum winapi-build 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "2d315eee3b34aca4797b2da6b13ed88266e6d612562a0c46390af8299fc699bc" |
|
479 | "checksum winapi-build 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "2d315eee3b34aca4797b2da6b13ed88266e6d612562a0c46390af8299fc699bc" | |
699 | "checksum winapi-i686-pc-windows-gnu 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" |
|
480 | "checksum winapi-i686-pc-windows-gnu 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" | |
700 | "checksum winapi-x86_64-pc-windows-gnu 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" |
|
481 | "checksum winapi-x86_64-pc-windows-gnu 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" | |
701 | "checksum ws2_32-sys 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "d59cefebd0c892fa2dd6de581e937301d8552cb44489cdff035c6187cb63fa5e" |
|
482 | "checksum ws2_32-sys 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "d59cefebd0c892fa2dd6de581e937301d8552cb44489cdff035c6187cb63fa5e" |
@@ -1,23 +1,25 | |||||
1 | [package] |
|
1 | [package] | |
2 | name = "chg" |
|
2 | name = "chg" | |
3 | version = "0.1.0" |
|
3 | version = "0.1.0" | |
4 | authors = ["Yuya Nishihara <yuya@tcha.org>"] |
|
4 | authors = ["Yuya Nishihara <yuya@tcha.org>"] | |
5 | description = "Client for Mercurial command server with cHg extension" |
|
5 | description = "Client for Mercurial command server with cHg extension" | |
6 | license = "GPL-2.0+" |
|
6 | license = "GPL-2.0+" | |
7 | edition = "2018" |
|
7 | edition = "2018" | |
8 |
|
8 | |||
9 | # TODO: enable auto discovery |
|
9 | # TODO: enable auto discovery | |
10 | autobins = false |
|
10 | autobins = false | |
11 |
|
11 | |||
12 | [dependencies] |
|
12 | [dependencies] | |
13 | bytes = "0.4" |
|
13 | async-trait = "0.1" | |
14 |
|
|
14 | bytes = "0.5" | |
|
15 | futures = "0.3" | |||
15 | libc = "0.2" |
|
16 | libc = "0.2" | |
16 | log = { version = "0.4", features = ["std"] } |
|
17 | log = { version = "0.4", features = ["std"] } | |
17 |
tokio = "0. |
|
18 | tokio-hglib = "0.3" | |
18 | tokio-hglib = "0.2" |
|
19 | ||
19 | tokio-process = "0.2.3" |
|
20 | [dependencies.tokio] | |
20 | tokio-timer = "0.2" |
|
21 | version = "0.2" | |
|
22 | features = ["rt-core", "io-util", "time", "process", "macros"] | |||
21 |
|
23 | |||
22 | [build-dependencies] |
|
24 | [build-dependencies] | |
23 | cc = "1.0" |
|
25 | cc = "1.0" |
@@ -1,128 +1,128 | |||||
1 | // Copyright 2018 Yuya Nishihara <yuya@tcha.org> |
|
1 | // Copyright 2018 Yuya Nishihara <yuya@tcha.org> | |
2 | // |
|
2 | // | |
3 | // This software may be used and distributed according to the terms of the |
|
3 | // This software may be used and distributed according to the terms of the | |
4 | // GNU General Public License version 2 or any later version. |
|
4 | // GNU General Public License version 2 or any later version. | |
5 |
|
5 | |||
6 | //! cHg extensions to command server client. |
|
6 | //! cHg extensions to command server client. | |
7 |
|
7 | |||
8 | use bytes::{BufMut, Bytes, BytesMut}; |
|
8 | use bytes::{BufMut, Bytes, BytesMut}; | |
9 | use std::ffi::OsStr; |
|
9 | use std::ffi::OsStr; | |
10 | use std::io; |
|
10 | use std::io; | |
11 | use std::mem; |
|
11 | use std::mem; | |
12 | use std::os::unix::ffi::OsStrExt; |
|
12 | use std::os::unix::ffi::OsStrExt; | |
13 | use std::os::unix::io::AsRawFd; |
|
13 | use std::os::unix::io::AsRawFd; | |
14 | use std::path::Path; |
|
14 | use std::path::Path; | |
15 | use tokio_hglib::protocol::{OneShotQuery, OneShotRequest}; |
|
15 | use tokio_hglib::protocol::{OneShotQuery, OneShotRequest}; | |
16 | use tokio_hglib::{Client, Connection}; |
|
16 | use tokio_hglib::{Client, Connection}; | |
17 |
|
17 | |||
18 | use crate::attachio::AttachIo; |
|
18 | use crate::attachio::AttachIo; | |
19 | use crate::message::{self, Instruction}; |
|
19 | use crate::message::{self, Instruction}; | |
20 | use crate::runcommand::ChgRunCommand; |
|
20 | use crate::runcommand::ChgRunCommand; | |
21 | use crate::uihandler::SystemHandler; |
|
21 | use crate::uihandler::SystemHandler; | |
22 |
|
22 | |||
23 | pub trait ChgClientExt<C> |
|
23 | pub trait ChgClientExt<C> | |
24 | where |
|
24 | where | |
25 | C: Connection + AsRawFd, |
|
25 | C: Connection + AsRawFd, | |
26 | { |
|
26 | { | |
27 | /// Attaches the client file descriptors to the server. |
|
27 | /// Attaches the client file descriptors to the server. | |
28 | fn attach_io<I, O, E>(self, stdin: I, stdout: O, stderr: E) -> AttachIo<C, I, O, E> |
|
28 | fn attach_io<I, O, E>(self, stdin: I, stdout: O, stderr: E) -> AttachIo<C, I, O, E> | |
29 | where |
|
29 | where | |
30 | I: AsRawFd, |
|
30 | I: AsRawFd, | |
31 | O: AsRawFd, |
|
31 | O: AsRawFd, | |
32 | E: AsRawFd; |
|
32 | E: AsRawFd; | |
33 |
|
33 | |||
34 | /// Changes the working directory of the server. |
|
34 | /// Changes the working directory of the server. | |
35 | fn set_current_dir(self, dir: impl AsRef<Path>) -> OneShotRequest<C>; |
|
35 | fn set_current_dir(self, dir: impl AsRef<Path>) -> OneShotRequest<C>; | |
36 |
|
36 | |||
37 | /// Updates the environment variables of the server. |
|
37 | /// Updates the environment variables of the server. | |
38 | fn set_env_vars_os( |
|
38 | fn set_env_vars_os( | |
39 | self, |
|
39 | self, | |
40 | vars: impl IntoIterator<Item = (impl AsRef<OsStr>, impl AsRef<OsStr>)>, |
|
40 | vars: impl IntoIterator<Item = (impl AsRef<OsStr>, impl AsRef<OsStr>)>, | |
41 | ) -> OneShotRequest<C>; |
|
41 | ) -> OneShotRequest<C>; | |
42 |
|
42 | |||
43 | /// Changes the process title of the server. |
|
43 | /// Changes the process title of the server. | |
44 | fn set_process_name(self, name: impl AsRef<OsStr>) -> OneShotRequest<C>; |
|
44 | fn set_process_name(self, name: impl AsRef<OsStr>) -> OneShotRequest<C>; | |
45 |
|
45 | |||
46 | /// Changes the umask of the server process. |
|
46 | /// Changes the umask of the server process. | |
47 | fn set_umask(self, mask: u32) -> OneShotRequest<C>; |
|
47 | fn set_umask(self, mask: u32) -> OneShotRequest<C>; | |
48 |
|
48 | |||
49 | /// Runs the specified Mercurial command with cHg extension. |
|
49 | /// Runs the specified Mercurial command with cHg extension. | |
50 | fn run_command_chg<H>( |
|
50 | fn run_command_chg<H>( | |
51 | self, |
|
51 | self, | |
52 | handler: H, |
|
52 | handler: H, | |
53 | args: impl IntoIterator<Item = impl AsRef<OsStr>>, |
|
53 | args: impl IntoIterator<Item = impl AsRef<OsStr>>, | |
54 | ) -> ChgRunCommand<C, H> |
|
54 | ) -> ChgRunCommand<C, H> | |
55 | where |
|
55 | where | |
56 | H: SystemHandler; |
|
56 | H: SystemHandler; | |
57 |
|
57 | |||
58 | /// Validates if the server can run Mercurial commands with the expected |
|
58 | /// Validates if the server can run Mercurial commands with the expected | |
59 | /// configuration. |
|
59 | /// configuration. | |
60 | /// |
|
60 | /// | |
61 | /// The `args` should contain early command arguments such as `--config` |
|
61 | /// The `args` should contain early command arguments such as `--config` | |
62 | /// and `-R`. |
|
62 | /// and `-R`. | |
63 | /// |
|
63 | /// | |
64 | /// Client-side environment must be sent prior to this request, by |
|
64 | /// Client-side environment must be sent prior to this request, by | |
65 | /// `set_current_dir()` and `set_env_vars_os()`. |
|
65 | /// `set_current_dir()` and `set_env_vars_os()`. | |
66 | fn validate( |
|
66 | fn validate( | |
67 | self, |
|
67 | self, | |
68 | args: impl IntoIterator<Item = impl AsRef<OsStr>>, |
|
68 | args: impl IntoIterator<Item = impl AsRef<OsStr>>, | |
69 | ) -> OneShotQuery<C, fn(Bytes) -> io::Result<Vec<Instruction>>>; |
|
69 | ) -> OneShotQuery<C, fn(Bytes) -> io::Result<Vec<Instruction>>>; | |
70 | } |
|
70 | } | |
71 |
|
71 | |||
72 | impl<C> ChgClientExt<C> for Client<C> |
|
72 | impl<C> ChgClientExt<C> for Client<C> | |
73 | where |
|
73 | where | |
74 | C: Connection + AsRawFd, |
|
74 | C: Connection + AsRawFd, | |
75 | { |
|
75 | { | |
76 | fn attach_io<I, O, E>(self, stdin: I, stdout: O, stderr: E) -> AttachIo<C, I, O, E> |
|
76 | fn attach_io<I, O, E>(self, stdin: I, stdout: O, stderr: E) -> AttachIo<C, I, O, E> | |
77 | where |
|
77 | where | |
78 | I: AsRawFd, |
|
78 | I: AsRawFd, | |
79 | O: AsRawFd, |
|
79 | O: AsRawFd, | |
80 | E: AsRawFd, |
|
80 | E: AsRawFd, | |
81 | { |
|
81 | { | |
82 | AttachIo::with_client(self, stdin, stdout, Some(stderr)) |
|
82 | AttachIo::with_client(self, stdin, stdout, Some(stderr)) | |
83 | } |
|
83 | } | |
84 |
|
84 | |||
85 | fn set_current_dir(self, dir: impl AsRef<Path>) -> OneShotRequest<C> { |
|
85 | fn set_current_dir(self, dir: impl AsRef<Path>) -> OneShotRequest<C> { | |
86 | OneShotRequest::start_with_args(self, b"chdir", dir.as_ref().as_os_str().as_bytes()) |
|
86 | OneShotRequest::start_with_args(self, b"chdir", dir.as_ref().as_os_str().as_bytes()) | |
87 | } |
|
87 | } | |
88 |
|
88 | |||
89 | fn set_env_vars_os( |
|
89 | fn set_env_vars_os( | |
90 | self, |
|
90 | self, | |
91 | vars: impl IntoIterator<Item = (impl AsRef<OsStr>, impl AsRef<OsStr>)>, |
|
91 | vars: impl IntoIterator<Item = (impl AsRef<OsStr>, impl AsRef<OsStr>)>, | |
92 | ) -> OneShotRequest<C> { |
|
92 | ) -> OneShotRequest<C> { | |
93 | OneShotRequest::start_with_args(self, b"setenv", message::pack_env_vars_os(vars)) |
|
93 | OneShotRequest::start_with_args(self, b"setenv", message::pack_env_vars_os(vars)) | |
94 | } |
|
94 | } | |
95 |
|
95 | |||
96 | fn set_process_name(self, name: impl AsRef<OsStr>) -> OneShotRequest<C> { |
|
96 | fn set_process_name(self, name: impl AsRef<OsStr>) -> OneShotRequest<C> { | |
97 | OneShotRequest::start_with_args(self, b"setprocname", name.as_ref().as_bytes()) |
|
97 | OneShotRequest::start_with_args(self, b"setprocname", name.as_ref().as_bytes()) | |
98 | } |
|
98 | } | |
99 |
|
99 | |||
100 | fn set_umask(self, mask: u32) -> OneShotRequest<C> { |
|
100 | fn set_umask(self, mask: u32) -> OneShotRequest<C> { | |
101 | let mut args = BytesMut::with_capacity(mem::size_of_val(&mask)); |
|
101 | let mut args = BytesMut::with_capacity(mem::size_of_val(&mask)); | |
102 |
args.put_u32 |
|
102 | args.put_u32(mask); | |
103 | OneShotRequest::start_with_args(self, b"setumask2", args) |
|
103 | OneShotRequest::start_with_args(self, b"setumask2", args) | |
104 | } |
|
104 | } | |
105 |
|
105 | |||
106 | fn run_command_chg<H>( |
|
106 | fn run_command_chg<H>( | |
107 | self, |
|
107 | self, | |
108 | handler: H, |
|
108 | handler: H, | |
109 | args: impl IntoIterator<Item = impl AsRef<OsStr>>, |
|
109 | args: impl IntoIterator<Item = impl AsRef<OsStr>>, | |
110 | ) -> ChgRunCommand<C, H> |
|
110 | ) -> ChgRunCommand<C, H> | |
111 | where |
|
111 | where | |
112 | H: SystemHandler, |
|
112 | H: SystemHandler, | |
113 | { |
|
113 | { | |
114 | ChgRunCommand::with_client(self, handler, message::pack_args_os(args)) |
|
114 | ChgRunCommand::with_client(self, handler, message::pack_args_os(args)) | |
115 | } |
|
115 | } | |
116 |
|
116 | |||
117 | fn validate( |
|
117 | fn validate( | |
118 | self, |
|
118 | self, | |
119 | args: impl IntoIterator<Item = impl AsRef<OsStr>>, |
|
119 | args: impl IntoIterator<Item = impl AsRef<OsStr>>, | |
120 | ) -> OneShotQuery<C, fn(Bytes) -> io::Result<Vec<Instruction>>> { |
|
120 | ) -> OneShotQuery<C, fn(Bytes) -> io::Result<Vec<Instruction>>> { | |
121 | OneShotQuery::start_with_args( |
|
121 | OneShotQuery::start_with_args( | |
122 | self, |
|
122 | self, | |
123 | b"validate", |
|
123 | b"validate", | |
124 | message::pack_args_os(args), |
|
124 | message::pack_args_os(args), | |
125 | message::parse_instructions, |
|
125 | message::parse_instructions, | |
126 | ) |
|
126 | ) | |
127 | } |
|
127 | } | |
128 | } |
|
128 | } |
@@ -1,490 +1,490 | |||||
1 | // Copyright 2011, 2018 Yuya Nishihara <yuya@tcha.org> |
|
1 | // Copyright 2011, 2018 Yuya Nishihara <yuya@tcha.org> | |
2 | // |
|
2 | // | |
3 | // This software may be used and distributed according to the terms of the |
|
3 | // This software may be used and distributed according to the terms of the | |
4 | // GNU General Public License version 2 or any later version. |
|
4 | // GNU General Public License version 2 or any later version. | |
5 |
|
5 | |||
6 | //! Utility for locating command-server process. |
|
6 | //! Utility for locating command-server process. | |
7 |
|
7 | |||
8 | use futures::future::{self, Either, Loop}; |
|
8 | use futures::future::{self, Either, Loop}; | |
9 | use log::debug; |
|
9 | use log::debug; | |
10 | use std::env; |
|
10 | use std::env; | |
11 | use std::ffi::{OsStr, OsString}; |
|
11 | use std::ffi::{OsStr, OsString}; | |
12 | use std::fs::{self, DirBuilder}; |
|
12 | use std::fs::{self, DirBuilder}; | |
13 | use std::io; |
|
13 | use std::io; | |
14 | use std::os::unix::ffi::{OsStrExt, OsStringExt}; |
|
14 | use std::os::unix::ffi::{OsStrExt, OsStringExt}; | |
15 | use std::os::unix::fs::{DirBuilderExt, MetadataExt}; |
|
15 | use std::os::unix::fs::{DirBuilderExt, MetadataExt}; | |
16 | use std::path::{Path, PathBuf}; |
|
16 | use std::path::{Path, PathBuf}; | |
17 |
use std::process |
|
17 | use std::process; | |
18 | use std::time::Duration; |
|
18 | use std::time::Duration; | |
19 | use tokio::prelude::*; |
|
19 | use tokio::prelude::*; | |
|
20 | use tokio::process::{Child, Command}; | |||
|
21 | use tokio::time; | |||
20 | use tokio_hglib::UnixClient; |
|
22 | use tokio_hglib::UnixClient; | |
21 | use tokio_process::{Child, CommandExt}; |
|
|||
22 | use tokio_timer; |
|
|||
23 |
|
23 | |||
24 | use crate::clientext::ChgClientExt; |
|
24 | use crate::clientext::ChgClientExt; | |
25 | use crate::message::{Instruction, ServerSpec}; |
|
25 | use crate::message::{Instruction, ServerSpec}; | |
26 | use crate::procutil; |
|
26 | use crate::procutil; | |
27 |
|
27 | |||
28 | const REQUIRED_SERVER_CAPABILITIES: &[&str] = &[ |
|
28 | const REQUIRED_SERVER_CAPABILITIES: &[&str] = &[ | |
29 | "attachio", |
|
29 | "attachio", | |
30 | "chdir", |
|
30 | "chdir", | |
31 | "runcommand", |
|
31 | "runcommand", | |
32 | "setenv", |
|
32 | "setenv", | |
33 | "setumask2", |
|
33 | "setumask2", | |
34 | "validate", |
|
34 | "validate", | |
35 | ]; |
|
35 | ]; | |
36 |
|
36 | |||
37 | /// Helper to connect to and spawn a server process. |
|
37 | /// Helper to connect to and spawn a server process. | |
38 | #[derive(Clone, Debug)] |
|
38 | #[derive(Clone, Debug)] | |
39 | pub struct Locator { |
|
39 | pub struct Locator { | |
40 | hg_command: OsString, |
|
40 | hg_command: OsString, | |
41 | hg_early_args: Vec<OsString>, |
|
41 | hg_early_args: Vec<OsString>, | |
42 | current_dir: PathBuf, |
|
42 | current_dir: PathBuf, | |
43 | env_vars: Vec<(OsString, OsString)>, |
|
43 | env_vars: Vec<(OsString, OsString)>, | |
44 | process_id: u32, |
|
44 | process_id: u32, | |
45 | base_sock_path: PathBuf, |
|
45 | base_sock_path: PathBuf, | |
46 | redirect_sock_path: Option<PathBuf>, |
|
46 | redirect_sock_path: Option<PathBuf>, | |
47 | timeout: Duration, |
|
47 | timeout: Duration, | |
48 | } |
|
48 | } | |
49 |
|
49 | |||
50 | impl Locator { |
|
50 | impl Locator { | |
51 | /// Creates locator capturing the current process environment. |
|
51 | /// Creates locator capturing the current process environment. | |
52 | /// |
|
52 | /// | |
53 | /// If no `$CHGSOCKNAME` is specified, the socket directory will be |
|
53 | /// If no `$CHGSOCKNAME` is specified, the socket directory will be | |
54 | /// created as necessary. |
|
54 | /// created as necessary. | |
55 | pub fn prepare_from_env() -> io::Result<Locator> { |
|
55 | pub fn prepare_from_env() -> io::Result<Locator> { | |
56 | Ok(Locator { |
|
56 | Ok(Locator { | |
57 | hg_command: default_hg_command(), |
|
57 | hg_command: default_hg_command(), | |
58 | hg_early_args: Vec::new(), |
|
58 | hg_early_args: Vec::new(), | |
59 | current_dir: env::current_dir()?, |
|
59 | current_dir: env::current_dir()?, | |
60 | env_vars: env::vars_os().collect(), |
|
60 | env_vars: env::vars_os().collect(), | |
61 | process_id: process::id(), |
|
61 | process_id: process::id(), | |
62 | base_sock_path: prepare_server_socket_path()?, |
|
62 | base_sock_path: prepare_server_socket_path()?, | |
63 | redirect_sock_path: None, |
|
63 | redirect_sock_path: None, | |
64 | timeout: default_timeout(), |
|
64 | timeout: default_timeout(), | |
65 | }) |
|
65 | }) | |
66 | } |
|
66 | } | |
67 |
|
67 | |||
68 | /// Temporary socket path for this client process. |
|
68 | /// Temporary socket path for this client process. | |
69 | fn temp_sock_path(&self) -> PathBuf { |
|
69 | fn temp_sock_path(&self) -> PathBuf { | |
70 | let src = self.base_sock_path.as_os_str().as_bytes(); |
|
70 | let src = self.base_sock_path.as_os_str().as_bytes(); | |
71 | let mut buf = Vec::with_capacity(src.len() + 6); // "{src}.{pid}".len() |
|
71 | let mut buf = Vec::with_capacity(src.len() + 6); // "{src}.{pid}".len() | |
72 | buf.extend_from_slice(src); |
|
72 | buf.extend_from_slice(src); | |
73 | buf.extend_from_slice(format!(".{}", self.process_id).as_bytes()); |
|
73 | buf.extend_from_slice(format!(".{}", self.process_id).as_bytes()); | |
74 | OsString::from_vec(buf).into() |
|
74 | OsString::from_vec(buf).into() | |
75 | } |
|
75 | } | |
76 |
|
76 | |||
77 | /// Specifies the arguments to be passed to the server at start. |
|
77 | /// Specifies the arguments to be passed to the server at start. | |
78 | pub fn set_early_args(&mut self, args: impl IntoIterator<Item = impl AsRef<OsStr>>) { |
|
78 | pub fn set_early_args(&mut self, args: impl IntoIterator<Item = impl AsRef<OsStr>>) { | |
79 | self.hg_early_args = args.into_iter().map(|a| a.as_ref().to_owned()).collect(); |
|
79 | self.hg_early_args = args.into_iter().map(|a| a.as_ref().to_owned()).collect(); | |
80 | } |
|
80 | } | |
81 |
|
81 | |||
82 | /// Connects to the server. |
|
82 | /// Connects to the server. | |
83 | /// |
|
83 | /// | |
84 | /// The server process will be spawned if not running. |
|
84 | /// The server process will be spawned if not running. | |
85 | pub fn connect(self) -> impl Future<Item = (Self, UnixClient), Error = io::Error> { |
|
85 | pub fn connect(self) -> impl Future<Item = (Self, UnixClient), Error = io::Error> { | |
86 | future::loop_fn((self, 0), |(loc, cnt)| { |
|
86 | future::loop_fn((self, 0), |(loc, cnt)| { | |
87 | if cnt < 10 { |
|
87 | if cnt < 10 { | |
88 | let fut = loc |
|
88 | let fut = loc | |
89 | .try_connect() |
|
89 | .try_connect() | |
90 | .and_then(|(loc, client)| { |
|
90 | .and_then(|(loc, client)| { | |
91 | client |
|
91 | client | |
92 | .validate(&loc.hg_early_args) |
|
92 | .validate(&loc.hg_early_args) | |
93 | .map(|(client, instructions)| (loc, client, instructions)) |
|
93 | .map(|(client, instructions)| (loc, client, instructions)) | |
94 | }) |
|
94 | }) | |
95 | .and_then(move |(loc, client, instructions)| { |
|
95 | .and_then(move |(loc, client, instructions)| { | |
96 | loc.run_instructions(client, instructions, cnt) |
|
96 | loc.run_instructions(client, instructions, cnt) | |
97 | }); |
|
97 | }); | |
98 | Either::A(fut) |
|
98 | Either::A(fut) | |
99 | } else { |
|
99 | } else { | |
100 | let msg = format!( |
|
100 | let msg = format!( | |
101 | concat!( |
|
101 | concat!( | |
102 | "too many redirections.\n", |
|
102 | "too many redirections.\n", | |
103 | "Please make sure {:?} is not a wrapper which ", |
|
103 | "Please make sure {:?} is not a wrapper which ", | |
104 | "changes sensitive environment variables ", |
|
104 | "changes sensitive environment variables ", | |
105 | "before executing hg. If you have to use a ", |
|
105 | "before executing hg. If you have to use a ", | |
106 | "wrapper, wrap chg instead of hg.", |
|
106 | "wrapper, wrap chg instead of hg.", | |
107 | ), |
|
107 | ), | |
108 | loc.hg_command |
|
108 | loc.hg_command | |
109 | ); |
|
109 | ); | |
110 | Either::B(future::err(io::Error::new(io::ErrorKind::Other, msg))) |
|
110 | Either::B(future::err(io::Error::new(io::ErrorKind::Other, msg))) | |
111 | } |
|
111 | } | |
112 | }) |
|
112 | }) | |
113 | } |
|
113 | } | |
114 |
|
114 | |||
115 | /// Runs instructions received from the server. |
|
115 | /// Runs instructions received from the server. | |
116 | fn run_instructions( |
|
116 | fn run_instructions( | |
117 | mut self, |
|
117 | mut self, | |
118 | client: UnixClient, |
|
118 | client: UnixClient, | |
119 | instructions: Vec<Instruction>, |
|
119 | instructions: Vec<Instruction>, | |
120 | cnt: usize, |
|
120 | cnt: usize, | |
121 | ) -> io::Result<Loop<(Self, UnixClient), (Self, usize)>> { |
|
121 | ) -> io::Result<Loop<(Self, UnixClient), (Self, usize)>> { | |
122 | let mut reconnect = false; |
|
122 | let mut reconnect = false; | |
123 | for inst in instructions { |
|
123 | for inst in instructions { | |
124 | debug!("instruction: {:?}", inst); |
|
124 | debug!("instruction: {:?}", inst); | |
125 | match inst { |
|
125 | match inst { | |
126 | Instruction::Exit(_) => { |
|
126 | Instruction::Exit(_) => { | |
127 | // Just returns the current connection to run the |
|
127 | // Just returns the current connection to run the | |
128 | // unparsable command and report the error |
|
128 | // unparsable command and report the error | |
129 | return Ok(Loop::Break((self, client))); |
|
129 | return Ok(Loop::Break((self, client))); | |
130 | } |
|
130 | } | |
131 | Instruction::Reconnect => { |
|
131 | Instruction::Reconnect => { | |
132 | reconnect = true; |
|
132 | reconnect = true; | |
133 | } |
|
133 | } | |
134 | Instruction::Redirect(path) => { |
|
134 | Instruction::Redirect(path) => { | |
135 | if path.parent() != self.base_sock_path.parent() { |
|
135 | if path.parent() != self.base_sock_path.parent() { | |
136 | let msg = format!( |
|
136 | let msg = format!( | |
137 | "insecure redirect instruction from server: {}", |
|
137 | "insecure redirect instruction from server: {}", | |
138 | path.display() |
|
138 | path.display() | |
139 | ); |
|
139 | ); | |
140 | return Err(io::Error::new(io::ErrorKind::InvalidData, msg)); |
|
140 | return Err(io::Error::new(io::ErrorKind::InvalidData, msg)); | |
141 | } |
|
141 | } | |
142 | self.redirect_sock_path = Some(path); |
|
142 | self.redirect_sock_path = Some(path); | |
143 | reconnect = true; |
|
143 | reconnect = true; | |
144 | } |
|
144 | } | |
145 | Instruction::Unlink(path) => { |
|
145 | Instruction::Unlink(path) => { | |
146 | if path.parent() != self.base_sock_path.parent() { |
|
146 | if path.parent() != self.base_sock_path.parent() { | |
147 | let msg = format!( |
|
147 | let msg = format!( | |
148 | "insecure unlink instruction from server: {}", |
|
148 | "insecure unlink instruction from server: {}", | |
149 | path.display() |
|
149 | path.display() | |
150 | ); |
|
150 | ); | |
151 | return Err(io::Error::new(io::ErrorKind::InvalidData, msg)); |
|
151 | return Err(io::Error::new(io::ErrorKind::InvalidData, msg)); | |
152 | } |
|
152 | } | |
153 | fs::remove_file(path).unwrap_or(()); // may race |
|
153 | fs::remove_file(path).unwrap_or(()); // may race | |
154 | } |
|
154 | } | |
155 | } |
|
155 | } | |
156 | } |
|
156 | } | |
157 |
|
157 | |||
158 | if reconnect { |
|
158 | if reconnect { | |
159 | Ok(Loop::Continue((self, cnt + 1))) |
|
159 | Ok(Loop::Continue((self, cnt + 1))) | |
160 | } else { |
|
160 | } else { | |
161 | Ok(Loop::Break((self, client))) |
|
161 | Ok(Loop::Break((self, client))) | |
162 | } |
|
162 | } | |
163 | } |
|
163 | } | |
164 |
|
164 | |||
165 | /// Tries to connect to the existing server, or spawns new if not running. |
|
165 | /// Tries to connect to the existing server, or spawns new if not running. | |
166 | fn try_connect(self) -> impl Future<Item = (Self, UnixClient), Error = io::Error> { |
|
166 | fn try_connect(self) -> impl Future<Item = (Self, UnixClient), Error = io::Error> { | |
167 | let sock_path = self |
|
167 | let sock_path = self | |
168 | .redirect_sock_path |
|
168 | .redirect_sock_path | |
169 | .as_ref() |
|
169 | .as_ref() | |
170 | .unwrap_or(&self.base_sock_path) |
|
170 | .unwrap_or(&self.base_sock_path) | |
171 | .clone(); |
|
171 | .clone(); | |
172 | debug!("try connect to {}", sock_path.display()); |
|
172 | debug!("try connect to {}", sock_path.display()); | |
173 | UnixClient::connect(sock_path) |
|
173 | UnixClient::connect(sock_path) | |
174 | .then(|res| { |
|
174 | .then(|res| { | |
175 | match res { |
|
175 | match res { | |
176 | Ok(client) => Either::A(future::ok((self, client))), |
|
176 | Ok(client) => Either::A(future::ok((self, client))), | |
177 | Err(_) => { |
|
177 | Err(_) => { | |
178 | // Prevent us from being re-connected to the outdated |
|
178 | // Prevent us from being re-connected to the outdated | |
179 | // master server: We were told by the server to redirect |
|
179 | // master server: We were told by the server to redirect | |
180 | // to redirect_sock_path, which didn't work. We do not |
|
180 | // to redirect_sock_path, which didn't work. We do not | |
181 | // want to connect to the same master server again |
|
181 | // want to connect to the same master server again | |
182 | // because it would probably tell us the same thing. |
|
182 | // because it would probably tell us the same thing. | |
183 | if self.redirect_sock_path.is_some() { |
|
183 | if self.redirect_sock_path.is_some() { | |
184 | fs::remove_file(&self.base_sock_path).unwrap_or(()); |
|
184 | fs::remove_file(&self.base_sock_path).unwrap_or(()); | |
185 | // may race |
|
185 | // may race | |
186 | } |
|
186 | } | |
187 | Either::B(self.spawn_connect()) |
|
187 | Either::B(self.spawn_connect()) | |
188 | } |
|
188 | } | |
189 | } |
|
189 | } | |
190 | }) |
|
190 | }) | |
191 | .and_then(|(loc, client)| { |
|
191 | .and_then(|(loc, client)| { | |
192 | check_server_capabilities(client.server_spec())?; |
|
192 | check_server_capabilities(client.server_spec())?; | |
193 | Ok((loc, client)) |
|
193 | Ok((loc, client)) | |
194 | }) |
|
194 | }) | |
195 | .and_then(|(loc, client)| { |
|
195 | .and_then(|(loc, client)| { | |
196 | // It's purely optional, and the server might not support this command. |
|
196 | // It's purely optional, and the server might not support this command. | |
197 | if client.server_spec().capabilities.contains("setprocname") { |
|
197 | if client.server_spec().capabilities.contains("setprocname") { | |
198 | let fut = client |
|
198 | let fut = client | |
199 | .set_process_name(format!("chg[worker/{}]", loc.process_id)) |
|
199 | .set_process_name(format!("chg[worker/{}]", loc.process_id)) | |
200 | .map(|client| (loc, client)); |
|
200 | .map(|client| (loc, client)); | |
201 | Either::A(fut) |
|
201 | Either::A(fut) | |
202 | } else { |
|
202 | } else { | |
203 | Either::B(future::ok((loc, client))) |
|
203 | Either::B(future::ok((loc, client))) | |
204 | } |
|
204 | } | |
205 | }) |
|
205 | }) | |
206 | .and_then(|(loc, client)| { |
|
206 | .and_then(|(loc, client)| { | |
207 | client |
|
207 | client | |
208 | .set_current_dir(&loc.current_dir) |
|
208 | .set_current_dir(&loc.current_dir) | |
209 | .map(|client| (loc, client)) |
|
209 | .map(|client| (loc, client)) | |
210 | }) |
|
210 | }) | |
211 | .and_then(|(loc, client)| { |
|
211 | .and_then(|(loc, client)| { | |
212 | client |
|
212 | client | |
213 | .set_env_vars_os(loc.env_vars.iter().cloned()) |
|
213 | .set_env_vars_os(loc.env_vars.iter().cloned()) | |
214 | .map(|client| (loc, client)) |
|
214 | .map(|client| (loc, client)) | |
215 | }) |
|
215 | }) | |
216 | } |
|
216 | } | |
217 |
|
217 | |||
218 | /// Spawns new server process and connects to it. |
|
218 | /// Spawns new server process and connects to it. | |
219 | /// |
|
219 | /// | |
220 | /// The server will be spawned at the current working directory, then |
|
220 | /// The server will be spawned at the current working directory, then | |
221 | /// chdir to "/", so that the server will load configs from the target |
|
221 | /// chdir to "/", so that the server will load configs from the target | |
222 | /// repository. |
|
222 | /// repository. | |
223 | fn spawn_connect(self) -> impl Future<Item = (Self, UnixClient), Error = io::Error> { |
|
223 | fn spawn_connect(self) -> impl Future<Item = (Self, UnixClient), Error = io::Error> { | |
224 | let sock_path = self.temp_sock_path(); |
|
224 | let sock_path = self.temp_sock_path(); | |
225 | debug!("start cmdserver at {}", sock_path.display()); |
|
225 | debug!("start cmdserver at {}", sock_path.display()); | |
226 | Command::new(&self.hg_command) |
|
226 | Command::new(&self.hg_command) | |
227 | .arg("serve") |
|
227 | .arg("serve") | |
228 | .arg("--cmdserver") |
|
228 | .arg("--cmdserver") | |
229 | .arg("chgunix") |
|
229 | .arg("chgunix") | |
230 | .arg("--address") |
|
230 | .arg("--address") | |
231 | .arg(&sock_path) |
|
231 | .arg(&sock_path) | |
232 | .arg("--daemon-postexec") |
|
232 | .arg("--daemon-postexec") | |
233 | .arg("chdir:/") |
|
233 | .arg("chdir:/") | |
234 | .args(&self.hg_early_args) |
|
234 | .args(&self.hg_early_args) | |
235 | .current_dir(&self.current_dir) |
|
235 | .current_dir(&self.current_dir) | |
236 | .env_clear() |
|
236 | .env_clear() | |
237 | .envs(self.env_vars.iter().cloned()) |
|
237 | .envs(self.env_vars.iter().cloned()) | |
238 | .env("CHGINTERNALMARK", "") |
|
238 | .env("CHGINTERNALMARK", "") | |
239 |
.spawn |
|
239 | .spawn() | |
240 | .into_future() |
|
240 | .into_future() | |
241 | .and_then(|server| self.connect_spawned(server, sock_path)) |
|
241 | .and_then(|server| self.connect_spawned(server, sock_path)) | |
242 | .and_then(|(loc, client, sock_path)| { |
|
242 | .and_then(|(loc, client, sock_path)| { | |
243 | debug!( |
|
243 | debug!( | |
244 | "rename {} to {}", |
|
244 | "rename {} to {}", | |
245 | sock_path.display(), |
|
245 | sock_path.display(), | |
246 | loc.base_sock_path.display() |
|
246 | loc.base_sock_path.display() | |
247 | ); |
|
247 | ); | |
248 | fs::rename(&sock_path, &loc.base_sock_path)?; |
|
248 | fs::rename(&sock_path, &loc.base_sock_path)?; | |
249 | Ok((loc, client)) |
|
249 | Ok((loc, client)) | |
250 | }) |
|
250 | }) | |
251 | } |
|
251 | } | |
252 |
|
252 | |||
253 | /// Tries to connect to the just spawned server repeatedly until timeout |
|
253 | /// Tries to connect to the just spawned server repeatedly until timeout | |
254 | /// exceeded. |
|
254 | /// exceeded. | |
255 | fn connect_spawned( |
|
255 | fn connect_spawned( | |
256 | self, |
|
256 | self, | |
257 | server: Child, |
|
257 | server: Child, | |
258 | sock_path: PathBuf, |
|
258 | sock_path: PathBuf, | |
259 | ) -> impl Future<Item = (Self, UnixClient, PathBuf), Error = io::Error> { |
|
259 | ) -> impl Future<Item = (Self, UnixClient, PathBuf), Error = io::Error> { | |
260 | debug!("try connect to {} repeatedly", sock_path.display()); |
|
260 | debug!("try connect to {} repeatedly", sock_path.display()); | |
261 | let connect = future::loop_fn(sock_path, |sock_path| { |
|
261 | let connect = future::loop_fn(sock_path, |sock_path| { | |
262 | UnixClient::connect(sock_path.clone()).then(|res| { |
|
262 | UnixClient::connect(sock_path.clone()).then(|res| { | |
263 | match res { |
|
263 | match res { | |
264 | Ok(client) => Either::A(future::ok(Loop::Break((client, sock_path)))), |
|
264 | Ok(client) => Either::A(future::ok(Loop::Break((client, sock_path)))), | |
265 | Err(_) => { |
|
265 | Err(_) => { | |
266 | // try again with slight delay |
|
266 | // try again with slight delay | |
267 |
let fut = |
|
267 | let fut = time::delay_for(Duration::from_millis(10)) | |
268 | .map(|()| Loop::Continue(sock_path)) |
|
268 | .map(|()| Loop::Continue(sock_path)) | |
269 | .map_err(|err| io::Error::new(io::ErrorKind::Other, err)); |
|
269 | .map_err(|err| io::Error::new(io::ErrorKind::Other, err)); | |
270 | Either::B(fut) |
|
270 | Either::B(fut) | |
271 | } |
|
271 | } | |
272 | } |
|
272 | } | |
273 | }) |
|
273 | }) | |
274 | }); |
|
274 | }); | |
275 |
|
275 | |||
276 | // waits for either connection established or server failed to start |
|
276 | // waits for either connection established or server failed to start | |
277 | connect |
|
277 | connect | |
278 | .select2(server) |
|
278 | .select2(server) | |
279 | .map_err(|res| res.split().0) |
|
279 | .map_err(|res| res.split().0) | |
280 | .timeout(self.timeout) |
|
280 | .timeout(self.timeout) | |
281 | .map_err(|err| { |
|
281 | .map_err(|err| { | |
282 | err.into_inner().unwrap_or_else(|| { |
|
282 | err.into_inner().unwrap_or_else(|| { | |
283 | io::Error::new( |
|
283 | io::Error::new( | |
284 | io::ErrorKind::TimedOut, |
|
284 | io::ErrorKind::TimedOut, | |
285 | "timed out while connecting to server", |
|
285 | "timed out while connecting to server", | |
286 | ) |
|
286 | ) | |
287 | }) |
|
287 | }) | |
288 | }) |
|
288 | }) | |
289 | .and_then(|res| { |
|
289 | .and_then(|res| { | |
290 | match res { |
|
290 | match res { | |
291 | Either::A(((client, sock_path), server)) => { |
|
291 | Either::A(((client, sock_path), server)) => { | |
292 | server.forget(); // continue to run in background |
|
292 | server.forget(); // continue to run in background | |
293 | Ok((self, client, sock_path)) |
|
293 | Ok((self, client, sock_path)) | |
294 | } |
|
294 | } | |
295 | Either::B((st, _)) => Err(io::Error::new( |
|
295 | Either::B((st, _)) => Err(io::Error::new( | |
296 | io::ErrorKind::Other, |
|
296 | io::ErrorKind::Other, | |
297 | format!("server exited too early: {}", st), |
|
297 | format!("server exited too early: {}", st), | |
298 | )), |
|
298 | )), | |
299 | } |
|
299 | } | |
300 | }) |
|
300 | }) | |
301 | } |
|
301 | } | |
302 | } |
|
302 | } | |
303 |
|
303 | |||
304 | /// Determines the server socket to connect to. |
|
304 | /// Determines the server socket to connect to. | |
305 | /// |
|
305 | /// | |
306 | /// If no `$CHGSOCKNAME` is specified, the socket directory will be created |
|
306 | /// If no `$CHGSOCKNAME` is specified, the socket directory will be created | |
307 | /// as necessary. |
|
307 | /// as necessary. | |
308 | fn prepare_server_socket_path() -> io::Result<PathBuf> { |
|
308 | fn prepare_server_socket_path() -> io::Result<PathBuf> { | |
309 | if let Some(s) = env::var_os("CHGSOCKNAME") { |
|
309 | if let Some(s) = env::var_os("CHGSOCKNAME") { | |
310 | Ok(PathBuf::from(s)) |
|
310 | Ok(PathBuf::from(s)) | |
311 | } else { |
|
311 | } else { | |
312 | let mut path = default_server_socket_dir(); |
|
312 | let mut path = default_server_socket_dir(); | |
313 | create_secure_dir(&path)?; |
|
313 | create_secure_dir(&path)?; | |
314 | path.push("server"); |
|
314 | path.push("server"); | |
315 | Ok(path) |
|
315 | Ok(path) | |
316 | } |
|
316 | } | |
317 | } |
|
317 | } | |
318 |
|
318 | |||
319 | /// Determines the default server socket path as follows. |
|
319 | /// Determines the default server socket path as follows. | |
320 | /// |
|
320 | /// | |
321 | /// 1. `$XDG_RUNTIME_DIR/chg` |
|
321 | /// 1. `$XDG_RUNTIME_DIR/chg` | |
322 | /// 2. `$TMPDIR/chg$UID` |
|
322 | /// 2. `$TMPDIR/chg$UID` | |
323 | /// 3. `/tmp/chg$UID` |
|
323 | /// 3. `/tmp/chg$UID` | |
324 | pub fn default_server_socket_dir() -> PathBuf { |
|
324 | pub fn default_server_socket_dir() -> PathBuf { | |
325 | // XDG_RUNTIME_DIR should be ignored if it has an insufficient permission. |
|
325 | // XDG_RUNTIME_DIR should be ignored if it has an insufficient permission. | |
326 | // https://standards.freedesktop.org/basedir-spec/basedir-spec-latest.html |
|
326 | // https://standards.freedesktop.org/basedir-spec/basedir-spec-latest.html | |
327 | if let Some(Ok(s)) = env::var_os("XDG_RUNTIME_DIR").map(check_secure_dir) { |
|
327 | if let Some(Ok(s)) = env::var_os("XDG_RUNTIME_DIR").map(check_secure_dir) { | |
328 | let mut path = PathBuf::from(s); |
|
328 | let mut path = PathBuf::from(s); | |
329 | path.push("chg"); |
|
329 | path.push("chg"); | |
330 | path |
|
330 | path | |
331 | } else { |
|
331 | } else { | |
332 | let mut path = env::temp_dir(); |
|
332 | let mut path = env::temp_dir(); | |
333 | path.push(format!("chg{}", procutil::get_effective_uid())); |
|
333 | path.push(format!("chg{}", procutil::get_effective_uid())); | |
334 | path |
|
334 | path | |
335 | } |
|
335 | } | |
336 | } |
|
336 | } | |
337 |
|
337 | |||
338 | /// Determines the default hg command. |
|
338 | /// Determines the default hg command. | |
339 | pub fn default_hg_command() -> OsString { |
|
339 | pub fn default_hg_command() -> OsString { | |
340 | // TODO: maybe allow embedding the path at compile time (or load from hgrc) |
|
340 | // TODO: maybe allow embedding the path at compile time (or load from hgrc) | |
341 | env::var_os("CHGHG") |
|
341 | env::var_os("CHGHG") | |
342 | .or(env::var_os("HG")) |
|
342 | .or(env::var_os("HG")) | |
343 | .unwrap_or(OsStr::new("hg").to_owned()) |
|
343 | .unwrap_or(OsStr::new("hg").to_owned()) | |
344 | } |
|
344 | } | |
345 |
|
345 | |||
346 | fn default_timeout() -> Duration { |
|
346 | fn default_timeout() -> Duration { | |
347 | let secs = env::var("CHGTIMEOUT") |
|
347 | let secs = env::var("CHGTIMEOUT") | |
348 | .ok() |
|
348 | .ok() | |
349 | .and_then(|s| s.parse().ok()) |
|
349 | .and_then(|s| s.parse().ok()) | |
350 | .unwrap_or(60); |
|
350 | .unwrap_or(60); | |
351 | Duration::from_secs(secs) |
|
351 | Duration::from_secs(secs) | |
352 | } |
|
352 | } | |
353 |
|
353 | |||
354 | /// Creates a directory which the other users cannot access to. |
|
354 | /// Creates a directory which the other users cannot access to. | |
355 | /// |
|
355 | /// | |
356 | /// If the directory already exists, tests its permission. |
|
356 | /// If the directory already exists, tests its permission. | |
357 | fn create_secure_dir(path: impl AsRef<Path>) -> io::Result<()> { |
|
357 | fn create_secure_dir(path: impl AsRef<Path>) -> io::Result<()> { | |
358 | DirBuilder::new() |
|
358 | DirBuilder::new() | |
359 | .mode(0o700) |
|
359 | .mode(0o700) | |
360 | .create(path.as_ref()) |
|
360 | .create(path.as_ref()) | |
361 | .or_else(|err| { |
|
361 | .or_else(|err| { | |
362 | if err.kind() == io::ErrorKind::AlreadyExists { |
|
362 | if err.kind() == io::ErrorKind::AlreadyExists { | |
363 | check_secure_dir(path).map(|_| ()) |
|
363 | check_secure_dir(path).map(|_| ()) | |
364 | } else { |
|
364 | } else { | |
365 | Err(err) |
|
365 | Err(err) | |
366 | } |
|
366 | } | |
367 | }) |
|
367 | }) | |
368 | } |
|
368 | } | |
369 |
|
369 | |||
370 | fn check_secure_dir<P>(path: P) -> io::Result<P> |
|
370 | fn check_secure_dir<P>(path: P) -> io::Result<P> | |
371 | where |
|
371 | where | |
372 | P: AsRef<Path>, |
|
372 | P: AsRef<Path>, | |
373 | { |
|
373 | { | |
374 | let a = fs::symlink_metadata(path.as_ref())?; |
|
374 | let a = fs::symlink_metadata(path.as_ref())?; | |
375 | if a.is_dir() && a.uid() == procutil::get_effective_uid() && (a.mode() & 0o777) == 0o700 { |
|
375 | if a.is_dir() && a.uid() == procutil::get_effective_uid() && (a.mode() & 0o777) == 0o700 { | |
376 | Ok(path) |
|
376 | Ok(path) | |
377 | } else { |
|
377 | } else { | |
378 | Err(io::Error::new(io::ErrorKind::Other, "insecure directory")) |
|
378 | Err(io::Error::new(io::ErrorKind::Other, "insecure directory")) | |
379 | } |
|
379 | } | |
380 | } |
|
380 | } | |
381 |
|
381 | |||
382 | fn check_server_capabilities(spec: &ServerSpec) -> io::Result<()> { |
|
382 | fn check_server_capabilities(spec: &ServerSpec) -> io::Result<()> { | |
383 | let unsupported: Vec<_> = REQUIRED_SERVER_CAPABILITIES |
|
383 | let unsupported: Vec<_> = REQUIRED_SERVER_CAPABILITIES | |
384 | .iter() |
|
384 | .iter() | |
385 | .cloned() |
|
385 | .cloned() | |
386 | .filter(|&s| !spec.capabilities.contains(s)) |
|
386 | .filter(|&s| !spec.capabilities.contains(s)) | |
387 | .collect(); |
|
387 | .collect(); | |
388 | if unsupported.is_empty() { |
|
388 | if unsupported.is_empty() { | |
389 | Ok(()) |
|
389 | Ok(()) | |
390 | } else { |
|
390 | } else { | |
391 | let msg = format!( |
|
391 | let msg = format!( | |
392 | "insufficient server capabilities: {}", |
|
392 | "insufficient server capabilities: {}", | |
393 | unsupported.join(", ") |
|
393 | unsupported.join(", ") | |
394 | ); |
|
394 | ); | |
395 | Err(io::Error::new(io::ErrorKind::Other, msg)) |
|
395 | Err(io::Error::new(io::ErrorKind::Other, msg)) | |
396 | } |
|
396 | } | |
397 | } |
|
397 | } | |
398 |
|
398 | |||
399 | /// Collects arguments which need to be passed to the server at start. |
|
399 | /// Collects arguments which need to be passed to the server at start. | |
400 | pub fn collect_early_args(args: impl IntoIterator<Item = impl AsRef<OsStr>>) -> Vec<OsString> { |
|
400 | pub fn collect_early_args(args: impl IntoIterator<Item = impl AsRef<OsStr>>) -> Vec<OsString> { | |
401 | let mut args_iter = args.into_iter(); |
|
401 | let mut args_iter = args.into_iter(); | |
402 | let mut early_args = Vec::new(); |
|
402 | let mut early_args = Vec::new(); | |
403 | while let Some(arg) = args_iter.next() { |
|
403 | while let Some(arg) = args_iter.next() { | |
404 | let argb = arg.as_ref().as_bytes(); |
|
404 | let argb = arg.as_ref().as_bytes(); | |
405 | if argb == b"--" { |
|
405 | if argb == b"--" { | |
406 | break; |
|
406 | break; | |
407 | } else if argb.starts_with(b"--") { |
|
407 | } else if argb.starts_with(b"--") { | |
408 | let mut split = argb[2..].splitn(2, |&c| c == b'='); |
|
408 | let mut split = argb[2..].splitn(2, |&c| c == b'='); | |
409 | match split.next().unwrap() { |
|
409 | match split.next().unwrap() { | |
410 | b"traceback" => { |
|
410 | b"traceback" => { | |
411 | if split.next().is_none() { |
|
411 | if split.next().is_none() { | |
412 | early_args.push(arg.as_ref().to_owned()); |
|
412 | early_args.push(arg.as_ref().to_owned()); | |
413 | } |
|
413 | } | |
414 | } |
|
414 | } | |
415 | b"config" | b"cwd" | b"repo" | b"repository" => { |
|
415 | b"config" | b"cwd" | b"repo" | b"repository" => { | |
416 | if split.next().is_some() { |
|
416 | if split.next().is_some() { | |
417 | // --<flag>=<val> |
|
417 | // --<flag>=<val> | |
418 | early_args.push(arg.as_ref().to_owned()); |
|
418 | early_args.push(arg.as_ref().to_owned()); | |
419 | } else { |
|
419 | } else { | |
420 | // --<flag> <val> |
|
420 | // --<flag> <val> | |
421 | args_iter.next().map(|val| { |
|
421 | args_iter.next().map(|val| { | |
422 | early_args.push(arg.as_ref().to_owned()); |
|
422 | early_args.push(arg.as_ref().to_owned()); | |
423 | early_args.push(val.as_ref().to_owned()); |
|
423 | early_args.push(val.as_ref().to_owned()); | |
424 | }); |
|
424 | }); | |
425 | } |
|
425 | } | |
426 | } |
|
426 | } | |
427 | _ => {} |
|
427 | _ => {} | |
428 | } |
|
428 | } | |
429 | } else if argb.starts_with(b"-R") { |
|
429 | } else if argb.starts_with(b"-R") { | |
430 | if argb.len() > 2 { |
|
430 | if argb.len() > 2 { | |
431 | // -R<val> |
|
431 | // -R<val> | |
432 | early_args.push(arg.as_ref().to_owned()); |
|
432 | early_args.push(arg.as_ref().to_owned()); | |
433 | } else { |
|
433 | } else { | |
434 | // -R <val> |
|
434 | // -R <val> | |
435 | args_iter.next().map(|val| { |
|
435 | args_iter.next().map(|val| { | |
436 | early_args.push(arg.as_ref().to_owned()); |
|
436 | early_args.push(arg.as_ref().to_owned()); | |
437 | early_args.push(val.as_ref().to_owned()); |
|
437 | early_args.push(val.as_ref().to_owned()); | |
438 | }); |
|
438 | }); | |
439 | } |
|
439 | } | |
440 | } |
|
440 | } | |
441 | } |
|
441 | } | |
442 |
|
442 | |||
443 | early_args |
|
443 | early_args | |
444 | } |
|
444 | } | |
445 |
|
445 | |||
446 | #[cfg(test)] |
|
446 | #[cfg(test)] | |
447 | mod tests { |
|
447 | mod tests { | |
448 | use super::*; |
|
448 | use super::*; | |
449 |
|
449 | |||
450 | #[test] |
|
450 | #[test] | |
451 | fn collect_early_args_some() { |
|
451 | fn collect_early_args_some() { | |
452 | assert!(collect_early_args(&[] as &[&OsStr]).is_empty()); |
|
452 | assert!(collect_early_args(&[] as &[&OsStr]).is_empty()); | |
453 | assert!(collect_early_args(&["log"]).is_empty()); |
|
453 | assert!(collect_early_args(&["log"]).is_empty()); | |
454 | assert_eq!( |
|
454 | assert_eq!( | |
455 | collect_early_args(&["log", "-Ra", "foo"]), |
|
455 | collect_early_args(&["log", "-Ra", "foo"]), | |
456 | os_string_vec_from(&[b"-Ra"]) |
|
456 | os_string_vec_from(&[b"-Ra"]) | |
457 | ); |
|
457 | ); | |
458 | assert_eq!( |
|
458 | assert_eq!( | |
459 | collect_early_args(&["log", "-R", "repo", "", "--traceback", "a"]), |
|
459 | collect_early_args(&["log", "-R", "repo", "", "--traceback", "a"]), | |
460 | os_string_vec_from(&[b"-R", b"repo", b"--traceback"]) |
|
460 | os_string_vec_from(&[b"-R", b"repo", b"--traceback"]) | |
461 | ); |
|
461 | ); | |
462 | assert_eq!( |
|
462 | assert_eq!( | |
463 | collect_early_args(&["log", "--config", "diff.git=1", "-q"]), |
|
463 | collect_early_args(&["log", "--config", "diff.git=1", "-q"]), | |
464 | os_string_vec_from(&[b"--config", b"diff.git=1"]) |
|
464 | os_string_vec_from(&[b"--config", b"diff.git=1"]) | |
465 | ); |
|
465 | ); | |
466 | assert_eq!( |
|
466 | assert_eq!( | |
467 | collect_early_args(&["--cwd=..", "--repository", "r", "log"]), |
|
467 | collect_early_args(&["--cwd=..", "--repository", "r", "log"]), | |
468 | os_string_vec_from(&[b"--cwd=..", b"--repository", b"r"]) |
|
468 | os_string_vec_from(&[b"--cwd=..", b"--repository", b"r"]) | |
469 | ); |
|
469 | ); | |
470 | assert_eq!( |
|
470 | assert_eq!( | |
471 | collect_early_args(&["log", "--repo=r", "--repos", "a"]), |
|
471 | collect_early_args(&["log", "--repo=r", "--repos", "a"]), | |
472 | os_string_vec_from(&[b"--repo=r"]) |
|
472 | os_string_vec_from(&[b"--repo=r"]) | |
473 | ); |
|
473 | ); | |
474 | } |
|
474 | } | |
475 |
|
475 | |||
476 | #[test] |
|
476 | #[test] | |
477 | fn collect_early_args_orphaned() { |
|
477 | fn collect_early_args_orphaned() { | |
478 | assert!(collect_early_args(&["log", "-R"]).is_empty()); |
|
478 | assert!(collect_early_args(&["log", "-R"]).is_empty()); | |
479 | assert!(collect_early_args(&["log", "--config"]).is_empty()); |
|
479 | assert!(collect_early_args(&["log", "--config"]).is_empty()); | |
480 | } |
|
480 | } | |
481 |
|
481 | |||
482 | #[test] |
|
482 | #[test] | |
483 | fn collect_early_args_unwanted_value() { |
|
483 | fn collect_early_args_unwanted_value() { | |
484 | assert!(collect_early_args(&["log", "--traceback="]).is_empty()); |
|
484 | assert!(collect_early_args(&["log", "--traceback="]).is_empty()); | |
485 | } |
|
485 | } | |
486 |
|
486 | |||
487 | fn os_string_vec_from(v: &[&[u8]]) -> Vec<OsString> { |
|
487 | fn os_string_vec_from(v: &[&[u8]]) -> Vec<OsString> { | |
488 | v.iter().map(|s| OsStr::from_bytes(s).to_owned()).collect() |
|
488 | v.iter().map(|s| OsStr::from_bytes(s).to_owned()).collect() | |
489 | } |
|
489 | } | |
490 | } |
|
490 | } |
@@ -1,88 +1,86 | |||||
1 | // Copyright 2018 Yuya Nishihara <yuya@tcha.org> |
|
1 | // Copyright 2018 Yuya Nishihara <yuya@tcha.org> | |
2 | // |
|
2 | // | |
3 | // This software may be used and distributed according to the terms of the |
|
3 | // This software may be used and distributed according to the terms of the | |
4 | // GNU General Public License version 2 or any later version. |
|
4 | // GNU General Public License version 2 or any later version. | |
5 |
|
5 | |||
6 | use futures::future::IntoFuture; |
|
6 | use futures::future::IntoFuture; | |
7 | use futures::Future; |
|
7 | use futures::Future; | |
8 | use std::io; |
|
8 | use std::io; | |
9 | use std::os::unix::io::AsRawFd; |
|
9 | use std::os::unix::io::AsRawFd; | |
10 | use std::os::unix::process::ExitStatusExt; |
|
10 | use std::os::unix::process::ExitStatusExt; | |
11 |
use std::process:: |
|
11 | use std::process::Stdio; | |
12 | use tokio; |
|
12 | use tokio; | |
13 |
use tokio |
|
13 | use tokio::process::{ChildStdin, Command}; | |
14 |
|
14 | |||
15 | use crate::message::CommandSpec; |
|
15 | use crate::message::CommandSpec; | |
16 | use crate::procutil; |
|
16 | use crate::procutil; | |
17 |
|
17 | |||
18 | /// Callback to process shell command requests received from server. |
|
18 | /// Callback to process shell command requests received from server. | |
19 | pub trait SystemHandler: Sized { |
|
19 | pub trait SystemHandler: Sized { | |
20 | type PagerStdin: AsRawFd; |
|
20 | type PagerStdin: AsRawFd; | |
21 | type SpawnPagerResult: IntoFuture<Item = (Self, Self::PagerStdin), Error = io::Error>; |
|
21 | type SpawnPagerResult: IntoFuture<Item = (Self, Self::PagerStdin), Error = io::Error>; | |
22 | type RunSystemResult: IntoFuture<Item = (Self, i32), Error = io::Error>; |
|
22 | type RunSystemResult: IntoFuture<Item = (Self, i32), Error = io::Error>; | |
23 |
|
23 | |||
24 | /// Handles pager command request. |
|
24 | /// Handles pager command request. | |
25 | /// |
|
25 | /// | |
26 | /// Returns the pipe to be attached to the server if the pager is spawned. |
|
26 | /// Returns the pipe to be attached to the server if the pager is spawned. | |
27 | fn spawn_pager(self, spec: CommandSpec) -> Self::SpawnPagerResult; |
|
27 | fn spawn_pager(self, spec: CommandSpec) -> Self::SpawnPagerResult; | |
28 |
|
28 | |||
29 | /// Handles system command request. |
|
29 | /// Handles system command request. | |
30 | /// |
|
30 | /// | |
31 | /// Returns command exit code (positive) or signal number (negative). |
|
31 | /// Returns command exit code (positive) or signal number (negative). | |
32 | fn run_system(self, spec: CommandSpec) -> Self::RunSystemResult; |
|
32 | fn run_system(self, spec: CommandSpec) -> Self::RunSystemResult; | |
33 | } |
|
33 | } | |
34 |
|
34 | |||
35 | /// Default cHg implementation to process requests received from server. |
|
35 | /// Default cHg implementation to process requests received from server. | |
36 | pub struct ChgUiHandler {} |
|
36 | pub struct ChgUiHandler {} | |
37 |
|
37 | |||
38 | impl ChgUiHandler { |
|
38 | impl ChgUiHandler { | |
39 | pub fn new() -> ChgUiHandler { |
|
39 | pub fn new() -> ChgUiHandler { | |
40 | ChgUiHandler {} |
|
40 | ChgUiHandler {} | |
41 | } |
|
41 | } | |
42 | } |
|
42 | } | |
43 |
|
43 | |||
44 | impl SystemHandler for ChgUiHandler { |
|
44 | impl SystemHandler for ChgUiHandler { | |
45 | type PagerStdin = ChildStdin; |
|
45 | type PagerStdin = ChildStdin; | |
46 | type SpawnPagerResult = io::Result<(Self, Self::PagerStdin)>; |
|
46 | type SpawnPagerResult = io::Result<(Self, Self::PagerStdin)>; | |
47 | type RunSystemResult = Box<dyn Future<Item = (Self, i32), Error = io::Error> + Send>; |
|
47 | type RunSystemResult = Box<dyn Future<Item = (Self, i32), Error = io::Error> + Send>; | |
48 |
|
48 | |||
49 | fn spawn_pager(self, spec: CommandSpec) -> Self::SpawnPagerResult { |
|
49 | fn spawn_pager(self, spec: CommandSpec) -> Self::SpawnPagerResult { | |
50 | let mut pager = new_shell_command(&spec) |
|
50 | let mut pager = new_shell_command(&spec).stdin(Stdio::piped()).spawn()?; | |
51 | .stdin(Stdio::piped()) |
|
51 | let pin = pager.stdin.take().unwrap(); | |
52 | .spawn_async()?; |
|
|||
53 | let pin = pager.stdin().take().unwrap(); |
|
|||
54 | procutil::set_blocking_fd(pin.as_raw_fd())?; |
|
52 | procutil::set_blocking_fd(pin.as_raw_fd())?; | |
55 | // TODO: if pager exits, notify the server with SIGPIPE immediately. |
|
53 | // TODO: if pager exits, notify the server with SIGPIPE immediately. | |
56 | // otherwise the server won't get SIGPIPE if it does not write |
|
54 | // otherwise the server won't get SIGPIPE if it does not write | |
57 | // anything. (issue5278) |
|
55 | // anything. (issue5278) | |
58 | // kill(peerpid, SIGPIPE); |
|
56 | // kill(peerpid, SIGPIPE); | |
59 | tokio::spawn(pager.map(|_| ()).map_err(|_| ())); // just ignore errors |
|
57 | tokio::spawn(pager.map(|_| ()).map_err(|_| ())); // just ignore errors | |
60 | Ok((self, pin)) |
|
58 | Ok((self, pin)) | |
61 | } |
|
59 | } | |
62 |
|
60 | |||
63 | fn run_system(self, spec: CommandSpec) -> Self::RunSystemResult { |
|
61 | fn run_system(self, spec: CommandSpec) -> Self::RunSystemResult { | |
64 | let fut = new_shell_command(&spec) |
|
62 | let fut = new_shell_command(&spec) | |
65 |
.spawn |
|
63 | .spawn() | |
66 | .into_future() |
|
64 | .into_future() | |
67 | .flatten() |
|
65 | .flatten() | |
68 | .map(|status| { |
|
66 | .map(|status| { | |
69 | let code = status |
|
67 | let code = status | |
70 | .code() |
|
68 | .code() | |
71 | .or_else(|| status.signal().map(|n| -n)) |
|
69 | .or_else(|| status.signal().map(|n| -n)) | |
72 | .expect("either exit code or signal should be set"); |
|
70 | .expect("either exit code or signal should be set"); | |
73 | (self, code) |
|
71 | (self, code) | |
74 | }); |
|
72 | }); | |
75 | Box::new(fut) |
|
73 | Box::new(fut) | |
76 | } |
|
74 | } | |
77 | } |
|
75 | } | |
78 |
|
76 | |||
79 | fn new_shell_command(spec: &CommandSpec) -> Command { |
|
77 | fn new_shell_command(spec: &CommandSpec) -> Command { | |
80 | let mut builder = Command::new("/bin/sh"); |
|
78 | let mut builder = Command::new("/bin/sh"); | |
81 | builder |
|
79 | builder | |
82 | .arg("-c") |
|
80 | .arg("-c") | |
83 | .arg(&spec.command) |
|
81 | .arg(&spec.command) | |
84 | .current_dir(&spec.current_dir) |
|
82 | .current_dir(&spec.current_dir) | |
85 | .env_clear() |
|
83 | .env_clear() | |
86 | .envs(spec.envs.iter().cloned()); |
|
84 | .envs(spec.envs.iter().cloned()); | |
87 | builder |
|
85 | builder | |
88 | } |
|
86 | } |
General Comments 0
You need to be logged in to leave comments.
Login now