confusing conflicts when adding files to roots with different ids

Bug #436559 reported by Tymek
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Bazaar
Confirmed
Low
Unassigned

Bug Description

The following steps result in

+N 2.txt
Conflict adding files to 2.txt. Moved to root.
1 conflicts encountered.

Please let me know if you need more info.

----STEPS:
bzr init-repo pqm.repo
bzr init pqm.repo/trunk
bzr branch pqm.repo/trunk/ pqm.repo/branch2
bzr checkout pqm.repo/branch2 branch2
bzr checkout pqm.repo/trunk/ trunk
cd branch2/
echo 1 > 1.txt
bzr add
bzr commit -m "1.txt"
cd ../trunk
bzr merge ../pqm.repo/branch2
bzr commit -m "1.txt from branch2"
cd ../branch2/
echo 2 > 2.txt
bzr add
bzr commit -m "2.txt"
cd ../trunk
bzr merge ../pqm.repo/branch2
----STEPS END

----FULL output
user@server:~$ rm -r branch2 pqm.repo/ trunk/
user@server:~$ bzr init-repo pqm.repo
Shared repository with trees (format: 2a)
Location:
  shared repository: pqm.repo
user@server:~$ bzr init pqm.repo/trunk
Created a repository tree (format: 2a)
Using shared repository: /home/pqm/pqm.repo/
user@server:~$ bzr branch pqm.repo/trunk/ pqm.repo/branch2
Branched 0 revision(s).
user@server:~$ bzr checkout pqm.repo/branch2 branch2
user@server:~$ bzr checkout pqm.repo/trunk/ trunk
user@server:~$ cd branch2/
user@server:~/branch2$ echo 1 > 1.txt
user@server:~/branch2$ bzr add
adding 1.txt
user@server:~/branch2$ bzr commit -m "1.txt"
Committing to: /home/pqm/pqm.repo/branch2/
added 1.txt
Committed revision 1.
user@server:~/branch2$ cd ../trunk
user@server:~/trunk$ bzr merge ../pqm.repo/branch2
+N 1.txt
All changes applied successfully.
user@server:~/trunk$ bzr commit -m "1.txt from branch2"
Committing to: /home/pqm/pqm.repo/trunk/
deleted
modified 1.txt
Committed revision 1.
user@server:~/trunk$ cd ../branch2/
user@server:~/branch2$ echo 2 > 2.txt
user@server:~/branch2$ bzr add
adding 2.txt
user@server:~/branch2$ bzr add
user@server:~/branch2$ bzr commit -m "2.txt"
Committing to: /home/pqm/pqm.repo/branch2/
added 2.txt
Committed revision 2.
user@server:~/branch2$ cd ../trunk
user@server:~/trunk$ bzr merge ../pqm.repo/branch2
+N 2.txt
Conflict adding files to 2.txt. Moved to root.
1 conflicts encountered.
----FULL Output END

I guess the end result is somehow connected with:

user@server:~/trunk$ bzr merge ../pqm.repo/branch2
+N 1.txt
All changes applied successfully.
user@server:~/trunk$ bzr commit -m "1.txt from branch2"
Committing to: /home/pqm/pqm.repo/trunk/
------------------------------
deleted
modified 1.txt
------------------------------What's deleted here? And why isn't 1.txt added?

VERSION:
pqm@networkserver:~/trunk$ bzr --version
Bazaar (bzr) 2.0.0
  Python interpreter: /usr/bin/python 2.5.2
  Python standard library: /usr/lib/python2.5
  Platform: Linux-2.6.27-14-generic-i686-with-debian-lenny-sid
  bzrlib: /usr/lib/python2.5/site-packages/bzrlib
  Bazaar configuration: /home/pqm/.bazaar
  Bazaar log file: /home/pqm/.bzr.log

Tymek (maju7)
summary: - Adding a file+Merging resutls in "Conflict adding files to
- FILE_NAME_HERE. Moved to root."
+ Provide a better message for "Conflict adding files to FILE_NAME_HERE.
+ Moved to root."
Revision history for this message
Tymek (maju7) wrote : Re: Provide a better message for "Conflict adding files to FILE_NAME_HERE. Moved to root."

If I only modify files
so change
user@server:~/branch2$ echo 2 > 2.txt
user@server:~/branch2$ bzr add
to
user@server:~/branch2$ echo 2 > 1.txt
the final merge is successful.

In case of adding 2.txt merge from trunk you have to merge from trunk first
...
user@server:~/branch2$ bzr commit -m "2.txt"
user@server:~/branch2$ bzr merge
user@server:~/branch2$ bzr commit -m "Merged from trunk"

Martin Pool (mbp)
tags: added: conflicts merge
summary: - Provide a better message for "Conflict adding files to FILE_NAME_HERE.
- Moved to root."
+ confusing conflicts when adding files to roots with different ids
Revision history for this message
Martin Pool (mbp) wrote :

I suspect this is because the two branches didn't start out by forking from the same revision.

Changed in bzr:
importance: Undecided → Low
status: New → Confirmed
Jelmer Vernooij (jelmer)
tags: added: check-for-breezy
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.