bzr update with local updates and commits does an unexpected merge
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Bazaar |
Confirmed
|
High
|
Unassigned |
Bug Description
Consider this sequence of shell commands:
mkdir bazaar-hates-me
cd bazaar-hates-me/
bzr init .
fortune > file1.txt
fortune > file2.txt
bzr add .
bzr ci -m "add files"
cd ..
bzr branch bazaar-hates-me/ bazaar-
cd bazaar-hates-me
fortune > file3.txt
bzr add file3.txt
bzr ci -m "add third file"
bzr bind ../bazaar-
echo 'add a line' >> file2.txt
echo 'add a line' >> file3.txt
bzr st
bzr ci file2.txt -m "change old file"
# fails, says branches have diverged
bzr update
# RM file3.txt => file3.txt.THIS
# Contents conflict in file3.txt
# 1 conflicts encountered.
# RM file3.txt.THIS => file3.txt
# Text conflict in file3.txt
# Path conflict: file3.txt.THIS / file3.txt
# 2 conflicts encountered.
# Updated to revision 1.
# Your local commits will now show as pending merges with 'bzr status', and can be committed with 'bzr commit'.
This doesn't make any sense tp me:
* either bzr bind pushes so the second branch should be the same as the first one
* or bzr bind doesn't push in which case file3 hasn't made it to the second branch, so how can it conflict with itself?
Data loss warning: running 'bzr update' removes the revision that added file3.txt from the repository -> you can no longer see it in bzr log, for example.
Running 'bzr revert file3.txt' afterwards doesn't restore the file's contents to the commited version, as I'd expected, it removes the whole file. And since the history is also gone, I have lost data.