RFC: bzr rm rethink
John Arbash Meinel
john at arbash-meinel.com
Fri Aug 8 14:07:14 BST 2008
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Robert Collins wrote:
> On Fri, 2008-08-08 at 13:40 +1000, Martin Pool wrote:
>> On Fri, Aug 8, 2008 at 9:46 AM, Robert Collins
>> <robertc at robertcollins.net> wrote:
>>> so bzr rm has a whole bunch of complexity - 'keep', 'force' and a bunch
>>> of flags.
>
> ...
>> I guess the way to make it most similar to add would be to require the
>> user to manually delete the files first, and either do nothing or warn
>> or give an error if they have not been removed, which I suppose is the
>> point of your second example. I think just doing nothing would be too
>> confusing, and requiring it to be added as a separate step might seem
>> unnecessary.
>
> The point of my second example was that we can still support removing
> individual files even when several are missing; just like you can add
> some-but-not-all of the new files in a tree.
>
> I'll get 'no options' form working (I found a bug in dirstate doing
> it :)) and we can see how it feels from there.
>
> -Rob
>
So.... if I remember back when I was deleting more, I felt that doing:
rm foo
bzr rm foo
Was rather clumsy and annoying. I will admit that I rarely delete files
anymore, so I don't have as much experience with it.
So I support having
$ rm foo
$ bzr rm
deleting foo
I think having an explicit form for
$ bzr rm foo
doing an explicit 'rm foo' is still a good thing.
We thrashed about this for a long time, and settled on "if foo is not
modified, we can explicitly delete it, else require --force". (And I
think we also require --keep for the other side of it.)
Which actually leads to some nice behavior:
1) It is *safe* to do "bzr rm foo", because it will only remove the
files if they are unmodified (aka, you can get back the contents with
bzr revert.) Which is actually safer than "rm foo; bzr rm".
2) How (in your scenario) do you handle the "bzr rm --keep foo" form.
Which means "I don't want this file versioned anymore, but I want it
left on disk". I suppose if you gave an explicit path, it would always
just simply unversion that path?
I think the most common use for it is "bzr add; oops; bzr rm foo bar"
I also think you need to chat with elmo a bit, and see how he uses 'rm'
in the context of managing /etc. I know he's been unhappy with some
changes in the past.
So in the end, I *like* the "bzr rm foo" removing the file from disk,
because it makes things simpler and safer *for me*. That may not be
everyone's use case, and I'm willing to be flexible.
John
=:->
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (Cygwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iEYEARECAAYFAkicRQIACgkQJdeBCYSNAANK9wCdFYskDHftxOenUi0qSIa814V3
0tQAoLT3UBPf7QPPljwOPNO/i+IUnSMz
=B5DN
-----END PGP SIGNATURE-----
More information about the bazaar
mailing list