info-cvs
[Top][All Lists]
Advanced

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

Re: Update without merge.


From: Kaz Kylheku
Subject: Re: Update without merge.
Date: Mon, 21 Jul 2003 14:26:46 -0700 (PDT)

On Mon, 21 Jul 2003, MIke Solem wrote:

> Hello,
> 
> I would like to be able to update my project without CVS merging
> anything.  It should replace unedited files with newer ones if they
> exist.  But files which have been edited (by me but not checked in)
> should be left alone.

This is dangerous: what you are asking for is to navigate from one
version to another, but ignore the delta which takes you there, and not
try to integrate your local changes with that delta.

The result is that your local changes are based against one version,
but will be committed to another, causing the delta to be lost.

For understandable reasons, cvs up does not do this. If you want to
achieve that, you can make backup copies of your modified files,
navigate to whatever version or branch you want, and then copy your
modified files back.

>  I often need to hack up a bunch of files in
> order to run some test.  It would be nice to not have to make all these
> changes again every time I do an update.  Is this possible?  Thanks.

Ah, so what you really want is the default merging behavior. You make
some local hacks to the files. Then when new versions of these files
are made, just do a cvs up. CVS will retrieve newer versions of these
files, and merge the new edits against your local ones. In the best
case, the merge will be made with no conflicts and your local changes will
remain correct---no work no your part! In the intermediate case, there
is some conflict that needs to be resolved, but it's trivial. Some work
on your part, but not as much as re-working those changes. In the worst
case, the new changes make such a conflict that your local work has to
be thrown away and re-done. This is like having no merge at all.
So overall, you win.





reply via email to

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