D4498: util: properly copy lrucachedict instances

2018-09-12 Thread indygreg (Gregory Szorc)
This revision was automatically updated to reflect the committed changes. Closed by commit rHGb31b01f93b11: util: properly copy lrucachedict instances (authored by indygreg, committed by ). REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE

D4498: util: properly copy lrucachedict instances

2018-09-07 Thread indygreg (Gregory Szorc)
indygreg added a comment. Added https://phab.mercurial-scm.org/D4506 to the series to fix the bug with `get()`. REPOSITORY rHG Mercurial REVISION DETAIL https://phab.mercurial-scm.org/D4498 To: indygreg, #hg-reviewers Cc: martinvonz, mercurial-devel

D4498: util: properly copy lrucachedict instances

2018-09-07 Thread martinvonz (Martin von Zweigbergk)
martinvonz added inline comments. INLINE COMMENTS > indygreg wrote in util.py:1302 > Yes, this does feel like a bug. But it feels unrelated to the series, no? > > I can certainly code up a patch easily enough. I may tack one on the end of > the series... Yes, definitely unrelated (that's what

D4498: util: properly copy lrucachedict instances

2018-09-07 Thread indygreg (Gregory Szorc)
indygreg added inline comments. INLINE COMMENTS > martinvonz wrote in util.py:1302 > Btw, why doesn't this do `return self[k]` instead? It seems surprising that > the recency is not updated. Yes, this does feel like a bug. But it feels unrelated to the series, no? I can certainly code up a

D4498: util: properly copy lrucachedict instances

2018-09-06 Thread martinvonz (Martin von Zweigbergk)
martinvonz added inline comments. INLINE COMMENTS > util.py:1302 > try: > return self._cache[k].value > except KeyError: Btw, why doesn't this do `return self[k]` instead? It seems surprising that the recency is not updated. REPOSITORY rHG Mercurial REVISION

D4498: util: properly copy lrucachedict instances

2018-09-06 Thread indygreg (Gregory Szorc)
indygreg created this revision. Herald added a subscriber: mercurial-devel. Herald added a reviewer: hg-reviewers. REVISION SUMMARY Previously, copy() only worked if the cache was full. We teach copy() to only copy defined nodes. REPOSITORY rHG Mercurial REVISION DETAIL