Fixing moves

Alexander Belchenko bialix at ukr.net
Thu Jun 10 07:25:36 BST 2010


David Muir пишет:
> Harald Meland wrote:
>> [David Muir]
>>
>>   
>>> Is there a way to apply moves to files that were moved, say 20 revs ago?
>>>     
>>
>> Not quite sure how to interpret that, is the following anywhere near
>> what you want?
>>
>> Branch just before/after (depending on what you want) the old moves:
>>
>>   bzr branch -r -20 my_branch fix_moves
>>
>> Fix the moves:
>>
>>   cd fix_moves
>>   bzr mv wrong_name right_name
>>   bzr commit -m "fixed move"
>>
>> Merge the fix:
>>
>>   cd ../my_branch
>>   bzr merge ../fix_moves
>>   # You might need to resolve conflicts here.
>>   bzr commit -m "merge move fixes"
>>
>>   
> That sort of fixes it, but not quite what I'm after. I'd like to replace
> that earlier commit altogether.
> The problem is that files were moved using the filesystem, but the move
> was never registered with bzr. So I'm wanting to go back and apply the
> move. Is this where rebase or fast-import or something like that would
> come in handy?

Yes, because you need to re-write the history. fast-import will
destroy all your history and creates new one. rebase would be better,
but I'm not sure if it allows interactive rebase of each commit.




More information about the bazaar mailing list