pulling with unresolved conflicts creates confusing state if there are new conflicts
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Bazaar |
Confirmed
|
Medium
|
Unassigned |
Bug Description
Using bzr 2.2.2, I did `bzr pull' and had a conflict with one file. I did not resolve the conflict. Later on, the same file was modified upstream. When I pulled again, I ended up in a confusing state. Example:
mkdir test1
cd test1
touch 1
bzr init
bzr add
bzr commit -m "commit1"
cd ../
bzr branch test1 test2
cd test1; edit 1 and commit
cd test2; edit 1 but do not commit
bzr pull reports "Text conflict in 1"
bzr status reports:
modified:
1
unknown:
1.BASE
1.OTHER
1.THIS
conflicts:
Text conflict in 1
At his point, all is fine.
cd test1; edit 1 and commit
cd test2; bzr pull
Now confusing things happen. bzr pull reports:
Text conflict in 1
Conflict adding file 1.BASE. Moved existing file to 1.BASE.moved.
Conflict adding file 1.OTHER. Moved existing file to 1.OTHER.moved.
Conflict adding file 1.THIS. Moved existing file to 1.THIS.moved.
4 conflicts encountered.
bzr status reports:
modified:
1
unknown:
1.BASE
1.BASE.moved
1.OTHER
1.OTHER.moved
1.THIS
1.THIS.moved
conflicts:
Text conflict in 1
Conflict adding file 1.BASE. Moved existing file to 1.BASE.moved.
Conflict adding file 1.OTHER. Moved existing file to 1.OTHER.moved.
Conflict adding file 1.THIS. Moved existing file to 1.THIS.moved.
At this point, I have two sources of confusion:
1) The statement "conflict adding file" make me thing I, or bzr, have done a `bzr add' on one of those .BASE etc files.
2) It's not clear to me how to resolve this situation. If I do `bzr revert 1', I am still left with 3 conflicts:
Conflict adding file 1.BASE. Moved existing file to 1.BASE.moved.
Conflict adding file 1.OTHER. Moved existing file to 1.OTHER.moved.
Conflict adding file 1.THIS. Moved existing file to 1.THIS.moved.
Trying to revert any of those files fails with "ERROR: Path(s) are not versioned".
The only solution I've found is `bzr revert .' to revert the whole directory. There are times when that might not be appropriate though, eg if I have changes to other files in that directory.
IMHO bzr should refuse to pull if the working tree contains conflicts unless told otherwise à la --no-strict in push.