bzr rm should remove clean subtrees

Bug #111665 reported by Martin Pool
4
Affects Status Importance Assigned to Milestone
Bazaar
Fix Released
Low
Marius Kruger

Bug Description

bzr rm should remove (without needing --force) subtrees that contain no files with text changes or modified files.

I think it's ok to remove ignored files, or trees that have renames in or out.

With --force we should remove the subtree regardless of text changes or unknown files.

bialix asks:

> C:\work\Bazaar\bzrconf\bzr-config-trunk\locale>bzr remove ru --force
> locale/ru is not empty directory and won't be deleted.
>
>
> ^-- Why `remove` don't want to delete subdirectories (even with --force)?
> There is no other unversioned or ignored files inside,
> so deleting all subdirs is pretty safe here.
> This message contrary to previous error's suggestion
> to use '--force to delete them regardless'

Tags: ui
Martin Pool (mbp)
Changed in bzr:
importance: Undecided → Low
status: Unconfirmed → Confirmed
Revision history for this message
Matthew Fuller (fullermd) wrote :

I'm not sure if this is exactly what's discussed above or not, but rm doesn't remove directories at all unless they're the one specified in the command line.

#!/bin/sh -x
bzr="bzr"

# Create
${bzr} init t
cd t
# If you used these two, it Just Works
#mkdir a
#touch a/b
# With these, it doesn't, as below
mkdir a a/b
touch a/b/c
${bzr} add
${bzr} ci -m 'a'

# Remove
${bzr} rm --force a

# a/b/ isn't removed, and so rm refuses to remove a/

Revision history for this message
Marius Kruger (amanica) wrote :

I intend to work on this this weekend.

Changed in bzr:
assignee: nobody → amanica
Revision history for this message
Marius Kruger (amanica) wrote :

thanks Alexander for reviewing and merging it.

Changed in bzr:
status: Confirmed → Fix Committed
Changed in bzr:
status: Fix Committed → Fix Released
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.