Martin von Zweigbergk <martinvonz@google.com> [Thu, 12 Nov 2020 17:06:45 -0800] rev 45855
tests: show how `hg split` can put color codes in commit template
With D9255, I made it so `hg split` respects the
`commmand-templates.oneline-summary` config. I don't think I realized
that the output I modified was being put in a commit message
template. The result was that if you have coloring enabled, you get
colors in the commit template. This patch show that. The test is
unfortunately pretty verbose (like most other `hg split` tests) and
shows a bunch of irrelevant "color codes" (templater labels).
Differential Revision: https://phab.mercurial-scm.org/D9321
Martin von Zweigbergk <martinvonz@google.com> [Mon, 16 Nov 2020 16:00:13 -0800] rev 45854
dispatch: move some helper functions down into scmutil
I plan to reuse `formatparse()` in the next patch.
Differential Revision: https://phab.mercurial-scm.org/D9331
Martin von Zweigbergk <martinvonz@google.com> [Mon, 16 Nov 2020 15:11:51 -0800] rev 45853
errors: raise more specific errors from rewriteutil
Differential Revision: https://phab.mercurial-scm.org/D9330
Yuya Nishihara <yuya@tcha.org> [Tue, 17 Nov 2020 19:29:08 +0900] rev 45852
chgserver: backport py3 buffered I/O workarounds from procutil
I've recently switched to new machine and I found chg's stdout is fully
buffered.
Even though chg server is a daemon process, it inherits the environment
where the chg client originally forked the server. This means the server's
stdout might have been wrapped by LineBufferedWrapper. That's why we need
to do wrap/unwrap in both ways.
The "if" condition in _restoreio() looks weird, but I'm not willing to
clean things up because stdio behavior is fundamentally different between
py2 and py3, and py2 support will be dropped anyway.
Yuya Nishihara <yuya@tcha.org> [Tue, 03 Nov 2020 11:24:21 +0900] rev 45851
chg: reset errno prior to calling strtol()
Otherwise we can't figure out if the last strtol() invocation failed or
not.
Yuya Nishihara <yuya@tcha.org> [Tue, 03 Nov 2020 11:15:50 +0900] rev 45850
chg: do not close dir fd while iterating
It works so long as the dp is the last entry, but readdir(dp) would fail
with EBADF. Let's not do that and close the dir fd explicitly.
Yuya Nishihara <yuya@tcha.org> [Tue, 03 Nov 2020 11:12:25 +0900] rev 45849
chg: show debug message for each fd to be closed
It helps debugging. The number of file descriptors should be small in most
cases, so the console output wouldn't get bloated even with CHG_DEBUG=1.
Yuya Nishihara <yuya@tcha.org> [Tue, 03 Nov 2020 11:06:15 +0900] rev 45848
chg: apply clang-format
Martin von Zweigbergk <martinvonz@google.com> [Thu, 12 Nov 2020 15:28:06 -0800] rev 45847
errors: use InputError for some errors on `hg clone`
Differential Revision: https://phab.mercurial-scm.org/D9329
Martin von Zweigbergk <martinvonz@google.com> [Thu, 12 Nov 2020 13:22:40 -0800] rev 45846
errors: raise InputError when given non-existent paths etc
Differential Revision: https://phab.mercurial-scm.org/D9328