[comp.unix.admin] RCS check in of foreign source

srp@babar.mmwb.ucsf.edu (Scott R. Presnell) (12/12/90)

Hi...
	I have a question about using RCS with source code from someone
else.  Lets say I get some source code from someone, they've used RCS so
there are RCS keywords and revision numbers in the source files.  What I'd
like to do is create a RCS file for each of the source files, continue work
on them for porting and patching and the like, then do an rcsdiff against
where I started and where I am, and use that as a patch file.  All I need
to do is recreate the last RCS "state" this source code was in.

	OK, you say, use ci or rcs: If I do that, then lots of header
infomation changes to the local information and therefore *every* file is
now different from the original as far as RCS is concerned.  Not what I
wanted, I only changed 2 of the 10 source files.  Besides, its *ugly*. 

	OK, you say, use "ci -k": That's much closer, the local information
is not used (the information from the file is), but upon the implicit co
that rcsdiff does, the log message, created by ci -k, is inserted into the
temporary file that is diffed against.  Hence, again *every* file is
different as far as RCS is concerned.

	So. How do I do this?  Am I missing a flag somewhere?

	Thanks for your help.

	- Scott Presnell


--
Scott Presnell				        +1 (415) 476-9890
Pharm. Chem., S-926				Internet: srp@cgl.ucsf.edu
University of California			UUCP: ...ucbvax!ucsfcgl!srp
San Francisco, CA. 94143-0446			Bitnet: srp@ucsfcgl.bitnet

leif@control.lth.se (Leif Andersson) (12/13/90)

>>>>> On 11 Dec 90 18:41:34 GMT, srp@babar.mmwb.ucsf.edu (Scott R. Presnell) said:

Scott> Hi...
Scott> 	I have a question about using RCS with source code from someone
Scott> else.  Lets say I get some source code from someone, they've used RCS so
Scott> there are RCS keywords and revision numbers in the source files.  What I'd
Scott> like to do is create a RCS file for each of the source files, continue work
Scott> on them for porting and patching and the like, then do an rcsdiff against
Scott> where I started and where I am, and use that as a patch file.  All I need
Scott> to do is recreate the last RCS "state" this source code was in.

I was just about to put the same question to the net, with a further
qualification:

Much of the software we use (we = all in netland?), is software that we
pick up from USENET or FTP from somewhere. We then do some minor
changes to "customize" it. Then an update comes along in patch format
and we want to apply those patches. My question is:

Assuming we have used RCS to do the local changes, how can we recreate
_exactly_ the files we started with, so that patch will be happy and
so that we then can use the various tools of the RCS/CVS package to
merge our local changes with the new version?

Leif

-------------------------------------------------------------------------------
 Leif Andersson				Internet: leif@Control.LTH.Se
 Dept. of Automatic Control             Bitnet:   BODELA@SELDC51
 Lund Institute of Technology           Phone:    +46 46 109742
 P.O. Box 118                           Fax:      +46 46 138118
 S-221 00 Lund, Sweden
-------------------------------------------------------------------------------

eggert@twinsun.com (Paul Eggert) (12/14/90)

srp@babar.mmwb.ucsf.edu (Scott R. Presnell) writes:

>	OK, you say, use "ci -k": That's much closer, the local information
>is not used (the information from the file is), but upon the implicit co
>that rcsdiff does, the log message, created by ci -k, is inserted into the
>temporary file that is diffed against.  Hence, again *every* file is
>different as far as RCS is concerned.

This bug is fixed in RCS version 5, which will be released soon.

eggert@twinsun.com (Paul Eggert) (12/14/90)

leif@control.lth.se (Leif Andersson) writes:

>Assuming we have used RCS to do the local changes, how can we recreate
>_exactly_ the files we started with....

In RCS version 5 (to be released soon), if the original file was checked out
via default keyword expansion at the sender's site, and checked in via `ci -k'
at the receiver's site, then `co' will retrieve the same file.  However, the
real world is not always this ideal; for example, the sender may be using an
older version of RCS.  So in RCS version 5, `co' has a new `-ko' option that
retrieves exactly the file you checked in.

aap@praxis.co.uk (Andy Pryor) (12/14/90)

leif@control.lth.se (Leif Andersson) writes:

>Assuming we have used RCS to do the local changes, how can we recreate
>_exactly_ the files we started with, so that patch will be happy and
>so that we then can use the various tools of the RCS/CVS package to
>merge our local changes with the new version?

It sounds to me as though you need to use the "-j" option of the "co" command.

If you keep your changes to the distributed software on a RCS branch, you can
use the -j option to merge your changes into a new release.
-- 
Andy Pryor
Computer General Electronic Design Ltd,            Email: aap@cged.uucp
The New Church, Henry St, Bath, BA1 1JR, UK        Phone: +44 225 482744