5 messages in com.perforce.perforce-user[p4] ClientApi: stopping command
FromSent OnAttachments
Carsten Orthbandt18 May 2002 05:11 
Chuck Karish18 May 2002 08:57 
Carsten Orthbandt18 May 2002 09:13 
Robert Cowham18 May 2002 10:34 
Carsten Orthbandt19 May 2002 02:14 
Subject:[p4] ClientApi: stopping command
From:Carsten Orthbandt (cars@sek-ost.de)
Date:05/18/2002 09:13:06 AM
List:com.perforce.perforce-user

_If_ the requested operation does change database state at all (I think p4 fstat //... does not) and client communication is needed for completion, the whole transaction will surely be abandoned. I'm quite sure that if I Ctrl-C a "p4 sync" op on the client, the server is not able to push more files. There are two possibilities (did not check): 1: Server state for transmitted files is updated, state for files not transmitted stays "old rev" 2: Whole client state stays unchanged (that's what a real atomic transaction would do).

IMO, sync is not necessarily to be considered atomic, so I'd rather expect case 1. I'll check this when I have good reason to sync something large...

After all, this does not answer my question how to stop the server pushing megabytes of output through the client API if the client app decides it has seen enough. I could simply shut down the whole ClientApi, ClientUser and Error objects. But I think this is a bad idea because: - We're in the middle of an operation, so call stack and client state might be a serious issue. - I'm reusing the same ClientApi for the whole life of my shell app and I'd like to keep it this way.

"Wenn ich Visionen habe, gehe ich zum Arzt." - Helmut Schmidt

-----Original Message----- From: Chuck Karish [mailto:karish at well.com] Sent: Saturday, May 18, 2002 5:58 PM To: Carsten Orthbandt; perforce-user at perforce.com Subject: Re: [p4] ClientApi: stopping command

At 02:12 PM 5/18/2002 +0200, Carsten Orthbandt wrote:

I'm looking for a way to stop a command issued through the P4 Api. Just like it breaks in the shell if I press Ctrl-C.

What does happen when you type an interrupt character on the keyboard? The client utility exits and screen output stops, but often the requested action continues on the server.

Chuck Karish karish at well.com (415) 317-0182