This is an archive of the discontinued Mercurial Phabricator instance.

context: handle stringified ints in revsymbol()
ClosedPublic

Authored by martinvonz on Apr 5 2018, 6:07 PM.

Details

Summary

This patch copies the handling of stringified ints from changectx's
constructor. It then calls repo.getitem with the int. Since that
method only interprets integers as revnums the first thing it does,
this will not be redoing any of the work already done. We leave the
old code in place so we can later deprecate it instead of breaking
extensions.

Diff Detail

Repository
rHG Mercurial
Lint
Lint Skipped
Unit
Unit Tests Skipped

Event Timeline

martinvonz created this revision.Apr 5 2018, 6:07 PM
martinvonz edited the summary of this revision. (Show Details)Apr 5 2018, 6:08 PM
martinvonz planned changes to this revision.Apr 6 2018, 12:47 AM

I should decide what to do about the changeid == repo.dirstate.p1() case before this patch. Also, I may find more cases that should be fixed when I move out other parts (I just found one case in hgweb), so please hold off reviewing this.

martinvonz edited the summary of this revision. (Show Details)Apr 8 2018, 1:04 PM
martinvonz retitled this revision from context: move handling of stringified ints to revsymbol (API) to context: handle stringified ints in revsymbol().
martinvonz updated this revision to Diff 7884.
This revision was automatically updated to reflect the committed changes.