P2D2::View not refreshing

Create issue
Issue #179 resolved
sassoflash created an issue

Since the update (0.9.13 b4c0475ebda4), MacHg doesn't seem to always properly refresh the view when switching from one repository to another. I'm still trying to pinpoint when it exactly happens.

One instance where I just experienced it, was when removing a repository (bookmark & contents). The sidebar updates and removes the repository. Since that repository is now gone, it defaults to the next repository in the list. However, the changes that have been performed on that (local) repository are no longer indicated, hence I couldn't even do a commit anymore. This also applies for the little indicator on server repositories that would let me know how many new changesets are available. It just shows the dark oval shape, but without the number in it.

Switching the view between different repositories does not refresh it, only a default view is displayed without any indication of changes. The only way to resolve the issue, is to close MacHg and relaunch it, then everything works fine again.

If you need additional info, please let me know. I'll try to capture other instances where this refresh issue happens. Thanks~

Comments (8)

  1. Jason Harris repo owner

    Thanks for the report. I had noticed this once or twice myself... But I had hoped it was transient. I'll have to dig into it...

    Thanks! Jas

  2. sassoflash reporter

    Thanks for looking into it, I'll keep an eye out when it happens again. I've only experienced it intermittently...

  3. Jason Harris repo owner

    Actually it was this report which gave me the breakthrough for #148. Thank you very much for the clear report instructions! It was instrumental in leading me to the fix which will fix: this issue #179, #178, #158, #173, and #148 and possibly a few more in the database.

    So again thank you!!!

    I have it fixed in my development copy right now but I will now fill out a few more protective cases around this whole general problem. I should post an update shortly...

    Thanks, Jas

  4. Jason Harris repo owner

    - Fix issue 148. We need to abandon and cut off the repository data when we switch the view to the backing view. - What was happening is that the old RepositoryData was still in existence and listening to notifications even though the document didn't point to it. Thus, when a kUnderlyingRepositoryChanged was generally posted this limbo RepositoryData was still trying to update itself. But while the limbo Repository data was trying to update itself it had problems during the update since the repository no longer existed on disk, so it asked for another update which again triggered the limbo repository to ask for an update, etc. Meanwhile the good repository that the document actually pointed to was also observing these repeated notifications to keep updating and so it flickered as lots and lots of updates took place... All of this wound the CPU right up. - Thus I think this accounts for the flicking and high CPU usage. - It also Fixes #158, Fixes #164, Fixes #173, Fixes #178, and Addresses #179.


  5. Log in to comment