List Info

Thread: How do I change into the background thread in wb_subversion_history.py?




How do I change into the background thread in wb_subversion_history.py?
user name
2007-05-21 16:52:41
I am trying to implement a "Revision Changes"
button in the
history dialog that brings up a new list dialog that lists
all files changed between the selected revisions and allows
me to view the diff between the revisions for any of these
files.

I would like the function that retrieves the data to run in
the background, so the GUI stays responsive.

I did not find an example how to do this.
Quite the opposite - the code for the "Diff"
button says:

        #
        #   history does not need to have the diff code run
in the background
        #   so just step the generator
        #
        if type(generator) == types.GeneratorType:
            while True:
                try:
                    generator.next()
                except StopIteration:
                    # no problem all done
                    break

Is it impossible to use the background thread in
wb_subversion_history.py?

Here is what I have so far:


    def OnRevisionChangesCommand( self, event ):
        info1, info2 = self.getPathInfos()
        log_entries = self.project_info.client_bg.log(
self.project_info.url, info2.revision, info1.revision,
discover_changed_paths=True )
        changed_states = {}
        repos_root_url = self.project_info.client_bg.info2(
self.project_info.wc_path )[0][1]['repos_root_URL']
        ....

Changing that to

    def OnRevisionChangesCommand( self, event ):
        info1, info2 = self.getPathInfos()
        yield self.app.backgroundProcess
        log_entries = self.project_info.client_bg.log(
self.project_info.url, info2.revision, info1.revision,
discover_changed_paths=True )
        changed_states = {}
        repos_root_url = self.project_info.client_bg.info2(
self.project_info.wc_path )[0][1]['repos_root_URL']
        yield self.app.foregroundProcess
        ....

does not work.
What must I do instead?

Thanks and Cheers,
Carsten.

------------------------------------------------------------
---------
To unsubscribe, e-mail: dev-unsubscribepysvn.tigris.org
For additional commands, e-mail: dev-helppysvn.tigris.org


Re: How do I change into the background thread in wb_subversion_history.py?
user name
2007-05-23 14:47:38
Carsten Koch wrote:
...
> I would like the function that retrieves the data to
run in
> the background, so the GUI stays responsive.

I take that question back and apologize.
Of course I already have the log in the history dialog.
So the best way to keep the GUI responsive is not to
retrieve
the log a second time. 

Carsten.

------------------------------------------------------------
---------
To unsubscribe, e-mail: dev-unsubscribepysvn.tigris.org
For additional commands, e-mail: dev-helppysvn.tigris.org


[1-2]

about | contact  Other archives ( Real Estate discussion Medical topics )