bzr shelve

Alexander Belchenko bialix at ukr.net
Thu Jan 27 14:23:42 UTC 2011


David Muir пишет:
> Been wondering about this for a while, and just ran into it again. I've 
> got a file where there are a couple of changes, and I want to separate 
> them, so I was going to use `bzr shelve`. However, it treats the two 
> changes as a single change, so I can't shelve one of them to commit the 
> other.
> 
> Is the only way around this to make a temporary branch, merge 
> --uncommitted, and then remove one of the changes, commit, then merge 
> back to my other branch?
> 
> Is there a way to work with more fine-grained hunks?

Yes, there is.

You should define some side-by-side diff/merge tool as editor for shelve 
in your bazaar.conf like that:

change_editor = vimdiff -fo @new_path @old_path

Or in my case to use WinMerge:

change_editor = '"C:/Program Files/WinMerge/WinMergeU.exe" @old_path 
@new_path'

after that every time you run shelve it will provide one more option to 
select hunks attached to 'e' letter. If you press 'e' then specified 
editor will be invoked and you can edit new_path to get the desired 
result after shelve.

HTH



More information about the bazaar mailing list