Page MenuHomePhabricator

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
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.Jan 17 2020, 5:41 AM
kevincox requested changes to this revision.Fri, Jan 24, 4:59 AM
kevincox added inline comments.
rust/hg-core/src/dirstate/dirs_multiset.rs
84

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

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

It seems this one doesn't apply cleanly

pulkit accepted this revision.Fri, Feb 7, 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.