D152: repo: skip invalidation of changelog if it has 'delayed' changes (API)

martinvonz (Martin von Zweigbergk) phabricator at mercurial-scm.org
Thu Jul 20 12:17:24 EDT 2017


martinvonz added a comment.


  In https://phab.mercurial-scm.org/D152#2246, @quark wrote:
  
  > Could we call `changelog._writepending()` automatically to solve this problem?
  
  
  Good question. I spent quite a lot of time trying to see if that would work. It was easy to get all tests to pass, but I couldn't get it to work with our extensions (and it didn't seem to be the extensions' faults). One problem was that cl.delayupdate() would happen again after repo.invalidate() and delayupdate() doesn't have a way of taking revisions already written to .a into account (it doesn't check if self._divert is set). Also, I think that writing to .a would mean that hooks would see changes they were not meant to see.

REPOSITORY
  rHG Mercurial

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

EMAIL PREFERENCES
  https://phab.mercurial-scm.org/settings/panel/emailpreferences/

To: martinvonz, #hg-reviewers
Cc: quark, mercurial-devel


More information about the Mercurial-devel mailing list