shelve crashes with "Tree transform is malformed" when renamed file already exists

Bug #660125 reported by Jelmer Vernooij
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Bazaar
Confirmed
Medium
Unassigned
bzr (Debian)
Confirmed
Unknown

Bug Description

As reported by Ben Finney in Debian bug 582210. I can still reproduce it with bzr 2.3b2.

Package: bzrtools
Version: 2.1.0-2
Severity: normal

When ‘bzr shelve’ attempts to shelve a rename, but the original
filename already exists, it gives an unhelpful error message:

=====
$ bzr init foo
Created a standalone tree (format: 2a)
$ cd foo/
$ touch spam
$ bzr add
adding spam
$ bzr commit --message "Initial commit of foo project."
Committing to: /home/bignose/Projects/foo/
added spam
Committed revision 1.

$ bzr mv spam beans
spam => beans
$ touch spam
$ bzr shelve --all
Selected changes:
R beans => spam
bzr: ERROR: Tree transform is malformed [('duplicate', 'new-1', 'new-2', u'spam')]
=====

Jelmer Vernooij (jelmer)
tags: added: shelf
tags: added: treetransform
Changed in bzr (Debian):
status: Unknown → Confirmed
Revision history for this message
Vincent Ladeuil (vila) wrote :

I added the provided reproducing recipe as a blackbox test in lp:~vila/bzr/660125-shelve-rename-existing

From there, the diagnosis is that the 'shelve' implementation is incomplete: it assumes that shelving a set of changes will produce no conflicts which is not the case here.

Shelving the 'beans -> spam' rename means 'spam' should be restored which conflicts with the unversioned 'spam' that has been added after the rename.

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.