[rfc] remove foo.bar; add foo.bar -> make this no-op?

Alexander Belchenko bialix at ukr.net
Fri Sep 15 07:09:54 BST 2006


John Arbash Meinel пишет:
> Alexander Belchenko wrote:
>> If I have some tree and during my work accidentally remove some
>> versioned file by
>>
>> $ bzr remove foo.bar
>>
>> Then it becomes unversioned. There is no way (only revert) to undo this.
>> Sometimes it's enough, but sometimes not. E.g. when I do manual
>> resolving of merge conflicts I simply don't want to undo all work.
>> If I do 'bzr add' before 'bzr commit' file becomes versioned again but
>> with another file-id. So bzr treats it as fresh new file.
>>
>> Is there is a way to tell bzr that this added file is old file, i.e. use
>> old file-id and don't break file history?
> 
> You do realize that you can do 'bzr revert foo.bar', right?

So if I'm do:

$ bzr merge
conflict in foo.bar
$ 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

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?

> Which only changes that one file, and doesn't effect the status of the
> merge, etc.

I did not know this fact.

--
Alexander





More information about the bazaar mailing list