[rfc] remove foo.bar; add foo.bar -> make this no-op?
Alexander Belchenko
bialix at ukr.net
Fri Sep 15 14:20:59 BST 2006
Aaron Bentley пишет:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Alexander Belchenko wrote:
>> John Arbash Meinel пишет:
>> $ hack-hack foo.bar
>> $ bzr remove foo.bar # Ooops! It's mistake! I don't want this!!!
>> $ bzr revert foo.bar # all changes in foo.bar lost
>
> No, the the changes you made are kept in foo.bar.~1~
If file is versioned -- then yes. But I try by myself and got this:
$ bzr revert foo.bar
Conflict adding file foo.bar. Moved existing file to foo.bar.moved.
So, last file content actually will be in foo.bar.moved.
>> So before revert I need to save current foo.bar in some place and then
>> restore content after revert. And merge history for foo.bar will be
>> preserved? It's right?
>
> Actually, because you changed foo.bar's content, when you revert
> foo.bar, it will move the current content of foo.bar into foo.bar.~1~.
>
> So you can just do
> $ bzr revert foo.bar
> $ mv foo.bar.~1~ foo.bar
--
Alexander
More information about the bazaar
mailing list