( )⚙ D10012 rhg: Add support for the blackbox extension

This is an archive of the discontinued Mercurial Phabricator instance.

rhg: Add support for the blackbox extension
ClosedPublic

Authored by SimonSapin on Feb 17 2021, 7:58 AM.

Details

Summary

Only command and commandfinish events are logged.
The dirty, logsource, track and ignore configuration items
are not supported yet.

To indicate commands executed without Python, a (rust) prefix is added
in corresponding log messages.

Diff Detail

Repository
rHG Mercurial
Branch
default
Lint
No Linters Available
Unit
No Unit Test Coverage

Event Timeline

SimonSapin created this revision.Feb 17 2021, 7:58 AM
Alphare added inline comments.
rust/rhg/src/blackbox.rs
61

You've got a NBSP here ;)

116

Problem with this is that it conflicts with .t output. Or was it intentional?

SimonSapin marked an inline comment as done.Feb 19 2021, 3:29 AM
SimonSapin added inline comments.
rust/rhg/src/blackbox.rs
61

Right. This comment was obsolete anyway so I’ve removed it. (date-format is part of this commit and there’s not quoting in config syntax outside of list-values, see previous commit.)

116

Oh do you mean that (glob) expected output in .t files makes it hard to expect a literal ? character? https://docs.rs/users/0.11.0/users/fn.get_current_username.html says “This function to return None if the current user does not exist, which could happen if they were deleted after the program started running.” so I don’t expect this ??? fallback to show up a lot in practice and I think it’s not worth testing it.

SimonSapin marked an inline comment as done.Feb 19 2021, 3:31 AM
SimonSapin updated this revision to Diff 25661.
Alphare accepted this revision.Feb 19 2021, 4:05 AM
Alphare added inline comments.
rust/rhg/src/blackbox.rs
116

I don't think it's worth testing either, I just meant I would have chosen a different set of characters just to avoid confusion. It's not a dealbreaker.

baymax updated this revision to Diff 25680.Feb 19 2021, 6:29 AM

✅ refresh by Heptapod after a successful CI run (🐙 💚)

This revision was not accepted when it landed; it landed in state Needs Review.
This revision was automatically updated to reflect the committed changes.