views:

268

answers:

2

I'm looking to automate the backup of a Windows XP file structure (a wiki) into CVS.
Through repeated calls to cvs commit and cvs add I can identify and commit changed files and newly added files, but I can't see a cvs command that would let me know a local file has been deleted.

One possibility would be to update a parallel file structure with the latest files from the repository and then remove those files that only appear in second structure, but I was hoping there was a more efficient solution?

A: 

You'll need to run cvs update, and parse the results. It will tell you which files have been added, removed, etc. Then you can use those to run the right commands. A warning: CVS isn't easy to automate, because it's not very consistent with its messages. But you'll get it working eventually.

JW
+3  A: 

You could do a

cvs -nq update

and look for lines like

cvs update: warning: SourceControlledFile.xml was lost
David Norman