D3055: localrepo: use revsymbol() in lookup()

indygreg (Gregory Szorc) phabricator at mercurial-scm.org
Tue Apr 3 19:34:45 EDT 2018


indygreg added a comment.


  Also, `lookup()` is part of the peer interface (i.e. how remote consumers are supposed to interact with the repo instance). They are supposed to call `repo.peer()` to get a `localpeer()` instance that exposes just the peer interface.
  
  It /should/ be acceptable to remove all the peer interface members from `localrepository` and require everyone go through `peer()`. This includes `known()`, `pushkey()`, `branchmap()`, etc. That would mean `localpeer` would have to access private attributes of `localrepository`. That should be fine: the classes are in the same module. It would make monkeypatching from extensions a little bit more complicated. But it would still be possible.

REPOSITORY
  rHG Mercurial

REVISION DETAIL
  https://phab.mercurial-scm.org/D3055

To: martinvonz, #hg-reviewers
Cc: indygreg, mercurial-devel


More information about the Mercurial-devel mailing list