( )⚙ D11380 rhg: fallback if the current command has any generic hook defined

This is an archive of the discontinued Mercurial Phabricator instance.

rhg: fallback if the current command has any generic hook defined
ClosedPublic

Authored by Alphare on Sep 1 2021, 12:43 PM.

Details

Summary

We do not handle hooks yet.

Diff Detail

Repository
rHG Mercurial
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

Alphare created this revision.Sep 1 2021, 12:43 PM
SimonSapin accepted this revision.Sep 2 2021, 2:36 PM
SimonSapin added a subscriber: SimonSapin.
SimonSapin added inline comments.
rust/rhg/src/main.rs
72

Nit: "string literals" have type &'static str, so the extra & operators are unnecessary. (This prefix ends up with triple pointer indirection &&&str since .iter() adds another one! But by-value array iteration requires Rust 1.53)

Alphare added inline comments.Sep 3 2021, 5:43 AM
rust/rhg/src/main.rs
72

Ah, I got confused since I started with b"pre" instead of b"pre", which doesn't work since the items differed in size, but it does not apply to &'static str, as you mentioned.
We're gonna have to wait for Debian Bookworm for 1.53 I'm pretty sure. ;)

SimonSapin added inline comments.Sep 9 2021, 9:37 AM
rust/rhg/src/main.rs
72

Ah yes, I only mentioned by value iteration in passing :)

Alphare updated this revision to Diff 30204.Sep 10 2021, 6:10 PM
SimonSapin accepted this revision.Sep 14 2021, 3:55 AM
This revision was not accepted when it landed; it landed in state Needs Review.
This revision was automatically updated to reflect the committed changes.