You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by Eric Dramstad <ed...@gmail.com> on 2016/03/15 18:13:37 UTC

Can I combine 'complete' and 'cherry-pick' merges?

Is it safe/correct to do a combination of a 'complete' merge and a
'cherry-pick' merge to reintegrate a feature branch?

I've only ever done a 'complete' merge of a feature branch.  For this
project, several of the changesets from the branch contain a mix of
things I want to merge into the trunk and things I want to leave on
the branch.  For example, the version identifier that gets inserted
into compiled software was modified after branching so that builds
would identify themselves as special.

I'm thinking of doing this (while standing inside a trunk workarea):

    svn merge ^/feature
    svn merge -c -100 ./file.c
    svn merge -c -101 ./file.h
    svn commit -m 'reintegrated feature'

Thanks,
Eric Dramstad

Re: Can I combine 'complete' and 'cherry-pick' merges?

Posted by Stefan Hett <st...@egosoft.com>.
Hi Eric,
> Eric Dramstad <edrams <at> gmail.com> writes:
>> I'm thinking of doing this (while standing inside a trunk workarea):
>>
>>       svn merge ^/feature
>>      svn merge -c -100 ./file.c
>>      svn merge -c -101 ./file.h
>>      svn commit -m 'reintegrated feature'
> That should have been:
>
>      svn merge ^/feature
>      svn merge -c -100 ^/feature/file.c ./file.c
>      svn merge -c -101 ^/feature/file.h ./file.h
>      svn commit -m 'reintegrated feature'
>
> I also should have mentioned that I'm using subversion 1.9.3.
Yes, this should be fine. We are using that approach quite regularly 
here (though in our case the other way around --- aka: cherry picking 
selective changes first and in the end do a complete merge of the rest).

-- 
Regards,
Stefan Hett


Re: Can I combine 'complete' and 'cherry-pick' merges?

Posted by Eric Dramstad <ed...@gmail.com>.
Eric Dramstad <edrams <at> gmail.com> writes:
> I'm thinking of doing this (while standing inside a trunk workarea):
> 
>     svn merge ^/feature
>     svn merge -c -100 ./file.c
>     svn merge -c -101 ./file.h
>     svn commit -m 'reintegrated feature'

That should have been:

    svn merge ^/feature
    svn merge -c -100 ^/feature/file.c ./file.c
    svn merge -c -101 ^/feature/file.h ./file.h
    svn commit -m 'reintegrated feature'

I also should have mentioned that I'm using subversion 1.9.3.