I would like to be able to do a cvs commit, but provide multi-line comments from a file instead of letting cvs invoke the editor. Is this even possible?
Asked
Active
Viewed 345 times
3 Answers
2
Use the -F flag thus:
cvs commit -F file <files to commit>

Burhan Ali
- 2,258
- 1
- 28
- 38

ADW
- 4,030
- 17
- 13
0
This probably do the job:
cvs commit -m "$(cat file)" modified_file.c

KARASZI István
- 30,900
- 8
- 101
- 128
-
This relies on bash to cat the file, it won't necessarily work with other shells (e.g. csh) – ADW Apr 13 '12 at 15:33
-
-
Sorry, badly worded comment, I meant that the use of "$(command)" is a bash thing. – ADW Apr 13 '12 at 15:36
0
Supposing you did mean commit, not update, which does not require comments, you could do
cvs commit -m `cat file_containing_multiline_comments` file_to_commit

Arialdo Martini
- 4,427
- 3
- 31
- 42
-
Doesn't work if the commit message contains spaces as the backticks will expand each word in the file to a separate argument to cvs. – ADW Apr 13 '12 at 15:31