| Conflicts |
If two developers change a file in such a way that the changes cannot
be merged, a conflict will occur during update. Let's say there's a
file hello.c:
main()
{
puts("Hello World");
}
And one developer changes the puts() to a printf() and commits it.Meanwhile, elsewhere, another developer adds some punctuation. There will be a problem during update: $ cvs update
cvs update: Updating .
RCS file: /work/cvsroot/hello/h.c,v
retrieving revision 1.1.1.1
retrieving revision 1.2
Merging differences between 1.1.1.1 and 1.2 into hello.c
rcsmerge: warning: conflicts during merge
cvs update: conflicts found in hello.c
C hello.c
----- cut here -----
main()
{
<<<<<<< hello.c
puts("Hello, World!");
=======
printf("Hello World");
>>>>>>> 1.2
}
The <<<<<<< and >>>>>>>'s mark the area where changes overlap. This must be resolved by hand.
Conflicts will only occur if two (or more) developers are changing the same
section of the same file. Usually this is a result of poor communication
and can be easily avoided.
|
| pg 15 |
|