I would like to automatically call code during the commit function that would read the source code being committed and update the Vault commit comment for that version. I was given the impression that it is possible to get hooks into this process on the server, but am not sure where to begin looking. Could someone point me in the right direction, or at least tell me whether it's possible or not?
TIA,
Brian Welsch
Calling external code during commit
Re: Calling external code during commit
You could use the VaultPro Client API and write something that asks for the VersionHistory of just 1 row of $/ every couple of seconds. When the version changes, make modifications through the client API.
You can download the Client API from our Downloads page:
http://www.sourcegear.com/vault/downloads.html
You can download the Client API from our Downloads page:
http://www.sourcegear.com/vault/downloads.html
Linda Bauer
SourceGear
Technical Support Manager
SourceGear
Technical Support Manager
-
- Posts: 3
- Joined: Thu Sep 27, 2012 1:59 pm
Re: Calling external code during commit
Does this mean there isn't a way to trigger calling that process specifically on a commit?
I'm ignorant still on the actual database layout, but would the polling idea be able to check for Version changes on each file(easily tens of thousands of files) within the repository fairly quickly? If so, that may an acceptable way to go.
Thanks, Brian
I'm ignorant still on the actual database layout, but would the polling idea be able to check for Version changes on each file(easily tens of thousands of files) within the repository fairly quickly? If so, that may an acceptable way to go.
Thanks, Brian
Re: Calling external code during commit
No. Not at this time.Does this mean there isn't a way to trigger calling that process specifically on a commit?
Possibly. But that would bypass security, and if not careful may interfere with Vault operations if the database locks something that it should not.would the polling idea be able to check for Version changes on each file(easily tens of thousands of files) within the repository fairly quickly? If so, that may an acceptable way to go.
A more preferable way would be to run the history query on $/ to return just one version. When this changes, you can then query history for whatever version(s) you want, and gather what happened from that query.
Linda Bauer
SourceGear
Technical Support Manager
SourceGear
Technical Support Manager