<div id="Rename-by-copying"></div>
<div class="header">
<p>
Previous: [[cvs: Moving the history file#Moving the history file|Inside]], Up: [[cvs: Moving and renaming files#Moving and renaming files|Moving files]] &nbsp; |[[cvs: Index#SEC_Contents|Contents]]||[[cvs: Index#Index|Index]]|</p>
</div>

----

<div id="Copying-the-history-file"></div>
==== Copying the history file ====

This way also involves direct modifications to the
repository.  It is safe, but not without drawbacks.

<div class="example" style="margin-left: 3.2em">
 # <span class="roman" style="font-family:serif; font-weight:normal">Copy the RCS file inside the repository</span>
 $ cd $CVSROOT/<var>dir</var>
 $ cp <var>old</var>,v <var>new</var>,v
 # <span class="roman" style="font-family:serif; font-weight:normal">Remove the old file</span>
 $ cd ~/<var>dir</var>
 $ rm <var>old</var>
 $ cvs remove <var>old</var>
 $ cvs commit <var>old</var>
 # <span class="roman" style="font-family:serif; font-weight:normal">Remove all tags from <var>new</var></span>
 $ cvs update <var>new</var>
 $ cvs log <var>new</var>             # <span class="roman" style="font-family:serif; font-weight:normal">Remember the non-branch tag names</span>
 $ cvs tag -d <var>tag1</var> <var>new</var>
 $ cvs tag -d <var>tag2</var> <var>new</var>
 &hellip;
</div>

By removing the tags you will be able to check out old
revisions.

Advantages:


* Checking out old revisions works correctly, as long as you use &lsquo;<code>-r<var>tag</var></code>&rsquo; and not &lsquo;<code>-D<var>date</var></code>&rsquo; to retrieve the revisions.


* The log of changes is maintained intact.


* The revision numbers are not affected.

Disadvantages:


* You cannot easily see the history of the file across the rename.


This document was generated on <i>a sunny day</i> using [http://www.nongnu.org/texi2html/ <i>texi2html</i>].
