AW: AW: RFC: bzr rm is hard to use

Voelker, Bernhard bernhard.voelker at siemens-enterprise.com
Thu Jul 16 09:57:35 BST 2009


 

Ian Clatworthy wrote:
> To get back a file that existed previously, I'd use something like
'bzr
> revert -rxxx foo'.

sounds conclusive, thanks.

> Compare your expected behaviour in those cases with 'bzr rm' on a file
> yet to be committed. If I do:
>
>  bzr add foo
>  (damn, didn't mean that)
>  bzr rm foo
> 
> then I certainly do *not* want Bazaar to remove the file from disk - I
> just want it to forget about the 'bzr add'. Being both safe and
> consistent here is the crux of the usability challenge IMO.

I agree.

So I'd like to add another case, where an unversioned file should be
deleted:

  $ echo hello > file
  $ bzr rm file
  bzr: ERROR: Can't safely remove modified or unknown files:
  unknown:
    file
  Use --keep to not delete them, or --force to delete them regardless.
  $ bzr rm --force file
  deleted file

The file was not versioned, so I found it surpising that bzr can operate
on it, and more surprisingly only with --force. This is defense
behaviour
which is good, but I'd have expected something like

  $ echo hello > file
  $ bzr rm file
  bzr: ERROR: Can't work on unknown files.
  $ bzr rm --force file
  bzr: ERROR: Can't work on unknown files.

Have a nice day,
Berny



More information about the bazaar mailing list