Refresh main view after adding, and committing changes.

Bug #412876 reported by Craig Hewetson
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Bazaar Explorer
Fix Released
Wishlist
Ian Clatworthy

Bug Description

Have changes.
Commit changes.
Note, one now has to manually refresh.

Recommend that it refreshes automatically.

I guess the problem is that bzr-explorer doesn't know when to refresh. Need to hook into qbzr dialog's to know when an operation has successfully completed.

Revision history for this message
Gary van der Merwe (garyvdm) wrote :

If we fix Bug 347990, then bzr-explorer will be able to tell if it need to refresh.

Revision history for this message
Alexander Belchenko (bialix) wrote :

I think the problem is much deeper. You need to auto refresh as well after pull, merge, switch, bind/unbind, uncommit, revert, add. Am I forgot something?

Currently dialogs from qbzr/bzr-gtk invoked as separate processes, so we have to implement some IPC messaging here. On Windows Events could be used (similar to the code I wrote for supporting Ctrl+C signal in qsubprocess). I don't know qhat should be used on Linux.

Changed in bzr-explorer:
importance: Undecided → Wishlist
status: New → Confirmed
Revision history for this message
Ian Clatworthy (ian-clatworthy) wrote :

IPC with the qbzr (or bzr-gtk) applets is one option. Another is to try setting up some sort of file-system watcher on selected files, e.g. dirstate after 'Add' or 'Commit'.

Automatic refreshing is really important IMO for a great user experience! My initial priority though is getting functional coverage of tasks completed so that users can remain in Explorer 95-99% of the time without needing to go to the command line. As a consequence, I'm not optimistic that I'll have time to fix this prior to 1.0 shipping around the end of August. I'll take patches though. :-)

Revision history for this message
Alexander Belchenko (bialix) wrote : Re: [Bug 412876] Re: Refresh main view after adding, and committing changes.

Ian Clatworthy пишет:
> IPC with the qbzr (or bzr-gtk) applets is one option. Another is to try
> setting up some sort of file-system watcher on selected files, e.g.
> dirstate after 'Add' or 'Commit'.

Hmm, Lukas has used some DirectoryWatcher service from PyQt when he
wrote our qmain application. Perhaps we need to inspect that code more
closely and decide if we can reuse it for bzr-explorer.

Revision history for this message
Alexander Belchenko (bialix) wrote :

Alexander Belchenko пишет:
> Ian Clatworthy пишет:
>> IPC with the qbzr (or bzr-gtk) applets is one option. Another is to try
>> setting up some sort of file-system watcher on selected files, e.g.
>> dirstate after 'Add' or 'Commit'.
>
> Hmm, Lukas has used some DirectoryWatcher service from PyQt when he
> wrote our qmain application. Perhaps we need to inspect that code more
> closely and decide if we can reuse it for bzr-explorer.
>

QFileSystemWatcher class from QtCore.

Revision history for this message
Craig Hewetson (craighewetson-deactivatedaccount) wrote :

Does the filesystem watcher need to run "bzr status"? If not then how does it pick up the difference between unversioned and newly versioned files? Or changes to already added files?

If it needs to run "bzr status" how often do we want this to happen? (performance)

Revision history for this message
Gary van der Merwe (garyvdm) wrote : Re: [Bug 412876] Re: Refresh main view after adding, and committing changes.

On Thu, Aug 13, 2009 at 12:07 PM, Craig Hewetson<email address hidden> wrote:
> Does the filesystem watcher need to run "bzr status"? If not then how
> does it pick up the difference between unversioned and newly versioned
> files? Or changes to already added files?
>
> If it needs to run "bzr status" how often do we want this to happen?
> (performance)

I would think that it would need to refresh (which would include
running status) if:
  * A file's contents has changed (The last modified changed)
  Or
  * The working tree (or branch?) parent_id's change.
and
* The window has focus.

Revision history for this message
Alexander Belchenko (bialix) wrote : Re: [Bug 412876] Re: Refresh main view after adding, and committing changes.

Gary van der Merwe пишет:
> On Thu, Aug 13, 2009 at 12:07 PM, Craig Hewetson<email address hidden> wrote:
>> Does the filesystem watcher need to run "bzr status"? If not then how
>> does it pick up the difference between unversioned and newly versioned
>> files? Or changes to already added files?
>>
>> If it needs to run "bzr status" how often do we want this to happen?
>> (performance)
>
>
> I would think that it would need to refresh (which would include
> running status) if:
> * A file's contents has changed (The last modified changed)
> Or
> * The working tree (or branch?) parent_id's change.
> and
> * The window has focus.
>

After looking at the qbzr/lib/statuscache.py I'm not sure filesystem
watcher is best idea. Maybe IPC messages will work better here in the end.

Revision history for this message
Alexander Belchenko (bialix) wrote :

I've fixed Bug #347990. HTH

Revision history for this message
Ian Clatworthy (ian-clatworthy) wrote :

This turned out to be pretty easy to do in the end. The trick was to switch to using Qt's process management instead of Python's vanilla subprocess module.

Changed in bzr-explorer:
assignee: nobody → Ian Clatworthy (ian-clatworthy)
milestone: none → 0.8
status: Confirmed → Fix Released
Revision history for this message
Craig Hewetson (craighewetson-deactivatedaccount) wrote : Re: [Bug 412876] Re: Refresh main view after adding, and committing changes.

I've tested it and it works well.

Thanks!!

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.