Merging 2 branches which create the same directory causes confusion

Bug #34956 reported by Sami Haahtinen
4
Affects Status Importance Assigned to Milestone
Bazaar
Confirmed
Medium
Unassigned

Bug Description

When bzr merges 2 trees that create the same directory the directory gets renamed and can cause confusion. It's not obvious that the renamed directory is actually a versioned directory too that can be manipulated with the bzr commands.

Quick solution would be to add a note stating that the files can be moved to the new directory with "bzr move"

Tags: conflicts ui
Revision history for this message
Sami Haahtinen (ressu) wrote : Log of an example case

This is an example of the situation where this bug can occur, there are no conflicting files, the only conflict is the directory itself.

Revision history for this message
Martin Pool (mbp) wrote :

Confirmed; agree that more information on the conflict would help.

Ideally we would also note a file-id join to allow better future merges.

Changed in bzr:
status: Unconfirmed → Confirmed
Revision history for this message
John A Meinel (jameinel) wrote :

Right now, this is what happens:

$ bzr init a
$ cd a
$ echo a > a
$ bzr add a
$ bzr commit -m a
$ cd ..
$ bzr branch a b
$ cd b
$ bzr mkdir foo
$ bzr commit -m 'b foo'
$ cd ../a
$ bzr mkdir foo
$ bzr commit -m 'a foo'
$ bzr merge ../b
Conflict adding file foo. Moved existing file to foo.moved.
1 conflicts encountered.

$ bzr status
removed:
  a
added:
  foo/
renamed:
  foo => foo.moved
conflicts:
  Conflict adding file foo. Moved existing file to foo.moved.
pending merges:
  John Arbash Meinel 2006-07-21 foo

I think this is the exact same thing that happens when merging files where both trees added the same filename.

I don't see it as any more or less confusing than the other case, so I would like to close this bug.
Martin, would you care to comment, since you agreed with the bug?

Revision history for this message
Aaron Bentley (abentley) wrote : Re: [Bug 34956] Re: Merging 2 branches which create the same directory causes confusion

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

John A Meinel wrote:
> $ bzr status
> removed:
> a
> added:
> foo/
> renamed:
> foo => foo.moved
> conflicts:
> Conflict adding file foo. Moved existing file to foo.moved.
> pending merges:
> John Arbash Meinel 2006-07-21 foo

Wait a sec-- why's 'a' listed as removed?

Aaron
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iD8DBQFEwUHf0F+nu1YWqI0RAicVAJ9WgizQMD+47FUlyKot8c3gyToRwQCfU//K
xjp2p7uGnMtYgqz42Hil/xE=
=QTNV
-----END PGP SIGNATURE-----

Revision history for this message
John A Meinel (jameinel) wrote :

From an earlier test. Please ignore it.

Jelmer Vernooij (jelmer)
tags: added: conflicts ui
Jelmer Vernooij (jelmer)
tags: added: check-for-breezy
Jelmer Vernooij (jelmer)
tags: removed: 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.