On Mon, Sep 08, 2003 at 02:24:41PM +0200, Leopold Toetsch wrote:

>     The normal way to move a file is to copy OLD to NEW, and then issue
> the normal CVS commands to remove OLD from the repository, and add NEW
> to it.
> 
>       $ mv OLD NEW
>       $ cvs remove OLD
>       $ cvs add NEW
>       $ cvs commit -m "Renamed OLD to NEW" OLD NEW
> or better - including the comments WRT "commit -r rev":
>       $ cvs commit -m "Renamed OLD to NEW" -r $next_rev OLD NEW
> 
> Is there a better way to move the files?

The disadvantage with the method that you describe is that the revision
history of the files is lost.
An alternative is that someone with shell repository access on cvs.perl.org
moves the files around in the repository, which has the advantage of
preserving the revision history in the new files, but the disadvantage
of breaking the repository for anyone attempting to pull out historical
snapshots.

I'm not sure if the suggested solution to this is to copy the files inside
the repository (rather than moving them) and then use
cvs -f remove OLD
to delete the files in their old location, which would mean CVS is still
able to create valid historical snapshots.
(valid in as much as they will compile - they won't be perfect because
extra files will appear in the new locations, as if they had been
committed there since the beginning of time, rather than appearing that
at the time of the move)

CVS sucks for this sort of stuff.

Nicholas Clark

Reply via email to