[BUG] Re: Adding and reverting a file deletes the file

John A Meinel john at arbash-meinel.com
Fri Oct 7 02:29:05 BST 2005


Aaron Bentley wrote:
> Michael Ellerman wrote:
> 
>>>A little more clearly:

...

> 
> Unfortunately, it's not as clear-cut as that.
> 
> First, 'revert' is not 'undo'.  It doesn't undo all operations since the
> last commit, it restores the tree to the state it was in at the last
> commit.  It's successfully accomplishing that.  Deleting potentially
> valuable data, but restoring the state.
> 
> (bazaar undo has the same behavior)
> 
> We don't track creation or deletion of files, really.  We only track
> inventory adds and removes.
> 
> But when we want to add a file that's not there, it's pretty clear that
> we've got to create it.  It's less clear what to do when we remove a
> file.  But if we always removed, never deleted, then merge would be a
> vector for installing unversioned files.
> 
> Also, not all newly-added files should be preserved.  If the files are
> created because of a merge, I want them to disappear when I revert.
> Unless I've edited them since.
> 
> So yeah, I agree with the spirit, but the bug is that we don't have a
> good idea of how to address the issue.

What happened to merge always creating a backup of a file? So that "bzr 
revert" would create text~, and get rid of text.

Actually, what we really want is to get the changeset code pulled in, 
make it work with uncomitted data, and then when you "bzr revert" it can 
  generate a changeset, which can then be re-applied if you accidentally 
deleted something valuable.

Merge can still delete files, just have it build up the "things to do", 
shove the reverse into a changeset, and then apply it.

John
=:->

> 
> Aaron
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 253 bytes
Desc: OpenPGP digital signature
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20051006/f2ef2d4e/attachment.pgp 


More information about the bazaar mailing list