author | Yuya Nishihara <yuya@tcha.org> |
Fri, 10 Apr 2020 23:26:36 +0900 | |
changeset 44852 | d6f706929120 |
parent 44847 | e9e44e61042b |
child 45623 | 426294d06ddc |
permissions | -rw-r--r-- |
39978
74da9d999cd7
rust-chg: add Client extensions to run cHg-specific requests
Yuya Nishihara <yuya@tcha.org>
parents:
diff
changeset
|
1 |
// Copyright 2018 Yuya Nishihara <yuya@tcha.org> |
74da9d999cd7
rust-chg: add Client extensions to run cHg-specific requests
Yuya Nishihara <yuya@tcha.org>
parents:
diff
changeset
|
2 |
// |
74da9d999cd7
rust-chg: add Client extensions to run cHg-specific requests
Yuya Nishihara <yuya@tcha.org>
parents:
diff
changeset
|
3 |
// This software may be used and distributed according to the terms of the |
74da9d999cd7
rust-chg: add Client extensions to run cHg-specific requests
Yuya Nishihara <yuya@tcha.org>
parents:
diff
changeset
|
4 |
// GNU General Public License version 2 or any later version. |
74da9d999cd7
rust-chg: add Client extensions to run cHg-specific requests
Yuya Nishihara <yuya@tcha.org>
parents:
diff
changeset
|
5 |
|
74da9d999cd7
rust-chg: add Client extensions to run cHg-specific requests
Yuya Nishihara <yuya@tcha.org>
parents:
diff
changeset
|
6 |
//! cHg extensions to command server client. |
74da9d999cd7
rust-chg: add Client extensions to run cHg-specific requests
Yuya Nishihara <yuya@tcha.org>
parents:
diff
changeset
|
7 |
|
44852
d6f706929120
rust-chg: reimplement ChgClientExt as ChgClient wrapper
Yuya Nishihara <yuya@tcha.org>
parents:
44847
diff
changeset
|
8 |
use bytes::{BufMut, BytesMut}; |
39978
74da9d999cd7
rust-chg: add Client extensions to run cHg-specific requests
Yuya Nishihara <yuya@tcha.org>
parents:
diff
changeset
|
9 |
use std::ffi::OsStr; |
44681
43513444bb88
rust-chg: add interface to run "validate" request
Yuya Nishihara <yuya@tcha.org>
parents:
44676
diff
changeset
|
10 |
use std::io; |
44684
065048e66f32
rust-chg: send client side umask to server
Yuya Nishihara <yuya@tcha.org>
parents:
44681
diff
changeset
|
11 |
use std::mem; |
39979
045ea159418d
rust-chg: add interface to chdir the server
Yuya Nishihara <yuya@tcha.org>
parents:
39978
diff
changeset
|
12 |
use std::os::unix::ffi::OsStrExt; |
39978
74da9d999cd7
rust-chg: add Client extensions to run cHg-specific requests
Yuya Nishihara <yuya@tcha.org>
parents:
diff
changeset
|
13 |
use std::os::unix::io::AsRawFd; |
39979
045ea159418d
rust-chg: add interface to chdir the server
Yuya Nishihara <yuya@tcha.org>
parents:
39978
diff
changeset
|
14 |
use std::path::Path; |
44852
d6f706929120
rust-chg: reimplement ChgClientExt as ChgClient wrapper
Yuya Nishihara <yuya@tcha.org>
parents:
44847
diff
changeset
|
15 |
use tokio_hglib::UnixClient; |
39978
74da9d999cd7
rust-chg: add Client extensions to run cHg-specific requests
Yuya Nishihara <yuya@tcha.org>
parents:
diff
changeset
|
16 |
|
44852
d6f706929120
rust-chg: reimplement ChgClientExt as ChgClient wrapper
Yuya Nishihara <yuya@tcha.org>
parents:
44847
diff
changeset
|
17 |
use crate::attachio; |
d6f706929120
rust-chg: reimplement ChgClientExt as ChgClient wrapper
Yuya Nishihara <yuya@tcha.org>
parents:
44847
diff
changeset
|
18 |
use crate::message::{self, Instruction, ServerSpec}; |
d6f706929120
rust-chg: reimplement ChgClientExt as ChgClient wrapper
Yuya Nishihara <yuya@tcha.org>
parents:
44847
diff
changeset
|
19 |
use crate::runcommand; |
44690
6bef9d43cc55
rust-chg: use "crate::" to import local modules
Yuya Nishihara <yuya@tcha.org>
parents:
44685
diff
changeset
|
20 |
use crate::uihandler::SystemHandler; |
39978
74da9d999cd7
rust-chg: add Client extensions to run cHg-specific requests
Yuya Nishihara <yuya@tcha.org>
parents:
diff
changeset
|
21 |
|
44852
d6f706929120
rust-chg: reimplement ChgClientExt as ChgClient wrapper
Yuya Nishihara <yuya@tcha.org>
parents:
44847
diff
changeset
|
22 |
/// Command-server client that also supports cHg extensions. |
d6f706929120
rust-chg: reimplement ChgClientExt as ChgClient wrapper
Yuya Nishihara <yuya@tcha.org>
parents:
44847
diff
changeset
|
23 |
pub struct ChgClient { |
d6f706929120
rust-chg: reimplement ChgClientExt as ChgClient wrapper
Yuya Nishihara <yuya@tcha.org>
parents:
44847
diff
changeset
|
24 |
client: UnixClient, |
d6f706929120
rust-chg: reimplement ChgClientExt as ChgClient wrapper
Yuya Nishihara <yuya@tcha.org>
parents:
44847
diff
changeset
|
25 |
} |
d6f706929120
rust-chg: reimplement ChgClientExt as ChgClient wrapper
Yuya Nishihara <yuya@tcha.org>
parents:
44847
diff
changeset
|
26 |
|
d6f706929120
rust-chg: reimplement ChgClientExt as ChgClient wrapper
Yuya Nishihara <yuya@tcha.org>
parents:
44847
diff
changeset
|
27 |
impl ChgClient { |
d6f706929120
rust-chg: reimplement ChgClientExt as ChgClient wrapper
Yuya Nishihara <yuya@tcha.org>
parents:
44847
diff
changeset
|
28 |
/// Connects to a command server listening at the specified socket path. |
d6f706929120
rust-chg: reimplement ChgClientExt as ChgClient wrapper
Yuya Nishihara <yuya@tcha.org>
parents:
44847
diff
changeset
|
29 |
pub async fn connect(path: impl AsRef<Path>) -> io::Result<Self> { |
d6f706929120
rust-chg: reimplement ChgClientExt as ChgClient wrapper
Yuya Nishihara <yuya@tcha.org>
parents:
44847
diff
changeset
|
30 |
let client = UnixClient::connect(path).await?; |
d6f706929120
rust-chg: reimplement ChgClientExt as ChgClient wrapper
Yuya Nishihara <yuya@tcha.org>
parents:
44847
diff
changeset
|
31 |
Ok(ChgClient { client }) |
d6f706929120
rust-chg: reimplement ChgClientExt as ChgClient wrapper
Yuya Nishihara <yuya@tcha.org>
parents:
44847
diff
changeset
|
32 |
} |
d6f706929120
rust-chg: reimplement ChgClientExt as ChgClient wrapper
Yuya Nishihara <yuya@tcha.org>
parents:
44847
diff
changeset
|
33 |
|
d6f706929120
rust-chg: reimplement ChgClientExt as ChgClient wrapper
Yuya Nishihara <yuya@tcha.org>
parents:
44847
diff
changeset
|
34 |
/// Server capabilities, encoding, etc. |
d6f706929120
rust-chg: reimplement ChgClientExt as ChgClient wrapper
Yuya Nishihara <yuya@tcha.org>
parents:
44847
diff
changeset
|
35 |
pub fn server_spec(&self) -> &ServerSpec { |
d6f706929120
rust-chg: reimplement ChgClientExt as ChgClient wrapper
Yuya Nishihara <yuya@tcha.org>
parents:
44847
diff
changeset
|
36 |
self.client.server_spec() |
d6f706929120
rust-chg: reimplement ChgClientExt as ChgClient wrapper
Yuya Nishihara <yuya@tcha.org>
parents:
44847
diff
changeset
|
37 |
} |
d6f706929120
rust-chg: reimplement ChgClientExt as ChgClient wrapper
Yuya Nishihara <yuya@tcha.org>
parents:
44847
diff
changeset
|
38 |
|
39978
74da9d999cd7
rust-chg: add Client extensions to run cHg-specific requests
Yuya Nishihara <yuya@tcha.org>
parents:
diff
changeset
|
39 |
/// Attaches the client file descriptors to the server. |
44852
d6f706929120
rust-chg: reimplement ChgClientExt as ChgClient wrapper
Yuya Nishihara <yuya@tcha.org>
parents:
44847
diff
changeset
|
40 |
pub async fn attach_io( |
d6f706929120
rust-chg: reimplement ChgClientExt as ChgClient wrapper
Yuya Nishihara <yuya@tcha.org>
parents:
44847
diff
changeset
|
41 |
&mut self, |
d6f706929120
rust-chg: reimplement ChgClientExt as ChgClient wrapper
Yuya Nishihara <yuya@tcha.org>
parents:
44847
diff
changeset
|
42 |
stdin: &impl AsRawFd, |
d6f706929120
rust-chg: reimplement ChgClientExt as ChgClient wrapper
Yuya Nishihara <yuya@tcha.org>
parents:
44847
diff
changeset
|
43 |
stdout: &impl AsRawFd, |
d6f706929120
rust-chg: reimplement ChgClientExt as ChgClient wrapper
Yuya Nishihara <yuya@tcha.org>
parents:
44847
diff
changeset
|
44 |
stderr: &impl AsRawFd, |
d6f706929120
rust-chg: reimplement ChgClientExt as ChgClient wrapper
Yuya Nishihara <yuya@tcha.org>
parents:
44847
diff
changeset
|
45 |
) -> io::Result<()> { |
d6f706929120
rust-chg: reimplement ChgClientExt as ChgClient wrapper
Yuya Nishihara <yuya@tcha.org>
parents:
44847
diff
changeset
|
46 |
attachio::attach_io(self.client.borrow_protocol_mut(), stdin, stdout, stderr).await |
d6f706929120
rust-chg: reimplement ChgClientExt as ChgClient wrapper
Yuya Nishihara <yuya@tcha.org>
parents:
44847
diff
changeset
|
47 |
} |
39978
74da9d999cd7
rust-chg: add Client extensions to run cHg-specific requests
Yuya Nishihara <yuya@tcha.org>
parents:
diff
changeset
|
48 |
|
39979
045ea159418d
rust-chg: add interface to chdir the server
Yuya Nishihara <yuya@tcha.org>
parents:
39978
diff
changeset
|
49 |
/// Changes the working directory of the server. |
44852
d6f706929120
rust-chg: reimplement ChgClientExt as ChgClient wrapper
Yuya Nishihara <yuya@tcha.org>
parents:
44847
diff
changeset
|
50 |
pub async fn set_current_dir(&mut self, dir: impl AsRef<Path>) -> io::Result<()> { |
d6f706929120
rust-chg: reimplement ChgClientExt as ChgClient wrapper
Yuya Nishihara <yuya@tcha.org>
parents:
44847
diff
changeset
|
51 |
let dir_bytes = dir.as_ref().as_os_str().as_bytes().to_owned(); |
d6f706929120
rust-chg: reimplement ChgClientExt as ChgClient wrapper
Yuya Nishihara <yuya@tcha.org>
parents:
44847
diff
changeset
|
52 |
self.client |
d6f706929120
rust-chg: reimplement ChgClientExt as ChgClient wrapper
Yuya Nishihara <yuya@tcha.org>
parents:
44847
diff
changeset
|
53 |
.borrow_protocol_mut() |
d6f706929120
rust-chg: reimplement ChgClientExt as ChgClient wrapper
Yuya Nishihara <yuya@tcha.org>
parents:
44847
diff
changeset
|
54 |
.send_command_with_args("chdir", dir_bytes) |
d6f706929120
rust-chg: reimplement ChgClientExt as ChgClient wrapper
Yuya Nishihara <yuya@tcha.org>
parents:
44847
diff
changeset
|
55 |
.await |
d6f706929120
rust-chg: reimplement ChgClientExt as ChgClient wrapper
Yuya Nishihara <yuya@tcha.org>
parents:
44847
diff
changeset
|
56 |
} |
39979
045ea159418d
rust-chg: add interface to chdir the server
Yuya Nishihara <yuya@tcha.org>
parents:
39978
diff
changeset
|
57 |
|
44676
97e6d435ff7e
rust-chg: send client-side environment variables to server
Yuya Nishihara <yuya@tcha.org>
parents:
43836
diff
changeset
|
58 |
/// Updates the environment variables of the server. |
44852
d6f706929120
rust-chg: reimplement ChgClientExt as ChgClient wrapper
Yuya Nishihara <yuya@tcha.org>
parents:
44847
diff
changeset
|
59 |
pub async fn set_env_vars_os( |
d6f706929120
rust-chg: reimplement ChgClientExt as ChgClient wrapper
Yuya Nishihara <yuya@tcha.org>
parents:
44847
diff
changeset
|
60 |
&mut self, |
44693
61fda2dbc522
rust-chg: leverage impl trait at argument position
Yuya Nishihara <yuya@tcha.org>
parents:
44690
diff
changeset
|
61 |
vars: impl IntoIterator<Item = (impl AsRef<OsStr>, impl AsRef<OsStr>)>, |
44852
d6f706929120
rust-chg: reimplement ChgClientExt as ChgClient wrapper
Yuya Nishihara <yuya@tcha.org>
parents:
44847
diff
changeset
|
62 |
) -> io::Result<()> { |
d6f706929120
rust-chg: reimplement ChgClientExt as ChgClient wrapper
Yuya Nishihara <yuya@tcha.org>
parents:
44847
diff
changeset
|
63 |
self.client |
d6f706929120
rust-chg: reimplement ChgClientExt as ChgClient wrapper
Yuya Nishihara <yuya@tcha.org>
parents:
44847
diff
changeset
|
64 |
.borrow_protocol_mut() |
d6f706929120
rust-chg: reimplement ChgClientExt as ChgClient wrapper
Yuya Nishihara <yuya@tcha.org>
parents:
44847
diff
changeset
|
65 |
.send_command_with_args("setenv", message::pack_env_vars_os(vars)) |
d6f706929120
rust-chg: reimplement ChgClientExt as ChgClient wrapper
Yuya Nishihara <yuya@tcha.org>
parents:
44847
diff
changeset
|
66 |
.await |
d6f706929120
rust-chg: reimplement ChgClientExt as ChgClient wrapper
Yuya Nishihara <yuya@tcha.org>
parents:
44847
diff
changeset
|
67 |
} |
44676
97e6d435ff7e
rust-chg: send client-side environment variables to server
Yuya Nishihara <yuya@tcha.org>
parents:
43836
diff
changeset
|
68 |
|
44685
80d6e3415636
rust-chg: update name of the server process
Yuya Nishihara <yuya@tcha.org>
parents:
44684
diff
changeset
|
69 |
/// Changes the process title of the server. |
44852
d6f706929120
rust-chg: reimplement ChgClientExt as ChgClient wrapper
Yuya Nishihara <yuya@tcha.org>
parents:
44847
diff
changeset
|
70 |
pub async fn set_process_name(&mut self, name: impl AsRef<OsStr>) -> io::Result<()> { |
d6f706929120
rust-chg: reimplement ChgClientExt as ChgClient wrapper
Yuya Nishihara <yuya@tcha.org>
parents:
44847
diff
changeset
|
71 |
let name_bytes = name.as_ref().as_bytes().to_owned(); |
d6f706929120
rust-chg: reimplement ChgClientExt as ChgClient wrapper
Yuya Nishihara <yuya@tcha.org>
parents:
44847
diff
changeset
|
72 |
self.client |
d6f706929120
rust-chg: reimplement ChgClientExt as ChgClient wrapper
Yuya Nishihara <yuya@tcha.org>
parents:
44847
diff
changeset
|
73 |
.borrow_protocol_mut() |
d6f706929120
rust-chg: reimplement ChgClientExt as ChgClient wrapper
Yuya Nishihara <yuya@tcha.org>
parents:
44847
diff
changeset
|
74 |
.send_command_with_args("setprocname", name_bytes) |
d6f706929120
rust-chg: reimplement ChgClientExt as ChgClient wrapper
Yuya Nishihara <yuya@tcha.org>
parents:
44847
diff
changeset
|
75 |
.await |
d6f706929120
rust-chg: reimplement ChgClientExt as ChgClient wrapper
Yuya Nishihara <yuya@tcha.org>
parents:
44847
diff
changeset
|
76 |
} |
44685
80d6e3415636
rust-chg: update name of the server process
Yuya Nishihara <yuya@tcha.org>
parents:
44684
diff
changeset
|
77 |
|
44684
065048e66f32
rust-chg: send client side umask to server
Yuya Nishihara <yuya@tcha.org>
parents:
44681
diff
changeset
|
78 |
/// Changes the umask of the server process. |
44852
d6f706929120
rust-chg: reimplement ChgClientExt as ChgClient wrapper
Yuya Nishihara <yuya@tcha.org>
parents:
44847
diff
changeset
|
79 |
pub async fn set_umask(&mut self, mask: u32) -> io::Result<()> { |
d6f706929120
rust-chg: reimplement ChgClientExt as ChgClient wrapper
Yuya Nishihara <yuya@tcha.org>
parents:
44847
diff
changeset
|
80 |
let mut mask_bytes = BytesMut::with_capacity(mem::size_of_val(&mask)); |
d6f706929120
rust-chg: reimplement ChgClientExt as ChgClient wrapper
Yuya Nishihara <yuya@tcha.org>
parents:
44847
diff
changeset
|
81 |
mask_bytes.put_u32(mask); |
d6f706929120
rust-chg: reimplement ChgClientExt as ChgClient wrapper
Yuya Nishihara <yuya@tcha.org>
parents:
44847
diff
changeset
|
82 |
self.client |
d6f706929120
rust-chg: reimplement ChgClientExt as ChgClient wrapper
Yuya Nishihara <yuya@tcha.org>
parents:
44847
diff
changeset
|
83 |
.borrow_protocol_mut() |
d6f706929120
rust-chg: reimplement ChgClientExt as ChgClient wrapper
Yuya Nishihara <yuya@tcha.org>
parents:
44847
diff
changeset
|
84 |
.send_command_with_args("setumask2", mask_bytes) |
d6f706929120
rust-chg: reimplement ChgClientExt as ChgClient wrapper
Yuya Nishihara <yuya@tcha.org>
parents:
44847
diff
changeset
|
85 |
.await |
d6f706929120
rust-chg: reimplement ChgClientExt as ChgClient wrapper
Yuya Nishihara <yuya@tcha.org>
parents:
44847
diff
changeset
|
86 |
} |
44684
065048e66f32
rust-chg: send client side umask to server
Yuya Nishihara <yuya@tcha.org>
parents:
44681
diff
changeset
|
87 |
|
39978
74da9d999cd7
rust-chg: add Client extensions to run cHg-specific requests
Yuya Nishihara <yuya@tcha.org>
parents:
diff
changeset
|
88 |
/// Runs the specified Mercurial command with cHg extension. |
44852
d6f706929120
rust-chg: reimplement ChgClientExt as ChgClient wrapper
Yuya Nishihara <yuya@tcha.org>
parents:
44847
diff
changeset
|
89 |
pub async fn run_command_chg( |
d6f706929120
rust-chg: reimplement ChgClientExt as ChgClient wrapper
Yuya Nishihara <yuya@tcha.org>
parents:
44847
diff
changeset
|
90 |
&mut self, |
d6f706929120
rust-chg: reimplement ChgClientExt as ChgClient wrapper
Yuya Nishihara <yuya@tcha.org>
parents:
44847
diff
changeset
|
91 |
handler: &mut impl SystemHandler, |
44693
61fda2dbc522
rust-chg: leverage impl trait at argument position
Yuya Nishihara <yuya@tcha.org>
parents:
44690
diff
changeset
|
92 |
args: impl IntoIterator<Item = impl AsRef<OsStr>>, |
44852
d6f706929120
rust-chg: reimplement ChgClientExt as ChgClient wrapper
Yuya Nishihara <yuya@tcha.org>
parents:
44847
diff
changeset
|
93 |
) -> io::Result<i32> { |
d6f706929120
rust-chg: reimplement ChgClientExt as ChgClient wrapper
Yuya Nishihara <yuya@tcha.org>
parents:
44847
diff
changeset
|
94 |
runcommand::run_command( |
d6f706929120
rust-chg: reimplement ChgClientExt as ChgClient wrapper
Yuya Nishihara <yuya@tcha.org>
parents:
44847
diff
changeset
|
95 |
self.client.borrow_protocol_mut(), |
d6f706929120
rust-chg: reimplement ChgClientExt as ChgClient wrapper
Yuya Nishihara <yuya@tcha.org>
parents:
44847
diff
changeset
|
96 |
handler, |
d6f706929120
rust-chg: reimplement ChgClientExt as ChgClient wrapper
Yuya Nishihara <yuya@tcha.org>
parents:
44847
diff
changeset
|
97 |
message::pack_args_os(args), |
d6f706929120
rust-chg: reimplement ChgClientExt as ChgClient wrapper
Yuya Nishihara <yuya@tcha.org>
parents:
44847
diff
changeset
|
98 |
) |
d6f706929120
rust-chg: reimplement ChgClientExt as ChgClient wrapper
Yuya Nishihara <yuya@tcha.org>
parents:
44847
diff
changeset
|
99 |
.await |
d6f706929120
rust-chg: reimplement ChgClientExt as ChgClient wrapper
Yuya Nishihara <yuya@tcha.org>
parents:
44847
diff
changeset
|
100 |
} |
44681
43513444bb88
rust-chg: add interface to run "validate" request
Yuya Nishihara <yuya@tcha.org>
parents:
44676
diff
changeset
|
101 |
|
43513444bb88
rust-chg: add interface to run "validate" request
Yuya Nishihara <yuya@tcha.org>
parents:
44676
diff
changeset
|
102 |
/// Validates if the server can run Mercurial commands with the expected |
43513444bb88
rust-chg: add interface to run "validate" request
Yuya Nishihara <yuya@tcha.org>
parents:
44676
diff
changeset
|
103 |
/// configuration. |
43513444bb88
rust-chg: add interface to run "validate" request
Yuya Nishihara <yuya@tcha.org>
parents:
44676
diff
changeset
|
104 |
/// |
43513444bb88
rust-chg: add interface to run "validate" request
Yuya Nishihara <yuya@tcha.org>
parents:
44676
diff
changeset
|
105 |
/// The `args` should contain early command arguments such as `--config` |
43513444bb88
rust-chg: add interface to run "validate" request
Yuya Nishihara <yuya@tcha.org>
parents:
44676
diff
changeset
|
106 |
/// and `-R`. |
43513444bb88
rust-chg: add interface to run "validate" request
Yuya Nishihara <yuya@tcha.org>
parents:
44676
diff
changeset
|
107 |
/// |
43513444bb88
rust-chg: add interface to run "validate" request
Yuya Nishihara <yuya@tcha.org>
parents:
44676
diff
changeset
|
108 |
/// Client-side environment must be sent prior to this request, by |
43513444bb88
rust-chg: add interface to run "validate" request
Yuya Nishihara <yuya@tcha.org>
parents:
44676
diff
changeset
|
109 |
/// `set_current_dir()` and `set_env_vars_os()`. |
44852
d6f706929120
rust-chg: reimplement ChgClientExt as ChgClient wrapper
Yuya Nishihara <yuya@tcha.org>
parents:
44847
diff
changeset
|
110 |
pub async fn validate( |
d6f706929120
rust-chg: reimplement ChgClientExt as ChgClient wrapper
Yuya Nishihara <yuya@tcha.org>
parents:
44847
diff
changeset
|
111 |
&mut self, |
44693
61fda2dbc522
rust-chg: leverage impl trait at argument position
Yuya Nishihara <yuya@tcha.org>
parents:
44690
diff
changeset
|
112 |
args: impl IntoIterator<Item = impl AsRef<OsStr>>, |
44852
d6f706929120
rust-chg: reimplement ChgClientExt as ChgClient wrapper
Yuya Nishihara <yuya@tcha.org>
parents:
44847
diff
changeset
|
113 |
) -> io::Result<Vec<Instruction>> { |
d6f706929120
rust-chg: reimplement ChgClientExt as ChgClient wrapper
Yuya Nishihara <yuya@tcha.org>
parents:
44847
diff
changeset
|
114 |
let data = self |
d6f706929120
rust-chg: reimplement ChgClientExt as ChgClient wrapper
Yuya Nishihara <yuya@tcha.org>
parents:
44847
diff
changeset
|
115 |
.client |
d6f706929120
rust-chg: reimplement ChgClientExt as ChgClient wrapper
Yuya Nishihara <yuya@tcha.org>
parents:
44847
diff
changeset
|
116 |
.borrow_protocol_mut() |
d6f706929120
rust-chg: reimplement ChgClientExt as ChgClient wrapper
Yuya Nishihara <yuya@tcha.org>
parents:
44847
diff
changeset
|
117 |
.query_with_args("validate", message::pack_args_os(args)) |
d6f706929120
rust-chg: reimplement ChgClientExt as ChgClient wrapper
Yuya Nishihara <yuya@tcha.org>
parents:
44847
diff
changeset
|
118 |
.await?; |
d6f706929120
rust-chg: reimplement ChgClientExt as ChgClient wrapper
Yuya Nishihara <yuya@tcha.org>
parents:
44847
diff
changeset
|
119 |
message::parse_instructions(data) |
44681
43513444bb88
rust-chg: add interface to run "validate" request
Yuya Nishihara <yuya@tcha.org>
parents:
44676
diff
changeset
|
120 |
} |
39978
74da9d999cd7
rust-chg: add Client extensions to run cHg-specific requests
Yuya Nishihara <yuya@tcha.org>
parents:
diff
changeset
|
121 |
} |