Last Update: "2006/10/02 13:11:00 makoto"
Errors
had a conflict and
had a conflict and has not been modified
ttyp0:makoto@s900 12:32:15/061002(...gas/src)> cvs commit -m 'merge 2-17 branch'
cvs commit: Examining .
cvs commit: file `config.sub' had a conflict and has not been modified
cvs commit: file `configure' had a conflict and has not been modified
...
cvs [commit aborted]: correct above errors first!
ttyp0:makoto@s900 12:40:04/061002(...gas/src)>
<<<<<<< config.sub
timestamp='2006-04-22'
=======
timestamp='2006-01-02'
>>>>>>> 1.1.1.2
247 12:43 cvs commit -m 'merge 2-17 branch' > & /tmp/conflict
257 12:52 grep conflict /tmp/conflict | cut -d ' ' -f 4 | sed -e 's/`//' -e 's/.$//' ;
#!/usr/pkg/bin/perl
# $Header: /e/u/j/local-repository/htdocs/www/software/.cvs2/75000.errors.html.ja,v 1.1.1.1 2008/03/12 10:53:46 makoto Exp $
use strict;
my $before = 0;
my $after = 0;
while (<>) {
if ( /^<<<<<<< / ) {
$before++;
print STDERR;
next;
}
elsif ( /^=======$/) {
$before = 0;
$after = 0;
print STDERR;
next;
}
elsif ( /^>>>>>>> /) {
$after = 0;
print STDERR;
next;
}
if ($before) {next};
print;
}
__END__
<<<<<<< config.sub
timestamp='2006-04-22'
=======
timestamp='2006-01-02'
>>>>>>> 1.1.1.2
Usage:
ttyp0:makoto@s900 13:03:08/061002(...gas/src)> grep conflict /tmp/conflict | cut -d ' ' -f 4 | sed -e 's/`//' -e 's/.$//' | awk '{print "mv", $1, $1 ".bak ; ~/perl/remove-conflict <",$1 ".bak >", $1}'
|