This avoids some pointless copying.
Details
Details
- Reviewers
marmoute pulkit - Group Reviewers
hg-reviewers - Commits
- rHGdfca84970da8: cleanup: use mergestate.unresolvedcount() instead of bool(list(unresolved()))
Diff Detail
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.
Event Timeline
Comment Actions
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?
Comment Actions
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.
Comment Actions
nevermind, I got confused, the unresolvedcount method existed before your series, so this patch is clear win.