home *** CD-ROM | disk | FTP | other *** search
- From: aap@praxis.co.uk (Andy Pryor)
- Newsgroups: alt.sources
- Subject: Re: Converting sccs to rcs
- Message-ID: <5033@newton.praxis.co.uk>
- Date: 18 Apr 90 08:12:12 GMT
-
- ron@rdk386.uucp (Ron Kuris) writes:
-
-
- >Here is a bourne/korn shell function to convert sccs files to rcs
- >files. I've tried it on quite a few and it seems to work well.
-
- >This puppy converts the comments and maintains the version numbers
- >too! Just pass it all the s.* files and it produces ,v files for
- >you. If you create an RCS directory, the files will be placed there.
- >Otherwise, they'll be in your current directory.
-
- >Also note you'll get an error during the initial 'co' of the file
- >that hasn't been started yet. This is normal and can be ignored.
- >(actually, somebody fix it and keep it fast, please).
-
- Inspired by the above posting, I've enhanced it to fix the initial 'co' error
- and to preserve the timestamp and username associated with each delta. The
- previous posting did not handle branch deltas - I've also fixed this.
-
- BTW It's now a perl script (and its not been exhaustively tested!)
-
- #!/usr/local/bin/perl
-
- foreach $sccsfile ( @ARGV )
- {
- ($rcswfile = $sccsfile) =~ s/.*s\.(.*)$/$1/;
-
- foreach $delta ( split(/\n/,`prs -e -d":DS: :I: :D:,:T: :P:" $sccsfile | sort -n`))
- {
- ($seq,$sid,$date,$user) = split(/ /,$delta);
-
- if( $seq != 1 )
- {
- eval `co -l -r$sid $rcswfile\n`;
- eval `rm -f $rcswfile\n`;
- }
-
- eval `get -r$sid $sccsfile\n`;
- ( $sccscomment = `prs -d:C: -r$sid $sccsfile` ) =~ s/\n/ /g;
- eval `ci -r$sid -d$date -w$user -m\"$sccscomment\" $rcswfile\n`;
- }
- }
-
- .............................................................................
- | ARPA : aap@praxis.co.uk | Andy Pryor |
- | JANET : aap@uk.co.praxis | PraXis Electronic Design |
- | UUCP : ...!uunet!mcvax!ukc!praxis!aap | The New Church |
- | : | Henry Street |
- | : | Bath |
- | Phone : +44 225 444700 | BA1 1JR UK |
- .............................................................................
-
-
- ............................................................................
- | ARPA : aap@praxis.co.uk | Andy Pryor |
- | JANET : aap@uk.co.praxis | PraXis Electronic Design |
-