( )⚙ D3193 scmutil: handle full hex nodeids in revsymbol()

This is an archive of the discontinued Mercurial Phabricator instance.

scmutil: handle full hex nodeids in revsymbol()
ClosedPublic

Authored by martinvonz on Apr 8 2018, 1:04 PM.

Details

Summary

This is a bit unfortunate, but it enables moving other pieces out of
changectx's constructor without affecting the order in which we
look up things (e.g. hex nodeid before bookmark).

We convert nodeid to revnum before calling repo.getitem, even
though that will result in converting back to nodeid later. This is so
we can handle the LookupError and attempt to interpret the string as
something else (e.g. a bookmark).

We also need to start handling WdirUnsupported now, since the full hex
nodeid "ffff..." represents the working directory. The exception is
raised by the revlog layer.

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

martinvonz created this revision.Apr 8 2018, 1:04 PM
This revision was automatically updated to reflect the committed changes.