info-cvs
[Top][All Lists]
Advanced

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

Re: moving a file


From: Paul Sander
Subject: Re: moving a file
Date: Thu, 12 Sep 2002 10:41:29 -0700

>--- Forwarded mail from address@hidden

>[ On Thursday, September 12, 2002 at 16:26:28 (+0200), Massimiliano Cialdi 
>wrote: ]
>> Subject: moving a file
>>
>> how can I move a file from a directory to another whithout loose the history?

>       $ cd ..
>       $ cp foodir/barfile blahdir
>       $ cvs rm -f foodir/barfile
>       $ cd blahdir
>       $ cvs add barfile
>       $ cd ..
>       $ cvs commit -m '- moved foodir/barfile to blahdir/barfile' 
> foodir/barfile blahdir/barfile

>No history is lost.  You should still be able to do "cvs log foodir/barfile"

>The final "death" entry in the log for the old file will tell you where
>the new file is and the first entry in the log of the new file will tell
>you where it came from.

Using this method, technically, no history is lost. However, it is
fragmented.  You cannot use a single "cvs log" command to see the entire
history of the file (before and after the move), and you can't use "cvs
update" in the usual way to merge between branches if one of the contributors
occurs in the post-move history.  If you want the move to take effect on
branches also, then you must create the branch tags on the post-move file
and repeat the above process for each branch.  If the post-move fills a
location that was vacated by a prior removal, then there's an additional
burden to sort out the fragments belonging to each incarnation of that
path.  And the bookkeeping complicates as the number of moves increases.

In the end, you'll find it desirable to minimize the number reorganizations
in your source tree.

>--- End of forwarded message from address@hidden





reply via email to

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