[Top][All Lists]

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

Re: cvs update; merge

From: Larry Jones
Subject: Re: cvs update; merge
Date: Wed, 29 Aug 2001 11:40:45 -0400 (EDT)

Jimm Grimm writes:
>       This sounds like cvs will automatically attempt to merge the
> changes.  But instead, it just replaces the copy in my working directory
> with, for your example, revision 1.6.  My version gets moved to a temp file
> named .#name.version.

Either you're doing something very wrong, or you're misinterpreting
what's happening.  When you do the update, you should see something like
the following:

        $ cvs update
        cvs update: Updating .
        RCS file: /repository/file,v
        retrieving revision 1.4
        retrieving revision 1.6
        Merging differences between 1.4 and 1.6 into file
        M file

Your file prior to the merge is saved in .#file.1.4, but the result is
the merged file, not just vanilla 1.6.

> If this is all its going to do, we would never get the
> <<<<< file1
> stuff1
> =======
> stuff2
> >>>>> file2
> annotations mentioned in cvs.pdf.  This type of annotation is what I was
> expecting

It sounds like your expectations are incorrect.  You only get conflict
markers (the above-mentioned annotations) when there are conflicts in
the merge.  As long as you haven't modified the same lines of the file
as the update does, you won't get any conflicts -- CVS will successfully
merge completely automatically.

> I do hope this would be
> done via temp files - I want to be able to preview the 3-way merge before I
> accept it, because cvs doesn't understand C, matlab, etc.  I don't think
> it's a good idea to have cvs directly edit the user's file in the working
> directory.  I would like to preview the changes any time two users changed
> the same file, regardless of whether they both edited the same lines or not.

You can preview the changes by doing a diff before doing the update. 
History shows that automatic merging is almost always successful --
there are pathological cases where it fails, but they hardly ever occur
in practice.

-Larry Jones

Years from now when I'm successful and happy, ...and he's in
prison... I hope I'm not too mature to gloat. -- Calvin

reply via email to

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