merge 2 unrelated branches in rich-root format cause path conflict for the same file-id

Bug #484706 reported by apm
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Bazaar
Confirmed
Low
Unassigned

Bug Description

A bit simpler reproduction sequence:

C:\Temp\3>bzr init a
Created a standalone tree (format: 2a)

C:\Temp\3\a>echo foo > foo

C:\Temp\3\a>echo bar > bar

C:\Temp\3\a>bzr add
adding bar
adding foo

C:\Temp\3\a>bzr ci -m1
Committing to: C:/Temp/3/a/
added bar
added foo
Committed revision 1.

C:\Temp\3>bzr init b
Created a standalone tree (format: 2a)

C:\Temp\3\b>echo foo > foo

C:\Temp\3\b>echo spam > spam

C:\Temp\3\b>bzr add --file-ids-from ../a
adding foo w/ file id from foo
adding spam

C:\Temp\3\b>bzr ci -m2
Committing to: C:/Temp/3/b/
added foo
added spam
Committed revision 1.

C:\Temp\3\b>bzr merge -r0..-1 ../a
+N bar
Path conflict: foo / foo
1 conflicts encountered.

Revision history for this message
apm (apm-linux) wrote :

If instead "bzr init" use "bzr init --pack-0.92" all this works correctly.

/2# bzr merge -r0..-1 ../1
All changes applied successfully.

Revision history for this message
Alexander Belchenko (bialix) wrote :

See attached Makefile to easily reproduce the problem for different formats.

make FORMAT=pack-0.92 -> works OK

make FORMAT=rich-root-pack -> produce path conflict

summary: - --file-ids-from= cause path conflict anyway
+ merge 2 unrelated branches in rich-root format cause path conflict for
+ the same file-id
description: updated
Changed in bzr:
status: New → Confirmed
Revision history for this message
John A Meinel (jameinel) wrote : Re: [Bug 484706] Re: merge 2 unrelated branches in rich-root format cause path conflict for the same file-id

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

Alexander Belchenko wrote:
> See attached Makefile to easily reproduce the problem for different
> formats.
>
> make FORMAT=pack-0.92 -> works OK
>
> make FORMAT=rich-root-pack -> produce path conflict
>
> ** Summary changed:

Quick guess-

rich-root-pack creates a special file-id for the tree root, which is not
propagated via --file-ids-from. If you do 'init + commit + add + commit'
then I don't think we can. But if the add is the first thing, and you
haven't done anything else, then the root id probably hasn't been set
yet, so it is probably possible.

 importance: low

John
=:->

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (Cygwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAksED80ACgkQJdeBCYSNAANyGgCeMk6jGmcM5NmhR8WgnH0Mkvog
fUAAn3nOjvhDEymvSr90G18Hog/NUAx8
=7I2W
-----END PGP SIGNATURE-----

Changed in bzr:
importance: Undecided → Low
Revision history for this message
Alexander Belchenko (bialix) wrote :

John A Meinel пишет:
> Alexander Belchenko wrote:
>> See attached Makefile to easily reproduce the problem for different
>> formats.
>>
>> make FORMAT=pack-0.92 -> works OK
>>
>> make FORMAT=rich-root-pack -> produce path conflict
>>
>> ** Summary changed:
>
> Quick guess-
>
> rich-root-pack creates a special file-id for the tree root, which is not
> propagated via --file-ids-from. If you do 'init + commit + add + commit'
> then I don't think we can. But if the add is the first thing, and you
> haven't done anything else, then the root id probably hasn't been set
> yet, so it is probably possible.

Why TREE_ROOT id is affected result? What if I put file in subdirectory?

I think this is wrong. It was worked in poor-roots case and several
people already used to old behavior.

All this file-id problems become a real problem and show-stopper to
upgrade to 2a :-/

Revision history for this message
Alexander Belchenko (bialix) wrote :

OK, I understand John's point: TREE_ROOT works as implict parent directory. I can get the same path conflict for renamed files:

C:\Temp\4>bzr init a
Created a standalone tree (format: pack-0.92)

C:\Temp\4\a>echo > foo

C:\Temp\4\a>bzr st
unknown:
   foo

C:\Temp\4\a>bzr add
adding foo

C:\Temp\4\a>bzr ci -m1
Committing to: C:/Temp/4/a/
added foo
Committed revision 1.

C:\Temp\4>bzr get a b
Branched 1 revision(s).

C:\Temp\4\a>bzr mkdir bar
added bar

C:\Temp\4\a>bzr mv foo bar
foo => bar/foo

C:\Temp\4\a>bzr ci -m2
Committing to: C:/Temp/4/a/
added bar
renamed foo => bar/foo
Committed revision 2.

C:\Temp\4\b>bzr mkdir baz
added baz

C:\Temp\4\b>bzr mv foo baz
foo => baz/foo

C:\Temp\4\b>bzr ci -m3
Committing to: C:/Temp/4/b/
added baz
renamed foo => baz/foo
Committed revision 2.

C:\Temp\4\b>bzr merge ../a
+N bar/
R baz/foo => bar/foo
Path conflict: baz/foo / bar/foo
1 conflicts encountered.

But there problem is obvious: baz/foo vs. bar/foo

In the case of different TREE_ROOT id the problem is *implicit* and this is really bad, because it's invisible to user and therefore it's hard to understand what's going on. IMO.

tags: added: ui
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

Bug attachments

Remote bug watches

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