Cherry pick with records

John Arbash Meinel john at arbash-meinel.com
Wed Feb 7 16:17:05 GMT 2007


Ben Lau wrote:
> On 2/7/07, Martin Pool <mbp at canonical.com> wrote:
>> On  7 Feb 2007, Ben Lau <xbenlau at gmail.com> wrote:
>> > Hi,
>> >
>> >       Follow the command for cherry pick from
>> > http://bazaar-vcs.org/MergeTracking , it could merge changes from
>> > another repository successfully, but it doesn't preserve the original
>> > log messages. In case that no conflict is encountered during the merge
>> > operation, any method could preserve the log message?
>>
>> Hi Ben,
>>
>> There is no method to preserve it at present.  There has been some
>> discussion, which I think is described in the wiki, of how we could
>> capture that information.  If you're interested in implementing it let
>> me know and we can talk about it more on the list.
>>
>> -- 
>> Martin
>>
> 
> Hi Martin,
> 
>    Thanks for your reply. Unfortunately that I don't know much about
> Python programming(planned to learn). What I could contribute now is
> only a small bash script for "temporary use". It picks changes and log
> messages from another repository then commit locally. It will stop
> when any conflicts was found.
> 
> e.g.
> 
> $ cd repo2
> $ bzr-cherry-pick.sh 5 14 ../repo1 # merge changes from revno5 to 14
> from repo1 to repo2

If all you want is the message included in the merge log, you can
actually do:

bzr merge -r 5..14 ../other/branch
bzr commit -m "`bzr log -r 6..14` ../other/branch"

I think the easiest way to get the log message included would be to just
set some revision properties, so you would get a mapping of extra
'cherry-picked-revisions'. This could leverage James H's earlier work of
having a pending-revision-properties in the working tree.

It does cause some small problems with 'fetch()' because fetch wouldn't
necessarily copy these revisions across.

So to be more thorough this sort of thing would need to be recorded as
part of the inventory.kndx, or at least somewhere that is fast to find
out what revisions were cherry picked. (Another possibility might be to
add it to the inventory texts) Or maybe if we ended up with a separate
changelog file, we could include information like that there.


Just some thoughts.

John
=:->



More information about the bazaar mailing list