bzr rm should remove clean subtrees
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\
> 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'
Changed in bzr: | |
importance: | Undecided → Low |
status: | Unconfirmed → Confirmed |
Changed in bzr: | |
status: | Fix Committed → Fix Released |
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/