[Top][All Lists]

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

Re: Can I turn off merge conflict markers?

From: noah
Subject: Re: Can I turn off merge conflict markers?
Date: 24 Feb 2005 14:02:02 -0800
User-agent: G2/0.2

Mark E. Hamilton wrote:
> Todd Denniston wrote:
> > "Mark E. Hamilton" wrote:
> >>address@hidden wrote:

> A fourth approach would be to do the 'cvs update' to merge everything

> that can be merged successfully, and then use something like this to
> automatically select one of the two choices in the conflict lines:
> #!/bin/bash
> for file in $(cvs -q update | egrep '^C' | cut -f2 -d' ')
> do
>   # Pick one of these two sed commands.
> # This will discard the repository changes and keep the project
>   sed -e '/^=======/,/^>>>>>>>/d' -e '/^<<<<<<</d' ${file} > blarg \
>     && mv blarg ${file}
> # This will discard the project changes and keep the respository
>   sed -e '/^<<<<<<</,/^=======/d' -e '/^>>>>>>>/d' ${file} > blarg \
>     && mv blarg ${file}
> done
> ----------------
> Mark E. Hamilton
> Orion International Technologies, Inc.
> Sandia National Laboratory, NM.
> 844-7666

This seems to be the best solution for undoing merge conflict markers.
Granted, I don't need to do this very often, but this will come in
handy when I need it.


reply via email to

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