info-cvs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: address@hidden: Re: rename in cvs]


From: Greg A. Woods
Subject: Re: address@hidden: Re: rename in cvs]
Date: Thu, 11 Oct 2001 21:57:04 -0400 (EDT)

[ On , October 11, 2001 at 17:55:15 (-0400), Sam Steingold wrote: ]
> Subject: Re: address@hidden: Re: rename in cvs]
>
> > * In message <address@hidden>
> > * On the subject of "Re: address@hidden: Re: rename in cvs]"
> > * Sent on Thu, 11 Oct 2001 17:08:07 -0400 (EDT)
> > * Honorable address@hidden (Greg A. Woods) writes:
> >
> > I suggest you do a survey of similar tools and count the number that
> > can do exactly what you want.  I suspect you'll find that number to be
> > quite low and almost certainly only include high-end commercial
> > packages.
> 
> As I said in another message, in Emacs, M-x vc-rename-file RET will work
> when the back-end is RCS or SCCS, but not when it is CVS.

Do you have any clue at all what you're talking about?  Do you really
know what vc-rename-file does?  Do you understand the temporal
consequences of such an operation?  It would seem not.

> I have no idea what SCCS is, but I thought that RCS was _more_ primitive
> than CVS.

Well, CVS is little more than a simple integrated wrapper around RCS.
It could have been built just about as easily on SCCS, which is really
just a silghtly better (but a little more restricted) tool like RCS.

CVS isn't really more or less primitive than RCS from an overal change
management process perspective.  All CVS does is make it possible to
automate a number of RCS operations in a convenient manner.

> All the problems you are talking about here (merging &c) arise for one
> simple reason - you do not have "cvs mv" and you make people think that
> "cvs add/rm" has anything to do with renaming.

It's FAR deeper than that I'm afraid.

Here's a simple "cvs-mv" script for you:

        #! /bin/sh
        #
        #       cvs-mv -- for the command-line challenged
        #
        if [ $# -ne 2 -o ! -f "$1" -o ! -f "$2" ] ; then
                echo "usage: cvs-mv oldfile newfile" 2>&1
                exit 2
        fi
        #
        oldpath=$1
        newpath=$2
        oldfile=$(basename $oldpath)
        newfile=$(basename $newpath)
        olddir=$(dirname $oldpath)
        newdir=$(dirname $newpath)

        cp "$oldpath" "$newpath"
        cd "$olddir"
        cvs rm -f "$oldfile"
        cd -
        cd "$newdir"
        cvs add "$newpath"
        cd -
        cvs commit -m "renamed '$oldpath' to '$newpath'" "$oldpath" "$newpath"

There.  Are you happy now?

-- 
                                                        Greg A. Woods

+1 416 218-0098      VE3TCP      <address@hidden>     <address@hidden>
Planix, Inc. <address@hidden>;   Secrets of the Weird <address@hidden>



reply via email to

[Prev in Thread] Current Thread [Next in Thread]