remove vs rm vs forget (was [MERGE] remove --new)
Michael Ellerman
michael at ellerman.id.au
Mon Jun 5 00:45:55 BST 2006
On 6/5/06, Martin Pool <mbp at canonical.com> wrote:
> On 29 May 2006, Aaron Bentley <aaron.bentley at utoronto.ca> wrote:
> > This patch adds support for "bzr remove --new", as discussed earlier on
> > the list. As is frequently the case, the tests are longer than the
> > tested code.
>
> This looks reasonable, but it reminds me of something else:
>
> At the moment, 'bzr rm foo' makes foo unversioned, but doesn't remove it
> from the working directory. This is a bit weird.
>
> So I propose to do this:
>
> bzr rm foo -- delete it from the working directory and inventory
> bzr remove foo -- just remove from the inventory, leave the file
-1 from me, this is bound to result in people a) being confused and b)
losing data.
I'd suggest:
- "bzr rm" is deprecated.
- "bzr remove" is an alias for "bzr unversion" and does the opposite
of "bzr add".
- when users want to remove a file they just "rm" it.
- when this happens the file becomes "missing" in bzr terms
- you can't commit with "missing" files, you have to either recreate
the file, or "bzr unversion" it.
- there should be an easy way to say "unversion all the currently
missing files".
This has the, IMHO desirable, properties that:
- bzr never deletes user data.
- users can use standard tools to remove files, eg. "rm" or via Nautilus.
- but, because removal is a potentially dangerous operation, there's
still a confirmation step required.
- it's harder to accidentally unversion a file.
cheers
More information about the bazaar
mailing list