This is an archive of the discontinued Mercurial Phabricator instance.

context: move logic from changectx.__init__ to localrepo.__getitem__ (API)
ClosedPublic

Authored by martinvonz on Oct 1 2018, 6:23 PM.

Details

Summary

My motivation for this change was to make repo[node] not load the
dirstate (more about that in the next patch), but I think it makes
more sense this way too. For example, raising RepoLookupError seems to
belong better in the repo lookup function
(i.e. localrepo.getitem).

This makes the changectx constructor very simple -- it just assigns
the given repo, revnum, and nodeid to properties.

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.