1

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

ha9u63a7
  • 6,233
  • 16
  • 73
  • 108
  • Are you being forced to use RCS? Pretty much every VCS system out there is better than RCS (Git is my favorite). – George Hilliard May 15 '14 at 19:46
  • @thirtythreeforty. Yes...I m being forced to....my all time favourite is svn but cannot use it now – ha9u63a7 May 17 '14 at 08:40
  • 3
    @thirtythreeforty RCS is file-based, and extremely lightweight. It's still a good choice for file-based revision control in certain use cases. – Todd A. Jacobs Jul 23 '14 at 14:34

2 Answers2

1

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
Todd A. Jacobs
  • 81,402
  • 15
  • 141
  • 199
  • thanks for that, I've already got the solution. The cygwin bash that I'm using has got `use` and `put` commands instead of `co` and `ci` respectively. But you are right saying that I can do multiple files, not files as a group. I will change the text in my original question. – ha9u63a7 Jul 24 '14 at 16:01
  • I haven't checked that....I usually do 'use -e my_filename.ext" and `put -y "comments" my_filename.ext` – ha9u63a7 Jul 24 '14 at 22:24
  • @hagubear: Try `type use` and `type put`. (That's if you use bash or something similar; if you use tcsh, try `where use` and `where put`). If you reply, don't forget the at-sign followed by my name; otherwise I won't be notified. – Keith Thompson Jul 26 '14 at 00:28
0

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.

Wayne
  • 21
  • 1