[cvsnt] Re: CVS - Automatic Checkin Tool

Gerhard Fiedler lists at connectionbrazil.com
Fri May 19 12:10:12 BST 2006

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.

ISalim at Monogram.zodiac.com wrote:

> I'm trying to  write a script (batch,perl) to copy files from the FTP into
> the repository automatically.If the application find a difference against
> the changed file
> and the one from the repository, then it will be added automatically.
> Otherwise it will skip through and go to the next file/directories.
> So the step I actually need to perform is:
> 1. Copy files from FTP into the CVS client's local folder
> 2. Using CVS, update sandbox with the recent files from the server.
> 3. Compare if there're any differences found between the current file from
> the repository against the one from the FTP.
> 4. If there're any changes/differences then perform an CVS command (add &
> commit) to this file.

I think that's a bit easier still, if you don't remove files from the ftp
1- Update the sandbox (so it is at the latest state from the server).
2- Copy the contents from the ftp site over the sandbox files. Now some
files will have changed, others will have been added. 
3- Run the add command recursively over the whole directory tree. It will
ignore files that are already in cvs and add the new ones. (You may have to
run it multiple times if you want to add files with specific expansion
options that are different from the defaults.)
4- Run a commit on the whole repository tree. Again, unchanged files will
be ignored by the commit.

If you want to remove files from the ftp site and want this removal to be
reflected in the repository, I think you really have to ftp the remote site
to a temporary directory, compare this copy file by file with the sandbox
and do either a copy+cvs-add (file in ftp copy but not in sandbox),
cvs-remove (file in sandbox but not in ftp copy) or a copy (file in sandbox
and ftp copy, but different), followed by a commit of the sandbox (and
deleting the temporary copy of the remote ftp site).


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