> Hi Colin
> I am working with files in RCS. 
> I want to move a xx.ppc file to xx.c in RCS. Can I use the following command?
> mv applib/RCS/xx.ppc,v applib/RCS/xx.c.v 
> Is it ok to move files to different extensions?
> Your feedback is much appreciated.
> Thanks
> Lakshmi

Lakshmi

(First of all, please don't send messages as HTML mail - it makes them
much harder to read.)

Yes, the command you mentioned will be fine. Remember that if you do
that you need also to rename or remove the corresponding working file:

        > ls -R
        .:
        RCS/  xx.ppc
        
        ./RCS:
        xx.ppc,v
        > mv RCS/xx.ppc,v RCS/xx.c,v
        > ls -R
        .:
        RCS/  xx.ppc
        
        ./RCS:
        xx.c,v

Note how the working file 'xx.ppc' is still present. You need either
to rename it (mv xx.ppc xx.c) or delete it and regenerate it:

        rm -f xx.ppc; co xx.c

To save me remembering, I have a script (I call it rcsmv) that does
all this for me - see attachment.

This also checks whether the target for the move is a directory, in
which case the file isn't renamed, but moves the file into that
directory, making sure to put the RCS file in the right place.

Cheers

Colin

----------------------------------------------------------------------
Colin Brough                             [EMAIL PROTECTED]
#!/bin/bash -

if [ ! $# = 2 ] ; then
    echo "usage: $0 target destination" 1>&2
    exit 1
fi

#----------------------------------------
# If the target is a directory, move the
# file there, and the RCS file into the
# appropriate RCS directory.

if [ -d $2 ]; then
    mv $1 $2
    if [ ! -d $2/RCS ]; then
        mkdir $2/RCS
    fi
    mv RCS/$1,v $2/RCS
else
    #------------------------------------
    # Rename the file and its RCS history
    mv $1 $2
    mv RCS/$1,v RCS/$2,v
fi

exit 0
_______________________________________________
Help-rcs mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/help-rcs

Reply via email to