httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Greg Stein <gst...@lyra.org>
Subject Re: Did we ever decide how to move files around?
Date Wed, 05 Jul 2000 09:20:23 GMT
There are two ways to move a file around:

Method 1:
  *) locus:  cp old/file.name,v new/file.name,v
  *) client: cvs del old/file.name
  *) client: delete all tags on new/file.name

Method 2:
  *) client: cp old/file.name new/file.name
  *) client: cvs add new/file.name
  *) client: cvs del old/file.name

Pros/cons:
  - Method 1: watch out for the tag deletion -- make sure you get just the
    file you moved rather than the whole repository :-)
  - Method 1 requires the tag deletion, which could be painful if there are
    many tags
  - Method 1 preserves the file's history, including the history before it
    was moved
    (conversely: Method 2 has complete, but split histories)
  - Method 1's history for the file does not note that a move occurred and
    that the file ever lived somewhere else.
  - Method 2 allows a checkin comment at "add" time that can specify the
    move occurred, and where the original came from (and where the old
    history is located)
  - Method 1: if new/file.name,v *used* to exist, then this "cp" will
    corrupt the CVS repository. It is not legal to have a file.name,v and
    Attic/file.name,v at the same time.
  - Method 1: if somebody checks out a copy or browses by date, they will
    see files that weren't really there at that point in time.

[ note: during the move you refer to, you created the Attic/ integrity issue
  in the repository, and apparently a "mv" was done, which meant the old
  file was no longer there and available for pulling by date/tag. ]

I think that sums up the pros/cons. Obviously, there are going to be others,
but that should be the high points.

Method 2 is my preferred form, while Method 1 has been used by people in the
past. I'll state for the record that "well, that is how we always did it"
doesn't necessarily make it right/good :-)

I recall the last go-round on this issue, but I don't remember if a clear
consensus was ever reached. It didn't seem like the two alternatives were
clearly detailed and available for people to vote/discuss one way or the
other.

Cheers,
-g

On Tue, Jul 04, 2000 at 05:58:50PM -0700, rbb@covalent.net wrote:
> 
> That is the way we have always done it, but the last time I did this, I
> got yelled at because it made the repository unrecoverable for some
> people.  If this is the way we want to do it, cool.  :-)
> 
> Ryan
> 
> On Tue, 4 Jul 2000, Dirk-Willem van Gulik wrote:
> 
> > 
> > I recall consensus to be
> > 
> > on locus
> > 
> > 	cd $CVSROOT
> > 	cp file.old,v	to/new/location,v
> > 	exit
> > 
> > on your checked out version
> > 
> > 	cvs delete file.old
> > 
> > and add comments on to that it was moved.
> > 
> > Dw	
> > 
> > 
> > 
> > On Tue, 4 Jul 2000 rbb@covalent.net wrote:
> > 
> > > 
> > > I am likely to be moving a bunch of files around in the CVS tree this
> > > week.  We have discussed the "correct" way to do this before, but I don't
> > > think we ever really came to a consensus.  I know Greg likes to cvs add
> > > the file in it's new directory and cvs rm it from the old.  In the past,
> > > we have always modified the CVS tree by hand to preserve history.
> > > 
> > > Can we come to a consensus on this now, before I start mucking with the
> > > tree this week?
> > > 
> > > I personally don't care, but I don't want to do it one way and then get
> > > yelled at for doing it wrong.
> > > 
> > > Ryan
> > > 
> > > _______________________________________________________________________________
> > > Ryan Bloom                        	rbb@apache.org
> > > 406 29th St.
> > > San Francisco, CA 94131
> > > -------------------------------------------------------------------------------
> > > 
> > 
> 
> 
> _______________________________________________________________________________
> Ryan Bloom                        	rbb@apache.org
> 406 29th St.
> San Francisco, CA 94131
> -------------------------------------------------------------------------------

-- 
Greg Stein, http://www.lyra.org/

Mime
View raw message