"Mark E. Hamilton" wrote:
[EMAIL PROTECTED] wrote: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
I believe Mark's responses are correct, but you might be able to use some other commands to deal with it the way you want.
1. make separate lists of files with and without conflicts (look for C in
the output of update).
cvs -n update 2>&1 | \
process_to_separate_filenames_with_conflicts
2. just update those without conflicts. for i in `cat files_without_conflicts`; \ do cvs update $i;done
3. do something special for the ones with conflicts. for i in `cat files_with_conflicts`; \ do marks_method_1or2 $i;done
marks_method_3 is the only known correct method, but your situation might be special.
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 changes sed -e '/^=======/,/^>>>>>>>/d' -e '/^<<<<<<</d' ${file} > blarg \ && mv blarg ${file}
# This will discard the project changes and keep the respository changes sed -i -e '/^<<<<<<</,/^=======/d' -e '/^>>>>>>>/d' ${file} > blarg \ && mv blarg ${file} done
-- ---------------- Mark E. Hamilton Orion International Technologies, Inc. Sandia National Laboratory, NM. 844-7666
_______________________________________________ Info-cvs mailing list Info-cvs@gnu.org http://lists.gnu.org/mailman/listinfo/info-cvs