Plugins: OnBeginTx
Moderator: SourceGear
Plugins: OnBeginTx
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?
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?
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
SourceGear
Jeff, I was asking about OnBeginTx. Is it also the case that OnBeginTx is after it has been committed?jclausius wrote:Sorry, at this poing OnEndTx() is after the transaction has been committed.
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"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?
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]
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:Jeff, I was asking about OnBeginTx. Is it also the case that OnBeginTx is after it has been committed?
OK. I'll add this to the feature request.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"
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]
Jeff Clausius
SourceGear
SourceGear