[cvsnt] Re: how to get the branch information before

Bo Berglund bo.berglund at telia.com
Sat Nov 5 15:33:39 GMT 2005


Community technical support mailing list was retired 2010 and replaced with a professional technical support team. For assistance please contact: Pre-sales Technical support via email to sales@march-hare.com.


On Sat, 5 Nov 2005 21:17:57 +0800, Xiaoyan Jin <xiaoyan.jin at gmail.com>
wrote:

>You can use the CVSROOT/precommand or CVSROOT/commitinfo scripts.
>Probably commitinfo makes more sense since it is meant to be used as a
>check against false commits.
>Look in the docs for these scripts.
>

> Yes, I have tried CVSROOT/commitinfo. I added the following line at
>CVSROOT/commitinfo:
>New1 F:\Project.exe
> Project.exe is the application, which try to catch the parameters and I
>found that only one parameter is catched by the application. The parameter
>is the committing file storage path on cvs server. For example, I get the
>following info "/RootTest/New1". But this parameter still can not help me to
>confirm the branch.
>So, any more idea?

Yes, you can get all the info you need by adding command line argument
to your call to the Project.exe file (by the way you should only use
forward slashes inside the CVS script files, \ is treated as an escape
character).
Look in the helpfile for CVSNT under the section "Reference manual for
Adminstrative files", specifically at the chapter "The commit support
files".
Here you can see which command arguments you can use to get almost all
the info you need to cope with the problem at hand.

One note, though:
A commit is done on many files at the same time and these files need
not belong to the same branch, so you need to examine the branch info
file by file. But there is only one exit code to stop the commit, and
it is going to block the whole commit.


/Bo
(Bo Berglund, developer in Sweden)



More information about the cvsnt mailing list
Download the latest CVSNT, TortosieCVS, WinCVS etc. for Windows 8 etc.
@CVSNT on Twitter   CVSNT on Facebook