[rfc] branch/merge/push/pull operations with remote location (sftp/ftp) that require password and GUI

Martin Pool mbp at canonical.com
Tue Nov 7 03:10:56 GMT 2006


On 28 Oct 2006, Aaron Bentley <aaron.bentley at utoronto.ca> wrote:
> Alexander Belchenko wrote:
> > I think that simple solution could be to raise some custom exception
> > when user clicks CANCEL (IIUC, this exception should be raised from
> > within method that invoked by bzrlib to update progress bar). And in
> > main GUI code that invoke long bzrlib operation just catch this error.
> > 
> > I'm slightly worrying about state of bzrlib after this termination. Is
> > it safe way or I need to use something different?
> 
> I think it's a very similar situation to KeyboardInterrupt, which we
> handle just fine.

Well, it is substantially different in that the whole program stops
after KeyboardInterrupt, whereas for a cancel button the user would
expect to be able to continue with something else.  An exception at an
unexpected time is likely to leave things in an inconsistent state.  So
I think the core needs to specifically and regularly ask "should I stop
now?"

-- 
Martin




More information about the bazaar mailing list