I have a large project that has many changes not yet checked in. I want to check them in but have them only take effect when a certain symbol is #define d
CVS does have the ability to format diffs with #ifdef s inserted using the --ifdef argument. However, this does not merge the #ifdef s back into my working file. Even worse, the output includes some ugly header stuff that would need to be removed.
Index: path/to/my/file.h,v
===================================================================
RCS file: /path/to/my/file.h,v
retrieving revision 1.17
diff --ifdef=TEST -r1.17 file.h
Does anyone have a script that would automate the process of doing the CVS diff, removing the header stuff and copying the result back over the working file?
Great thanks if anyone can help.