info-cvs
[Top][All Lists]
Advanced

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

Re: Can I turn off merge conflict markers?


From: Mark E. Hamilton
Subject: Re: Can I turn off merge conflict markers?
Date: Wed, 09 Feb 2005 17:49:16 -0700
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040113

address@hidden wrote:
Can I set a cvs update option so that it will only
report merge conflict files and NOT modify them with
conflict markers? It does not appear that "cvs update"
has an option like this, but maybe there is some trick
someone can clue me in on.

Probably not, but the CVS gurus here would know.

When you get a file where automatic merge fails
CVS will report a merge conflict and then modify
the offending file with conflict markers:
    <<<<<<<<
    ========
    >>>>>>>>
...which is fine most of the time, but now I have a situation
where I'm working in a project with someone else's code
and I'm getting a lot of these. The difference for these files
are trivial. It's a lot of extra hassle to have to
go delete all these conflict markers. It's sufficient for me to
know there is a problem.  I want to update what I can, but
I don't want cvs to touch the conflicted files.
I just want it to report them.

As I see it you've really only got three choices:

1. cvs update -C foo.c

This will replace the file with a fresh version from the repository, discarding all the changes made in the sandbox version of the file, including those that merged successfully (ie, didn't cause a conflict.) Sometimes this is the right thing to do; you'll have to decide.

2. cp .#foo.c.x.y

This will replace the updated version of the file with the version prior to the update, discarding all the changes made in the repository version of the file, including those that merged successfully (ie, didn't cause a conflict.) This is almost never the right thing to do.

3. Deal with those pesky conflicts and edit them as necessary.

This is the right thing to do. This is the only answer that will retain any changes that were successfully merged. The caveat of course is that you need to run your tests after the update, because even changes that successfully merged might still be logically incorrect with the changes made in the sandbox.

--
----------------
Mark E. Hamilton
Orion International Technologies, Inc.
Sandia National Laboratory, NM.
844-7666






reply via email to

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