Behavior of 'rm' and 'mv' under bazaar

Tom Browder tom.browder at gmail.com
Wed Oct 13 18:12:04 BST 2010


On Wed, Oct 13, 2010 at 11:31, Neil Martinsen-Burrell <nmb at wartburg.edu> wrote:
> On 2010-10-13 09:45 , Tom Browder wrote:
>>
>> On Thu, Sep 30, 2010 at 06:13, Tom Browder<tom.browder at gmail.com>  wrote:
>>>
>>> On Thu, Sep 30, 2010 at 01:24, Eric Siegerman<lists08-bzr at davor.org>
>>>  wrote:
>>>>
>>>> On Thu, 2010-09-30 at 11:09 +1000, Ben Finney wrote:
>>>>>
>>>>> That's right. An OS-level ‘rm’ or ‘mv’ is just another change Bazaar
>>>>> will track; if you ‘bzr status’ then you'll see Bazaar notices when
>>>>> files aren't there any more, and will record that fact when you
>>
>> I've had a little more practical bzr experience now, and the rm thing
>> is still a little unsettling.  However, I think this work flow will
>> work from my experiments (please confirm):
...
> Here is the session I used to check this:
...
> Committed revision 2.
> nmb at guttle[~/tmp/test]$ ls
> a       b
> nmb at guttle[~/tmp/test]$ bzr revert -r1 c
> +N  c
> nmb at guttle[~/tmp/test]$ bzr st
> added:
>  c
>
>> I have lost any
>> pending changes from the deletion, but the same thing happens with
>> subversion.
>
> Can you say more about what you mean by "pending changes from the deletion"?
>  If the file c is no longer present, how does it have any changes?

Well, I may have edited it before accidentally removing it before it
was committed, so those changes would be lost--again, no different
than subversion.

>> (For this situation, it would be very handy to have a way to ask bzr
>> for a list of removed files, perhaps an option to 'bzr log'.)
>
> Given Bazaar's strong facilities for extensions, here is a very basic plugin
> that provides a --deleted format for log which shows only the deleted items.
>  Using my example above,
...

Wow, sounds like it should go in bazaar core!

Thanks, Neil.

Thomas M. Browder, Jr.
Niceville, Florida
USA



More information about the bazaar mailing list