[Commented On] D8563: localrepo: get mergestate via context

marmoute (Pierre-Yves David) phabricator at mercurial-scm.org
Wed Jun 10 08:55:51 UTC 2020


marmoute added a comment.


  In D8563#128768 <https://phab.mercurial-scm.org/D8563#128768>, @martinvonz wrote:
  
  > In D8563#128630 <https://phab.mercurial-scm.org/D8563#128630>, @marmoute wrote:
  >
  >> Is your concern about the creation of new "independant" wctc (by each call of `repo[None]`) instead of reusing the same wctx for the full operation ?
  >
  > Yes. I guess I'd rather have the pattern `wctx.mergestate()` indicate that it works with either a `workingctx` or a `overlayworkingctx`, while direct access to `mergestate.read()` indicates that we care about the actual working copy.
  
  Is there any reason to distinct the two ? From afar, it would be better for the mergestate module to become an implementation details and every access to happen throught the context for consistency.
  
  Do you have concrêt example where distincting the two seems better ?

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST ACTION
  https://phab.mercurial-scm.org/D8563/new/

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

To: durin42, #hg-reviewers
Cc: marmoute, martinvonz, mercurial-patches
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mercurial-scm.org/pipermail/mercurial-patches/attachments/20200610/431f9061/attachment-0002.html>


More information about the Mercurial-patches mailing list