handling conflicts in binary files.
Erik Bågfors
zindar at gmail.com
Fri Dec 7 13:22:18 GMT 2007
Hi
Just had a talk with a friend who had a conflict in a binary file, and
I have to agree with him that it's somewhat confusing.
I just did this.
$ mkdir t1
$ cd t1
$ cp ~/Desktop/Picture\ 1.png .
$ bzr init
$ bzr add
$ bzr ci -m 1
$ cd ..
$ bzr branch t1 t2
$ cd t2
$ echo hej >> Picture\ 1.png
$ bzr ci -m hej
$ cd ../t1
$ echo hejhopp >> Picture\ 1.png
$ bzr ci -m hejhopp
$ bzr merge ../t2
RM Picture 1.png => Picture 1.png.OTHER
Contents conflict in Picture 1.png
1 conflicts encountered.
$ bzr st
renamed:
Picture 1.png => Picture 1.png.OTHER
modified:
Picture 1.png.OTHER
unknown:
Picture 1.png.BASE
Picture 1.png.THIS
conflicts:
Contents conflict in Picture 1.png
pending merges:
Erik Bagfors 2007-12-07 hej
Ok.. so there was a conflict of course, however, the odd thing is that
it thinks that it renamed the original file to .OTHER...
Now I need to consider which to keep. If .OTHER is ok... I can do
$ bzr mv 'Picture 1.png.OTHER' 'Picture 1.png'
$ bzr resolve 'Picture 1.png'
$ bzr ci -m 'merge'
and all is good. That's just a little strange and not very obvious to me.
However, if I want to keep THIS.. I assume I have to do the following
$ mv 'Picture 1.png.THIS' 'Picture 1.png.OTHER'
$ bzr mv 'Picture 1.png.OTHER' 'Picture 1.png'
$ bzr resolve 'Picture 1.png'
$ bzr ci -m 'merge'
which is more than a little odd...
Is there no better way to handle this? If it's not clear to me how to
handle this, it's definitely not clear to a new bzr user.
Regards,
Erik
More information about the bazaar
mailing list