Comment 1 for bug 783296

Revision history for this message
John A Meinel (jameinel) wrote : Re: [Bug 783296] [NEW] shelve : Failed to unshelve changes which was made by partial hunk shelving.

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

On 05/16/2011 06:59 AM, iwata wrote:
> Public bug reported:
>
> Steps to reproduce.
>
> 1. Create text file and commit it, content of which is
> Line01 |A
> Line02 |B
> Line03 |C
> Line04 |D
>
> 2. Edit this file as
> Line01 |A
> Line02 |x
> Line03 |y
> Line04 |D
>
> 3. Execute shelve, and shelve *line2 only*, by using change editor.
> Line01 |A
> Line02 |B
> Line03 |y
> Line04 |D
>
> it seems to be done successfully, but this shelf can't be unshelved correctly.
> Result of unshelve is
> Line01 |A
> Line02 |<<<<<<<
> Line03 |B
> Line04 |<<<<<<< TREE
> Line05 |y
> Line06 |=======
> Line07 |C
> Line08 |=======
> Line09 |x
> Line10 |y
> Line11 |>>>>>>>
> Line12 |>>>>>>> MERGE-SOURCE
> Line13 |D

You are shelving a change that conflicts with your working tree. It will
be checked out with a conflict. I don't think this is a bug.

Specifically create a file ABCD. Edit the file to AByD. Shelve that
change. Edit the file to AxCD. Unshelve, and you will get a conflict.

This is the same behavior as merge.

bzr init A
echo -e "A\nB\nC\nD\n" > A/foo
bzr add A
bzr commit -m "ABCD" A
bzr branch A B
echo -e "A\nB\ny\nD\n" > A/foo
bzr commit -m "AByD" A
echo -e "A\nx\nC\nD\n" > B/foo
bzr commit -m "AxCD" B
cd B
bzr merge ../A # Conflicts in the same way

This is intentional behavior. If you edit lines that "touch" eachother,
you get a merge conflict, because we can't cleanly tell that those are
not meant to overlap.

 status: Invalid
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAk3Q1Y8ACgkQJdeBCYSNAAO4UwCgq6WF7fnXpEA9mxtUrM2F3u8L
HsUAn3MsFSG3rGejjirshl0X7JnEY1zX
=ThxZ
-----END PGP SIGNATURE-----