Augie Fackler <augie@google.com> [Thu, 09 Apr 2020 15:44:21 -0400] rev 44686
histedit: add test that an invalid editor doesn't bork client state
We had a report of a situation like this borking a user at Google, but
I can't reproduce it in a test. Let's at least backstop the issue with
a test, so we don't accidentally introduce such a bug...
Differential Revision: https://phab.mercurial-scm.org/D8391
Yuya Nishihara <yuya@tcha.org> [Tue, 31 Mar 2020 23:25:26 +0900] rev 44685
rust-chg: silence warning about dated coding style
Differential Revision: https://phab.mercurial-scm.org/D8384
Yuya Nishihara <yuya@tcha.org> [Mon, 19 Nov 2018 20:50:45 +0900] rev 44684
rust-chg: update name of the server process
This is a copy of updateprocname() of hgclient.c.
At this point, rust-chg is basically functional. I did dogfooding for
a couple of weeks in 2018. There are a few remaining tasks:
a. loop detection by CHGINTERNALMARK
b. forward unsupported commands (notably serve -d) to real hg
c. better handling of early server exception
d. modernize codebase (2018 edition, impl trait, async/await)
For (d), we'll probably want to switch to async-std, but I'm thinking of
upgrading to Tokio 0.2 as an intermediate step since process API isn't
ported to async-std yet. I'm pretty sure future migration to async-std
will be painless compared to the mass rewrite from futures-0.1 to 0.3.
https://github.com/async-rs/async-std/issues/22
Differential Revision: https://phab.mercurial-scm.org/D8383
Yuya Nishihara <yuya@tcha.org> [Thu, 04 Oct 2018 22:44:37 +0900] rev 44683
rust-chg: send client side umask to server
This is equivalent to forwardumask() of hgclient.c.
Differential Revision: https://phab.mercurial-scm.org/D8382
Yuya Nishihara <yuya@tcha.org> [Sun, 07 Oct 2018 16:14:21 +0900] rev 44682
rust-chg: add config validation and process returned instructions
This is the reimplementation of runinstructions() and main() in chg.c.
In Rust version, we only pass in early arguments to the server as the locator
doesn't know the full arguments. This should be fine since these arguments
are just passed in to _earlyparseopts() and _parseconfig(), which means the
server doesn't need full arguments.
Another difference is the handling of the "exit <code>" instruction. In Rust
version, we can simply reuse the connection instead of "exit(code)" as the
command error isn't displayed yet. That's because the client-side stdio is not
attached until the connection is validated. This behavior is cleaner than C,
but it also means that the early server exception wouldn't be propagated to
client because stderr isn't attached. So we might have to reconsider when to
attach/detach the server stdio.
Differential Revision: https://phab.mercurial-scm.org/D8381
Yuya Nishihara <yuya@tcha.org> [Sun, 07 Oct 2018 16:46:30 +0900] rev 44681
rust-chg: collect server flags from command arguments
This is the reimplementation of testsensitiveflag() and setcmdserverargs()
of chg.c.
Differential Revision: https://phab.mercurial-scm.org/D8380