Page MenuHomePhabricator

rhg: raise wdir specific error for `hg debugdata`
ClosedPublic

Authored by pulkit on Mar 23 2021, 4:39 PM.

Details

Summary

Helps remove the conditional in test-debugcommands.t for rhg.

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

pulkit created this revision.Mar 23 2021, 4:39 PM
SimonSapin added inline comments.
rust/hg-core/src/revset.rs
54–56

Although tests don’t cover this it looks like Python code also recognizes hex prefixes of WORKING_DIRECTORY_REV, for example hg debugdata -c fffff. This could be based on is_prefix_of after creating a NodePrefix.

(I also just found a pre-existing bug: to match Python NodePrefix::from_hex should only accept input with 5 or more hex digits)

pulkit updated this revision to Diff 26576.Mar 25 2021, 5:01 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.