Contents conflicts in checkouts end up in .OTHER being added to the repository

Bug #307316 reported by Mary Gardiner
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Bazaar
Confirmed
Medium
Unassigned
Breezy
Triaged
Medium
Unassigned

Bug Description

Scenario:

I am maintaining a spreadsheet in a bzr checkout. I make incompatible changes in the local copy against the master branch.

Actual behaviour:

$ bzr init /tmp/mainline
[create spreadsheet test.gnumeric attached here as test.gnumeric.BASE]
$ bzr add test.gnumeric
added test.gnumeric
$ bzr ci -m "Test"
Committing to: /tmp/mainline/
added test.gnumeric
Committed revision 1.
$ bzr co /tmp/mainline /tmp/checkout
[edit spreadsheet /tmp/checkout/test.gnumeric attached here as test.gnumeric.OTHER]
$ cd /tmp/checkout
$ bzr ci -m "test change" --local
Committing to: /tmp/checkout/
modified test.gnumeric
Committed revision 2.
$ cd ../mainline
[edit spreadsheet incompatibly, attached here as test.gnumeric.THIS]
$ bzr ci -m "Mainline change"
Committing to: /tmp/mainline/
modified test.gnumeric
Committed revision 2.
$ cd ../checkout
$ bzr update
 M test.gnumeric
All changes applied successfully.
RM test.gnumeric => test.gnumeric.OTHER
Contents conflict in test.gnumeric
1 conflicts encountered.
Updated to revision 2.
Your local commits will now show as pending merges with 'bzr status', and can be committed with 'bzr commit'.
$ bzr st
renamed:
  test.gnumeric => test.gnumeric.OTHER
modified:
  test.gnumeric.OTHER
unknown:
  test.gnumeric.BASE
  test.gnumeric.THIS
conflicts:
  Contents conflict in test.gnumeric
pending merges:
  Mary Gardiner 2008-12-12 test change
$ ls
test.gnumeric.BASE test.gnumeric.OTHER test.gnumeric.THIS

I don't know what the expected behaviour actually is, but problems with this are:

1. It has .THIS and .OTHER the wrong way around: .THIS in the checkout actually contains the mainline's test.gnumeric, and .OTHER contains the checkout's locally committed test.gnumeric
2. it assumes without proof that .OTHER is the version of the file I want
3. it actually renames the file to test.gnumeric.OTHER in the metadata. I can't imagine when this would be useful behaviour: I can't think of a scenario when I am going to want to refer to this file as "test.gnumeric.OTHER" henceforth. I am likely to want the file to continue to be named test.gnumeric.

I will also attach both mainline and checkout to this bug.

Revision history for this message
Mary Gardiner (puzzlement) wrote :
Revision history for this message
Mary Gardiner (puzzlement) wrote :
Revision history for this message
Mary Gardiner (puzzlement) wrote :
Revision history for this message
Mary Gardiner (puzzlement) wrote :
Revision history for this message
Mary Gardiner (puzzlement) wrote :
Revision history for this message
Andrew Bennetts (spiv) wrote :

One part of the problem here is that THIS and OTHER are poor labels. MASTER and CHECKOUT would be more intuitive, I think.

Revision history for this message
Andrew Bennetts (spiv) wrote :

Here's a bash script that automates the test case in the original report. It uses gzipped text files to make binary files, rather than gnumeric.

#!/bin/bash
set -e
bzr init /tmp/mainline
echo 'base' | gzip -c > /tmp/mainline/test.gz
bzr add /tmp/mainline/test.gz
(cd /tmp/mainline && bzr ci -m "Test")

bzr co /tmp/mainline /tmp/checkout
echo 'checkout' | gzip -c > /tmp/checkout/test.gz
(cd /tmp/checkout && bzr ci -m "test change" --local)

echo 'mainline' | gzip -c > /tmp/mainline/test.gz
(cd /tmp/mainline && bzr ci -m "Mainline change")

cd /tmp/checkout
bzr update
bzr st

Changed in bzr:
status: New → Confirmed
Revision history for this message
Martin Pool (mbp) wrote :

This may be something Vincent recently fixed, or is working on?

tags: added: conflicts merge
Changed in bzr:
importance: Undecided → Medium
Jelmer Vernooij (jelmer)
tags: added: check-for-breezy
Jelmer Vernooij (jelmer)
Changed in brz:
status: New → Triaged
importance: Undecided → Medium
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.