removing added-in-error files

Wichmann, Mats D mats.d.wichmann at intel.com
Thu Dec 6 05:56:58 GMT 2007


Martin Pool wrote:
> On Dec 6, 2007 3:20 PM, Wichmann, Mats D
> <mats.d.wichmann at intel.com> wrote:
>> After an "add" of a directory picked up some things left lying
>> around in it, I tried to clean up before committing:
>> 
>> $ bzr help rm
>> Purpose: Remove files or directories.
>> Usage:   bzr remove [FILE...]
>> 
>> Options:
>>   --new          Remove newly-added files.
>> ....
>> 
>> $ bzr rm --new python.man*
>> bzr: ERROR: Can't remove changed or unknown files:
>> added:
>>   Python/interpreter/python.man
>>   Python/interpreter/python.man.xml
>> Use --keep to not delete them, or --force to delete them regardless.
>> 
>> 
>> Huh?  they're neither changed nor unknown, they're "added", and the
>> help just told me to use --new to remove newly-added files.
> 
> As it happens Ian mentioned this too today.
> 
> Normally bzr rm removes the working copy too, rather than just
> unversioning them.  Also, we normally don't want to delete files which
> the user can't restore from a previous version, unless they've
> indicated with --force that that's ok.    In this case newly added
> files can't be restored so we don't want to delete them.
> 
> What were you expecting would happen?  Would it be ok if the message
> was just more clear? --

well, a couple of thoughts

- What I expect is for bazaar to forget that I asked to "add"
  the file.  to me the comment on the "I mean it" --new flag
  seemed to imply some such.  why have the flag if it doesn't
  work?  or perhaps it's misdocumented and actually does
  something different?

- I'm not used to the vcs command to unversion a file also removing
  the file.  this seems to be a (recent) oddity of bzr, but I'm
  getting used to it. being explict with --keep and --force is
  not such a problem, since in this case I admit it's hard to
  figure out what to do.  better message would help.



More information about the bazaar mailing list