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

2017-07-25 Thread quark (Jun Wu)
quark accepted this revision. quark added a comment. I think this is fine as a workaround now. It's better than losing data. INLINE COMMENTS > test-context.py:185 > +with open('4', 'wb') as f: > +f.write(i) > +repo.dirstate.normal('4') Seems like `f.write(b'4')` is better. R

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

2017-07-25 Thread indygreg (Gregory Szorc)
indygreg accepted this revision as: indygreg. indygreg added a comment. Aside from the test issue pointed out by @quark, I think this seems reasonable. @martinvonz is correct that writing the .i.a file has hooks implications. We definitely need to keep the changes in memory. I'm kin

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

2017-08-07 Thread martinvonz (Martin von Zweigbergk)
martinvonz updated this revision to Diff 619. martinvonz marked an inline comment as done. REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE https://phab.mercurial-scm.org/D152?vs=321&id=619 REVISION DETAIL https://phab.mercurial-scm.org/D152 AFFECTED FILES mercurial/localrepo.py tes

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

2017-08-07 Thread martinvonz (Martin von Zweigbergk)
martinvonz added a comment. Can this be queued for default now? INLINE COMMENTS > quark wrote in test-context.py:185 > Seems like `f.write(b'4')` is better. Oops, definitely. I also updated the line above for consistency. I don't know if other places should be updated, so I didn't. REPOSIT

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

2017-08-08 Thread martinvonz (Martin von Zweigbergk)
This revision was automatically updated to reflect the committed changes. Closed by commit rHG01a1c4e66816: repo: skip invalidation of changelog if it has 'delayed' changes (API) (authored by martinvonz). REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE https://phab.mercurial-scm.org/D152?

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

2017-07-19 Thread martinvonz (Martin von Zweigbergk)
martinvonz created this revision. Herald added a subscriber: mercurial-devel. Herald added a reviewer: hg-reviewers. REVISION SUMMARY The changelog object can store recently added revisions in memory until the transaction is committed. We don't want to lose those changes even if repo.invalid

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

2017-07-19 Thread quark (Jun Wu)
quark added a comment. Could we call `changelog._writepending()` automatically to solve this problem? REPOSITORY rHG Mercurial REVISION DETAIL https://phab.mercurial-scm.org/D152 EMAIL PREFERENCES https://phab.mercurial-scm.org/settings/panel/emailpreferences/ To: martinvonz, #hg-revi

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

2017-07-20 Thread martinvonz (Martin von Zweigbergk)
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 pas