( )⚙ D10254 rhg: raise wdir specific error for `hg debugdata`

This is an archive of the discontinued Mercurial Phabricator instance.

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
Branch
default
Lint
No Linters Available
Unit
No Unit Test Coverage

Event Timeline

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

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.