Sunday, April 25, 2010

CVS: Fix Wrong Commit Message

Occasionally, you or a team member will commit code with the wrong commit message or with a blank message. Fixing this is dangerously easy.
$ cvs admin -m1.3:"my message will replace" FILENAME

Where 1.3 is the version number that had the incorrect commit message. This will replace the message previously given.

To do a multi-line commit message, just hit enter before putting the end quote to the comment and continue writing the comment. Close the quote and put the FILENAME when done and hit enter. Something like this:

$ cvs admin -m1.3:"my message
>will
>replace" FILENAME

The > on each new line is from Linux signifying a carriage return from the previous line, but that it is all still one command.

No comments:

Post a Comment