sapling/eden/mononoke/mercurial/revlog
Thomas Orozco 4db876a1bb mononoke/hooks: limit_path_length: encode the .i too
Summary:
When I refactored MPath to limit path length to 255 throughout, I had to change
the logic in this hook because it couldn't represent problematic paths anymore.

Unfortunately, I didn't realize that this would break in cases where the file
fits in 254 or 255 characters with one of the less compact encodings (but that
doesn't fit in 255 if you add `.i`), but also fits in 255 characters once you
add `.i` using one of the more compact encodings.

This results in the hook rejecting things that could have been represented in a
more compact encoding un-necessarily.

This fixes that, but to do so it also requires no requiring MPath in fsencode
(and instead allowing any slice of bytes) which is basically the bulk of
changes here.

Reviewed By: StanislavGlebik

Differential Revision: D21462205

fbshipit-source-id: d4fe6129b379675e842bff5b20bd776cb39157b2
2020-05-08 08:24:35 -07:00
..
manifest Manual synchronization of fbcode/eden and facebookexperimental/eden 2020-02-11 11:42:43 +01:00
revlog Manual synchronization of fbcode/eden and facebookexperimental/eden 2020-02-11 11:42:43 +01:00
Cargo.toml rust: remove abandoned heapsize crate 2020-05-07 23:45:44 -07:00
errors.rs Manual synchronization of fbcode/eden and facebookexperimental/eden 2020-02-11 11:42:43 +01:00
lib.rs Manual synchronization of fbcode/eden and facebookexperimental/eden 2020-02-11 11:42:43 +01:00
revlogrepo.rs mononoke/hooks: limit_path_length: encode the .i too 2020-05-08 08:24:35 -07:00
stockbookmarks.rs common/rust/failure_ext: get rid of error chain 2020-05-05 05:44:52 -07:00