Page MenuHomePhabricator

rhg: allow specifying a changeset ID prefix
ClosedPublic

Authored by SimonSapin on Dec 1 2020, 1:27 PM.

Diff Detail

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

Event Timeline

SimonSapin created this revision.Dec 1 2020, 1:27 PM
pulkit added a subscriber: pulkit.Dec 2 2020, 2:16 AM
pulkit added inline comments.
rust/hg-core/src/revlog/revlog.rs
102

Hmm, this seems to be incorrect. What if we have multiple hashes that start with the same prefix?

SimonSapin added inline comments.Dec 2 2020, 9:23 AM
rust/hg-core/src/revlog/revlog.rs
102

Oh that’s a good point. I’ve updated the patch to return an error for ambiguous prefixes, and added a corresponding variant to a few error types.

SimonSapin added inline comments.Dec 2 2020, 9:25 AM
tests/test-rhg.t
77–81

These random-looking changes exist to generate two changesets with a common prefix.

118

This is not the expected error message, for a reason unrelated to this patch. The next one fixes it.

pulkit accepted this revision.Dec 4 2020, 1:20 PM
This revision is now accepted and ready to land.Dec 4 2020, 1:20 PM
This revision was automatically updated to reflect the committed changes.