[Commented On] D8566: cleanup: use mergestate.unresolvedcount() instead of bool(list(unresolved()))

marmoute (Pierre-Yves David) phabricator at mercurial-scm.org
Wed Jun 10 09:35:07 UTC 2020


marmoute added a comment.
marmoute accepted this revision.


  In D8566#128782 <https://phab.mercurial-scm.org/D8566#128782>, @durin42 wrote:
  
  > In D8566#128623 <https://phab.mercurial-scm.org/D8566#128623>, @marmoute wrote:
  >
  >> how well, I see why you want an explicite method to avoid unrolling the iterator. Could we return an object with sensible __bool__ and __len__ methods?
  >
  > I'd rather not: right now we have no extra type overhead, and if we make unresolved() return some custom iterator type it'll add extra bookkeeping etc.
  > If you feel strongly, I'd much rather someone that cares do that as a follow-up, since I'm just trying to do a quick-win case here.
  
  nevermind, I got confused, the unresolvedcount method existed before your series, so this patch is clear win.

REPOSITORY
  rHG Mercurial

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

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

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


More information about the Mercurial-patches mailing list