[Commented On] D8563: localrepo: get mergestate via context
durin42 (Augie Fackler)
phabricator at mercurial-scm.org
Thu Jun 11 16:05:44 UTC 2020
durin42 added a comment.
In D8563#128829 <https://phab.mercurial-scm.org/D8563#128829>, @marmoute wrote:
> 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 ?
Should we have a brief email thread or IRC discussion about this? We seem to be conflating workingctx and overlayworkingctx here, and I'm not sure we're all on the same page.
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/20200611/184378cc/attachment-0002.html>
More information about the Mercurial-patches
mailing list