( )⚙ D7921 rust-dirs-multiset: improve temporary error message

This is an archive of the discontinued Mercurial Phabricator instance.

rust-dirs-multiset: improve temporary error message
ClosedPublic

Authored by Alphare on Jan 17 2020, 5:41 AM.

Details

Summary

While we wait on a future patch that could verify that the paths passed to
DirsMultiset have been audited, we still need to handle this error.
This patch makes it easier to bubble up and makes the error clearer.

Also, this patch introduces the subslice_index function that could be useful
for other - albeit niche - purposes.

Diff Detail

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

Event Timeline

Alphare created this revision.Jan 17 2020, 5:41 AM
kevincox requested changes to this revision.Jan 24 2020, 4:59 AM
kevincox added inline comments.
rust/hg-core/src/dirstate/dirs_multiset.rs
86

It appears to me that find_dirs always returns prefixes. Why is this offset required?

This revision now requires changes to proceed.Jan 24 2020, 4:59 AM
Alphare marked an inline comment as done.Jan 24 2020, 5:16 AM

It seems this one doesn't apply cleanly

pulkit accepted this revision.Feb 7 2020, 4:10 PM
This revision was not accepted when it landed; it landed in state Needs Review.
This revision was automatically updated to reflect the committed changes.