[Cvsnt] TRIGGER Commit and Export

Arthur Barrett arthur.barrett at march-hare.com
Mon Dec 17 11:04:22 GMT 2001


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.


We do something quite similar and it works fine.

The main difference is that we call an .EXE rather than a shell script.  Why
not call the cvs.exe directly rather than via the shell script ?

Here is our code:
			pid=_spawnlp(_P_NOWAIT,
						argv[0],argv[0],
						"-x",
						(*nargv)[1], // inuse
						(*nargv)[2], // reference
being deleted
						(*nargv)[s2w-1], // seconds
to wait
						(*nargv)[s2w], // default
directory
						cmd,NULL); // param 6 etc

Don't worry about the details, but you should be able to understand the
general idea.

The reason why your script does not execute is probably that SYSTEM does not
have access to the console.

You could try allocating the SYSTEM user these priveleges, but I think the
other solution is cleaner:
--> Access this computer from network
--> Act as part of the operating system
--> Create a token object
--> Increase quotas
--> Increase scheduling priority
--> Log on as a batch job
--> Log on as a service
--> Restore files and directories
--> Replace a process level token
--> Take ownership of files or other objects
--> Log on locally

You'll probably have to reboot for this to have an effect.

Regards,


Arthur Barrett
Uniface Version Control Solutions
http://march-hare.com



> -----Original Message-----
> From:	Franck Marchand [SMTP:marchand2.franck at wanadoo.fr]
> Sent:	Monday, December 17, 2001 9:53 PM
> To:	cvsnt at cvsnt.org cvsnt downloads at march-hare.com @CVSNT on Twitter CVSNT on Facebook
> Subject:	[Cvsnt] TRIGGER Commit and Export
>
> This is a multi-part message in MIME format.
> --
> [ Picked text/plain from multipart/alternative ]
> Hi all
>
> How can I do to export a module after a commit ?
>
> I've seen in the documentation that it's possible to trig a script which
> start a background process to do the export.
> Like this, the export is not blocked by lock files. It works fine with
> linux thank to '&'.
>
> But how can I do the same thing with windows ?
>
> I tried to create a C program which use the function CreateProcess to trig
> a Cvs Export command.
> And it works fine if I'm in Local mode, If I change to Pserver mode, it
> doesn't work :
> the commit finish well whereas the C program doesn't do nothing.
>
> I try with this :
>
>  //cvs -s Cmd=-I export -kv -D now -d ExportTestWin TestWin > test07
>  if(!CreateProcess(NULL, "ExecuteExport.cmd", NULL, NULL, TRUE,
>    CREATE_DEFAULT_ERROR_MODE | CREATE_NEW_CONSOLE, NULL, NULL, &StartInfo,
> &Process))
>  {
>   i=1;
>   // Erreur au lancement du programme
>  }
>
>
> The file 'ExecuteExport.cmd' contains :
> cvs -s Cmd=-I export -kv -D now -d ExportTestWin TestWin > test07
>
>
> ==>The file 'test07' only are created.
>
>
>
> (Sorry for my english)
>
> Thank you for your help.
> Bye
> --
>
> _______________________________________________
> Cvsnt mailing list
> Cvsnt at cvsnt.org
> http://www.cvsnt.org/cgi-bin/mailman/listinfo/cvsnt https://www.march-hare.com/cvspro/en.asp#downcvs
_______________________________________________
Cvsnt mailing list
Cvsnt at cvsnt.org
http://www.cvsnt.org/cgi-bin/mailman/listinfo/cvsnt https://www.march-hare.com/cvspro/en.asp#downcvs



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