info-cvs
[Top][All Lists]
Advanced

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

RE: Qs about renaming directories


From: Conrad T. Pino
Subject: RE: Qs about renaming directories
Date: Sun, 16 May 2004 03:20:00 -0700

Hi Irving,

> From: Irving Kimura
> 
> 1. In the directory renaming section, the cvs docs say
> 
>   It is almost always better to move the files in the directory
>   instead of moving the directory.
> 
> What exactly does this mean?  Does mean that rather than renaming
> the directory OLD-DIR to NEW-DIR, it is better to create NEW-DIR
> (leaving OLD-DIR in place), and rename all the files OLD-DIR/* to
> NEW_DIR/* (thereby leaving OLD-DIR empty, except for OLD-DIR/CVS)?

Yes, your final statement is the essentially correct.  Try:

   mkdir NEW-DIR
   cvs add NEW-DIR
   # adding directories doesn't require commit

   cp OLD-DIR/file_old.c NEW-DIR/file_new.c

   cd OLD-DIR
   cvs remove file_old.c
   cd ..

   cd NEW-DIR
   cvs add file_new.c
   cd ..

   # last chance to change your mind
   cvs commit -m "Your commit message."
   # too late to change your mind

   # remove OLD-DIR if empty
   cvs update -P

> 2. Right after the sentence quoted above, the documentation says
> 
>   If you move the directory you are unlikely to be able to retrieve
>   old releases correctly, since they probably depend on the name
>   of the directories.
> 
> What does this mean?  Can someone give me an example in which it
> would not be possible to retrieve old releases correctly?  Is this
> true even if one uses tags to retrieve older releases?

It means local working directory contains "CVS" directory that has
files that contain path information.  Moving directory without the
corresponding changes to "CVS" files is *trouble* in *all* cases.

If your *really* want to *move* the directory then be prepared to
fix up these files:

http://www.cvshome.org/docs/manual/cvs-1.11.14/cvs_2.html#SEC19

> Thanks!

Welcome!

> Irv

Conrad





reply via email to

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