[cvsnt] Scripting

Bo Berglund Bo.Berglund at system3r.se
Mon Jun 23 14:53:45 BST 2003


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.


I think that "copy" is not a valid executable...

Create a batch file and call it something like c:\temp\test.bat (innovative!)
then enter this inside:
copy %1 D:\

In the loginfo file you could enter:
ALL c:\temp\test.bat c:\temp\test.bat

This should copy the batch file itself over to the D:\ drive just as a test.

Using the {s} is not at all that simple as you might think, because the parameter
you will get is not the name of a real file, instead it is a list of the file(s)
committed (space separated) and these names refer to the module that is processed.
I actually don't know how you could get hold of the files themselves in this case.
There will be temporary working copies available in some temp dir, but you will
have to find out where. Not easy.

I think that you are better off trying a different approach in the batch file:
D:
cd \test\module
cvs update

If the d:\test\module is a checked out sandbox than chances are that you will get
these files updated and thus a fresh copy of what was checked out.
But beware of security settings, some protocols will not allow this kind of operation.
In that case maybe this will work:
D:
cd \test
if EXIST module rmdir /s /q module
set CVSROOT=:pserver:<your user account>:<your account password>@<your server>:/<your repository>
cvs export -r HEAD %1

Here you will have to supply the cvs login explicitly (username and password) on the
command line.
Again, this will get you the complete module contents, not only the files you were intyerested in.

Maybe you can go from here....

/Bo


-----Original Message-----
From: ERNST KUSCHKE [mailto:ernstkus at sasa.org.za]
Sent: den 23 juni 2003 14:18
To: Bo Berglund
Subject: RE: [cvsnt] Scripting


Thanks.
However, I get:
   cvs server: syntax error at line 1 file loginfo; ignored
from a TortoiseCVS client when I do a simple test.
I put the following line in my loginfo-file:
   ALL copy %{s} d:\;

Is it my use of %{s} ? Do I need to point to the full path of 'copy' ?

-Ernst


>>> "Bo Berglund" <Bo.Berglund at system3r.se> 23 June 2003 01:39:53 PM >>>
You should probably use the postcommit script file insetad because it is triggered when everything is ready and there are no dangling tasks remaining.
The exact syntax is probably available on the cvsnt.org website, but should be similar to the other scripts:
<regular expression> <command to execute> <command line parameters>
where:
<regular expression> is a string telling CVSNT which selection to trigger for.
<command to execute> is a normal Windows command to run (executable only) and must *not* contain spaces
<command line parameters> are a space delimited list (that is why spaces are not allaowed above) of command parameters

Example:
ALL D:\Programs\CVSNT\mybatchfile.bat thisparameter thatparameter
will execute the mybatchfile.bat with the two given parameters for every commit that is done (ALL).

/Bo

-----Original Message-----
From: ERNST KUSCHKE [mailto:ernstkus at sasa.org.za] 
Sent: den 23 juni 2003 11:49
To: <cvsnt at cvsnt.org cvsnt downloads at march-hare.com @CVSNT on Twitter CVSNT on Facebook 
Subject: [cvsnt] Scripting


Greetings to everyone on the list - I'm new here.

I recently started digging into the world of CVS, and it's all still pretty overwhelming.
I run the CVSNT server on a Windows 2000 server.
As soon as I commit a file to a repository, I would like a dummy-copy of this new version to be copied to a certain directory, and then run a batch-file against this dummy-file.
I know that I should probably do some scripting in the loginfo -file.
What exactly is the format of this file? I see lots of Perl examples. Can I run a Windows batch-file from there? (IOW something like copy c:\blah.foo d:\blah.foo)??

Thanks,

Ernst Kuschke

Software Developer
Information Systems
Finance & Administration Division
South African Sugar Association

Tel:  +27 (0) 31 539-5300
Fax:  +27 (0) 31 539-2951

http://www.sugar.org.za/ 

**************************************************************************************************************************************
This message is for the named person's use only. It may contain confidential, proprietary or legally privileged information.  If you receive this message in error, please immediately delete it and all copies of it from your system, destroy any hard copies of it and notify the sender.  You must not, directly or indirectly, use, disclose, distribute, print, or copy any part of this message if you are not the intended recipient. Any comments or opinions in this email or its attachments are merely stating our views and carry no guarantee as to their accuracy.

Although the sender endeavours to maintain a computer virus free network, the sender does not warrant that a computer virus has not been transmitted herewith and urges you to virus-check this e-mail message. Accordingly, the sender will not be liable for any damages as a result of transmission of a computer virus with this e-mail message

The South African Sugar Association reserves the right to monitor all e-mail communications through its networks.
**************************************************************************************************************************************
_______________________________________________
cvsnt mailing list
cvsnt at cvsnt.org cvsnt downloads at march-hare.com @CVSNT on Twitter CVSNT on Facebook 
http://www.cvsnt.org/cgi-bin/mailman/listinfo/cvsnt https://www.march-hare.com/cvspro/en.asp#downcvs

**************************************************************************************************************************************
This message is for the named person's use only. It may contain confidential, proprietary or legally privileged information.  If you receive this message in error, please immediately delete it and all copies of it from your system, destroy any hard copies of it and notify the sender.  You must not, directly or indirectly, use, disclose, distribute, print, or copy any part of this message if you are not the intended recipient. Any comments or opinions in this email or its attachments are merely stating our views and carry no guarantee as to their accuracy.

Although the sender endeavours to maintain a computer virus free network, the sender does not warrant that a computer virus has not been transmitted herewith and urges you to virus-check this e-mail message. Accordingly, the sender will not be liable for any damages as a result of transmission of a computer virus with this e-mail message

The South African Sugar Association reserves the right to monitor all e-mail communications through its networks.
**************************************************************************************************************************************


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