workingtree.remove is faulty when removing ''

Bug #64117 reported by Robert Collins
2
Affects Status Importance Assigned to Milestone
Bazaar
Confirmed
Low
Unassigned
Breezy
Triaged
Low
Unassigned

Bug Description

When removing '' WorkingTree.remove fails to update the inventory
correctly - it deletes the inventory id for the root, but fails to unset
inventory.root..

it should either fail to do the removal, or correctly set the inventory
to having no root.
 affects /products/bzr
--
GPG key available at: <http://www.robertcollins.net/keys.txt>.

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

Doing:

wt = bzrlib.workingtree.WorkingTree.open('.')
wt.lock_read()
inv = wt.inventory
del inv['TREE_ROOT']

does indeed delete all of the entries from the inventory, but leaves inv.root as a real object.

I agree that it should either remove the object, or fail to delete everything.
I'm guessing it has to remove the object, since it may be an intermediate step towards creating a new root.
It is possible for WT.remove() to do this work, but it seems more like an Inventory invariant than a WT one.

Changed in bzr:
importance: Undecided → Low
status: Unconfirmed → Confirmed
Jelmer Vernooij (jelmer)
tags: added: workingtree
Jelmer Vernooij (jelmer)
tags: added: check-for-breezy
Jelmer Vernooij (jelmer)
tags: removed: check-for-breezy
Revision history for this message
Jelmer Vernooij (jelmer) wrote :

I can't change the status for bzr back to "Confirmed" for some reason. :-(

So WorkingTree.remove() still has this behaviour for some trees, but "bzr remove" actually filters out the root, so it's hard for users to trigger this.

Changed in bzr:
status: Confirmed → Fix Released
Changed in brz:
status: New → Triaged
importance: Undecided → Low
Vincent Ladeuil (vila)
Changed in bzr:
status: Fix Released → Confirmed
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.