HP3000-L Archives

January 1997, Week 3

HP3000-L@RAVEN.UTC.EDU

Options: Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
Ted Ashton <[log in to unmask]>
Reply To:
Ted Ashton <[log in to unmask]>
Date:
Fri, 17 Jan 1997 10:47:10 -0500
Content-Type:
text/plain
Parts/Attachments:
text/plain (149 lines)
Greetings,
  Having no budget for new software and having had good success with RCS on
various UN*X systems, I was delighted to find it on our 5.5 system.  However,
we work in QEDIT almost exclusively and I ran up against the incompatability
of the two systems.  It seemed a shame to give up that easily, so I created a
couple of scripts which I'd like to offer here in hopes someone else can make
use of them.  The first is called simple CI (I seldom run CI.PUB.SYS other than
by logging in, so it was little loss to have to type CI.PUB.SYS if I wanted it)

-----------8<------------8<-------------8<-------------8<----------------
parm file,version=""
#
#  Command file to check a file in after editing using RCS.
#    Written by Ted Ashton
#
#  $Id: CI 1.8 1997/01/08 16:52:41 ADMDEV.ADMIN Exp $
#
#  $Log: CI $
# Revision 1.8  1997/01/08  16:52:41  ADMDEV.ADMIN
# Changed final ACD and handled the case where no conversion is necessary.
#
# Revision 1.7  1997/01/07  15:35:32  ADMDEV.ADMIN
# Added version capability.
#
# Revision 1.6  1997/01/06  17:17:02  ADMDEV.ADMIN
# Multiple changes for QEDIT files.
#
# Revision 1.5  1997/01/06  15:57:16  ADMDEV.ADMIN
# Fixed syntax error in altsec
#
# Revision 1.1  1997/01/03  16:56:51  ADMDEV.ADMIN
# Initial revision
#
#
setvar hfsfile finfo("!file","POSIXFULLFNAME")
setvar fileacct finfo("!file","ACCOUNT")
setvar ffile finfo("!file","FULLFNAME")
echo !hfsfile
if (finfo("!ffile","FCODE") = 111) then
  echo The file !file is a QEDIT file and will be converted to a text
  echo file and back everytime it is checked in and out.
  setvar qedit_conversion "Y"
  run qedit.pub.sys;parm=128;info="t !ffile;k,y"
else
  setvar qedit_conversion "N"
endif
rename !ffile,CITEMP
tobyte.hpbin.sys;info="-at ./CITEMP !hfsfile"
purge CITEMP
echo Checking !hfsfile in under RCS.
if ("!version" = "") then
  ci.hpbin.sys;info="-u !hfsfile"
else
  ci.hpbin.sys;info="-u -r!version !hfsfile"
endif
rename !ffile,CITEMP
frombyte.hpbin.sys;info="./CITEMP !hfsfile"
purge CITEMP
if (qedit_conversion = "Y") then
  run qedit.pub.sys;parm=128;info="t !ffile;sh *,y"
endif
altsec !ffile;newacd=(r,l,x,racd:$OWNER;r,x,racd:$GROUP_MASK;&
  r,x,racd:$GROUP;r,x,racd:@.!fileacct;racd:@.@)
-----------8<------------8<-------------8<-------------8<----------------

. . . and its counterpart CO . . .

-----------8<------------8<-------------8<-------------8<----------------
parm file,version=""
#
#  Command file to check a file out for editing using RCS.
#    Written by Ted Ashton
#
#  $Id: CO 1.2 1997/01/17 15:33:01 ADMDEV.ADMIN Exp $
#
#  $Log: CO $
# Revision 1.2  1997/01/17  15:33:01  ADMDEV.ADMIN
# Numerous changes to handle QEDIT, etc.
#
# Revision 1.1  1997/01/06  15:27:41  ADMDEV.ADMIN
# Initial revision
#
#
setvar hfsfile finfo("!file","POSIXFULLFNAME")
echo !hfsfile
if (finfo("!file","FCODE") = 111) then
  echo QEDIT file: converting.
  setvar qedit_conversion "Y"
else
  setvar qedit_conversion "N"
endif
echo Checking !hfsfile out under RCS.
if ("!version" = "") then
  co.hpbin.sys;info="-l !hfsfile"
else
  co.hpbin.sys;info="-l -r!version !hfsfile"
endif
rename !file,COTEMP
frombyte.hpbin.sys;info="./COTEMP !hfsfile"
purge COTEMP
if (qedit_conversion = "Y") then
  run qedit.pub.sys;parm=128;info="t !file;sh *,y"
endif
-----------8<------------8<-------------8<-------------8<----------------

I've also created a script which does an rlog -l

-----------8<------------8<-------------8<-------------8<----------------
parm file
# $Revision: 1.1 $
#
# Commandfile frontend to RCS command rlog -l
#
# $Log: RSTAT $
# Revision 1.1  1997/01/08  16:43:58  ADMDEV.ADMIN
# Initial revision
#
setvar hfsfile finfo("!file","POSIXFULLFNAME")
rlog.hpbin.sys;info="-l !hfsfile"
-----------8<------------8<-------------8<-------------8<----------------

CI converts the file to bytestream, does a ci -u and then converts the result
back, setting and ACD on the final result so that a following CO won't
complain.  I'm not really happy with the ACD, but I'm not sure of better
options.  CO does a co -l and converts the result to QEDIT or fixed ascii as
prefered.  You have to create RCS directories in whatever group your original
file resides.  Also, for files in which the line number is stored at the end
of the fixed ascii line, it's wiser not to use $Log$, as RCS has no idea that
it should deal with those.  You can use the rcs command within the shell to
set the comment leader for other files, though.  Also, if you wish to check a
file back in without changing it (basically to release the lock on it), you are
stuck either adding a I-made-no-changes change message or messing around with
rcs in sh to release the lock.  I'm not sure why this is.  Typically, when RCS
recognizes that there have been no changes, it simply releases the lock and
leaves things as they were.  Any light shed upon this subject would be
appreciated.

As far as the scripts go, feel free to change as suits your fancy.  If you want
your changes incorporated and think that they would be of help to others, let
me know.  As always, no promises about the results of the scripts themselves.
I hacked them together for our site and may yet find problems with them.

Ted
--
Ted Ashton ([log in to unmask]) | From the Tom Swifty collection:
Southern Adventist University    | "I was in a riot in Paris", Tom noised
Collegedale, TN  37315           | abroad.
(423) 238-2703                   |

ATOM RSS1 RSS2