[MERGE] bzr rm should delete the working file (Bug #82602)

Daniel Parks dp+bzr at oxidized.org
Fri Feb 16 17:05:33 GMT 2007


[Hope nobody sees this twice -- I sent it to the list with the wrong  
 From address.]

Hi Marius,

I like the ability to have rm delete working files, but I think this  
is a very dangerous way to go about it. With this change, rm goes  
from a safe command that can't lose data to a dangerous command.  
Further, I think it's inconsistent with the rest of bzr -- I trust  
that bzr isn't going to delete my data unless I very explicitly tell  
it to.

A simple algorithm that might be better would be to only delete  
working files when the file is versioned, and the working file is  
unchanged. I'm a little worried that this adds an inconsistency to  
the UI based on something the user may have forgotten (versioned  
status). Perhaps a warning could be issued in the less common use  
case (dunno which that is).

I'm not sure this algorithm is a good idea, but I would much prefer  
it to just deleting the working file willy-nilly.

I see that Martin says there's a consensus in the bug, so maybe I'm  
on crack. But, I think this is dangerous, and surprising to users. I  
understand that SVN does it this way, but CVS (which I think is still  
more common) and older versions of bzr do not.

Another option is a short option to delete the working file, a la -f  
in CVS. -f stands for "force" in CVS, I think, so perhaps its not  
right for bzr. Even with the above algorithm, an explicit option  
would be nice.

Yet another option would be to make a backup file, but I'm not sure  
it's obvious enough.

Thanks,
Daniel




More information about the bazaar mailing list