Question

I would like to know if there is any way to commit multiple files together in RCS. When i say together, it means that I have done my changes to multiple files but they are to be included in the same commit. I know that the checkin command is:

ci -u filename

Also, I know that for using a log message:

ci -u -m 'message' filename.ext

If someone could help me out, it will be great!

THNX

Was it helpful?

Solution

Pass Multiple Files as Arguments

RCS is file-based, so you can't really commit groups of files as a group. However, you can certainly pass multiple files to the ci command, and it will process each one in turn. You can even use the same commit message for all files checked in this way. For example, given both /tmp/foo and /tmp/bar are already in RCS:

$ $ ci -l -m'Interesting commit.' /tmp/foo /tmp/bar
/tmp/foo,v  <--  /tmp/foo
new revision: 1.2; previous revision: 1.1
done
/tmp/bar,v  <--  /tmp/bar
new revision: 1.2; previous revision: 1.1
done

OTHER TIPS

Can you also apply a multi-line log message to multiple files by reading it from a file on the command line.

Let's say your multi-line log message is in a file named commit.msg.

ci -l -m"$(cat commit.msg)" /tmp/foo /tmp/bar

Note, the quotes on either side of the parens are required.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top