[rfc] couple questions about new behavior of `bzr remove dir`

Martin Pool mbp at sourcefrog.net
Wed May 2 03:17:19 BST 2007


On 5/2/07, Alexander Belchenko <bialix at ukr.net> wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Here my session log and some questions:

The general rule is meant to be that remove without --force will
delete only things that can be recovered by eg a revert.  You can't
lose data that is not already stored.

> C:\work\Bazaar\bzrconf\bzr-config-trunk\locale>bzr st
> renamed:
>   locale/ru/LC_MESSAGES/bzrconf.mo => locale/ru/LC_MESSAGES/bzr-config.mo
>
> C:\work\Bazaar\bzrconf\bzr-config-trunk\locale>bzr remove ru
> bzr: ERROR: Can't remove changed or unknown files:
> renamed:
>   locale/ru/LC_MESSAGES/bzrconf.mo => locale/ru/LC_MESSAGES/bzr-config.mo
> Use --keep to not delete them, or --force to delete them regardless.
>
>
> ^-- Why `remove` refuse to work on renamed entries?
>     Content of file does not changed here.
>     The file itself not changed and still versioned.
>     So error message does not match to real situation in WT.

I think it's a bug - you can get the content back by revert.  On the
other hand if the file was renamed and also modified remove should
fail.

https://bugs.launchpad.net/bzr/+bug/111664

> 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'

https://bugs.launchpad.net/bzr/+bug/111665

> Is this intended behavior or simply this use case was not taking into consideration?

I think it just was not tested.

-- 
Martin



More information about the bazaar mailing list