Le 2 avril 2012 12:12, Peter Stuge <pe...@stuge.se> a écrit :
> Ludovic Rousseau wrote:
>> >> 1. rebase the SM branch over the OpenSC version in gerrit/staging
>> >
>> > Okay. So all we need is a diff between SM and staging?
>>
>> No. What you need is to extract all the SM patches and apply them
>> on the gerrit/staging branch.
>> Of course some conflicts are expected and need to be fixed.
>>
>> What I would do (but I am not a git expert)
>
> You got it exactly right the first time. git rebase does exactly
> this. For this work it might make sense to do interactive rebase
> in order to avoid duplicate work, but in any case rebase is the
> right tool.
>
>
>> on the SM branch use: "git format-patch origin" to get the changes
>> in individual patch files.
>> on the gerrit/staging use: "git am my_patch" for all the previously
>> generated patches.
>
> I would avoid doing this manually. git rebase really is the way to go.

I am still lost when git rebase fails. I need to improve my git skills.

>> Do not apply all the patches at once but one after the other (in
>> the correct order) and rebuild after each patch. The source code
>> shall compile after each change or gerrit will reject it.
>
> This can actually be automated pretty easily after the fact. I would
> first do the complete rebase and only after test each commit on the
> branch.

How do you do that?

>> I had the problem yesterday: a compilation bug that was fixed by
>> another patch. I had to merge the two patches.
>
> Another solution may be to reorder the commits. Interactive rebase
> makes this very easy once the commits have been found.

Reorder and merge the problematic change with the fix. I know who to do that :-)

Bye

-- 
 Dr. Ludovic Rousseau
_______________________________________________
opensc-devel mailing list
opensc-devel@lists.opensc-project.org
http://www.opensc-project.org/mailman/listinfo/opensc-devel

Reply via email to