Plugins: OnBeginTx

This forum is now locked, since Gold Support is no longer offered.

Moderator: SourceGear

Locked
ismangil
Posts: 197
Joined: Wed Jun 30, 2004 10:49 am
Location: Sheffield, UK
Contact:

Plugins: OnBeginTx

Post by ismangil » Wed Jul 20, 2005 8:21 am

Can I use OnBeginTx to implement a kind of "Check-in policy"? I mean, can I cancel the transaction if we don't like it? What would happen to the client?

jclausius
Posts: 3702
Joined: Tue Dec 16, 2003 1:17 pm
Location: SourceGear
Contact:

Post by jclausius » Wed Jul 20, 2005 9:21 am

Sorry, at this poing OnEndTx() is after the transaction has been committed.

Would you want to make a feature request to "halt" a transaction? If so, what information would you want available in the Transaction Triggered Event? Should the event be able to modify that information?
Jeff Clausius
SourceGear

ismangil
Posts: 197
Joined: Wed Jun 30, 2004 10:49 am
Location: Sheffield, UK
Contact:

Post by ismangil » Wed Jul 20, 2005 5:14 pm

jclausius wrote:Sorry, at this poing OnEndTx() is after the transaction has been committed.
Jeff, I was asking about OnBeginTx. Is it also the case that OnBeginTx is after it has been committed?
jclausius wrote: Would you want to make a feature request to "halt" a transaction? If so, what information would you want available in the Transaction Triggered Event? Should the event be able to modify that information?
Yes, I would like to make that a feature request then. The use case, as I have stated, is to implement a filtering check-in policy, so code only gets check in after certain things are checked. Kind of a "roll-your-own-Team Foundation Server" :wink:

I guess the information would be all the usual check-in information such as the repository item fullname, comments.

At the moment I couldn't think of a need for the event to modify the information. However it would be nice if the client (either GUI, commandline, or IDE integration) could know the reason for the failed transaction, which would be provided by the halting plugin. Messages would be like "This transaction failed check-in policy see {url} for details".[/b]

jclausius
Posts: 3702
Joined: Tue Dec 16, 2003 1:17 pm
Location: SourceGear
Contact:

Post by jclausius » Thu Jul 21, 2005 6:56 am

ismangil wrote:Jeff, I was asking about OnBeginTx. Is it also the case that OnBeginTx is after it has been committed?
Ahh. Sorry, my head was too close to the server code. The server doesn't trigger OnBeginTx, the only real available trigger is OnEndTx().
ismangil wrote:Yes, I would like to make that a feature request then. The use case, as I have stated, is to implement a filtering check-in policy, so code only gets check in after certain things are checked. Kind of a "roll-your-own-Team Foundation Server" :wink:

I guess the information would be all the usual check-in information such as the repository item fullname, comments.

At the moment I couldn't think of a need for the event to modify the information. However it would be nice if the client (either GUI, commandline, or IDE integration) could know the reason for the failed transaction, which would be provided by the halting plugin. Messages would be like "This transaction failed check-in policy see {url} for details".[/b]
OK. I'll add this to the feature request.
Jeff Clausius
SourceGear

Locked