[Insight-developers] git gerrit-merge trouble

Cory Quammen cquammen at cs.unc.edu
Wed Jul 27 09:25:11 EDT 2011


On Wed, Jul 27, 2011 at 7:12 AM, Cory Quammen <cquammen at cs.unc.edu> wrote:
> On Wed, Jul 27, 2011 at 6:24 AM, David Cole <david.cole at kitware.com> wrote:
>> If you push it back one last time as a new patch set, then the merge
>> should work after that.
>>
>> It can't do the merge because you've never pushed your rebased
>> changes. (It may be an "equivalent change" commit to the previous
>> patch set, but it is a different commit object with a different
>> hash...)
>
> Hmm, I'm pretty sure that's what I did the first time. I'll try again
> with a gerrit-push.

As I thought, I had already pushed my rebased patch to gerrit. When I
tried to push it again, I got the error

patronum:ITK cquammen$ git gerrit-push
Fetching gerrit master
Pushing to gerrit
Total 0 (delta 0), reused 0 (delta 0)
error: failed to push some refs to 'cquammen at review.source.kitware.com:ITK'
To cquammen at review.source.kitware.com:ITK
!	HEAD:refs/for/master/ConvolutionImageFilterEnhancements	[remote
rejected] (no new changes)

The hash for this commit in my local repo is
96ee95de22a83b85c550a5c3fd932efa09dd612b, which is the same as gerrit
shows for patch set 6. So gerrit knows about this commit.

[snip]
>> We should never, ever attempt to merge a rebase or cherry-pick without
>> pushing it up as a new patch set first. (The act of re-basing or
>> cherry-picking may produce different results than your last patch set
>> due to interactions with other code that you have just rebased or
>> cherry-picked onto, so one last patch set *should* be pushed and allow
>> the robot builds to do one last check of it before merging to be
>> ultra-safe...)

Pushing a rebased patch to gerrit and waiting for robot builds is my
normal practice. By the way, the robot is not building for this patch,
even with a manual "Request build: all".

Cory

>>
>>
>> HTH,
>> David
>>
>>
>> On Tue, Jul 26, 2011 at 11:50 PM, Cory Quammen <cquammen at cs.unc.edu> wrote:
>>> I also tried the following
>>>
>>> git checkout master
>>> git pullall
>>> git checkout -b ConvolutionImageFilterEnhancements
>>> git fetch ssh://cquammen@review.source.kitware.com:29418/ITK
>>> refs/changes/89/2089/6 && git cherry-pick FETCH_HEAD
>>> git gerrit-merge
>>>
>>> and got the same non-fast-forward error. Did the same in a fresh clone
>>> of ITK.git, got the same error.
>>>
>>> Thanks,
>>> Cory
>>>
>>> On Tue, Jul 26, 2011 at 5:55 PM, Cory Quammen <cquammen at cs.unc.edu> wrote:
>>>> Hi,
>>>>
>>>> I'm trying to git gerrit-merge this patch:
>>>> http://review.source.kitware.com/#change,2089,patchset=6.
>>>>
>>>> I've rebased off the current master (as of this email):
>>>> http://www.itk.org/gitweb?p=ITK.git;a=commit;h=6646dbabff6fd1263fa105d016932d3f95f1f452
>>>>
>>>> So now 'git log -oneline' reports:
>>>>
>>>> 96ee95d ENH: Several enhancements for ConvolutionImageFilter
>>>> 6646dba Merge topic 'FixSignedInitializationWarning'
>>>> 0c632bf COMP:  Removed signed initializer compiler warning
>>>> ...
>>>>
>>>> When I try 'git gerrit-merge', I get the error
>>>>
>>>> To git at itk.org:stage/ITK.git
>>>>  ! [rejected]        HEAD -> ConvolutionImageFilterEnhancements
>>>> (non-fast-forward)
>>>> error: failed to push some refs to 'git at itk.org:stage/ITK.git'
>>>> To prevent you from losing history, non-fast-forward updates were rejected
>>>> Merge the remote changes (e.g. 'git pull') before pushing again.  See the
>>>> 'Note about fast-forwards' section of 'git push --help' for details.
>>>>
>>>> After rebasing on master, I'm not sure how this would not be a
>>>> fast-forward merge.
>>>>
>>>> I'm at a loss. Any ideas?
>>>>
>>>> Thanks,
>>>> Cory
>>>>
>>>>
>>>> --
>>>> Cory Quammen
>>>> Research Associate
>>>> Department of Computer Science
>>>> University of North Carolina at Chapel Hill
>>>> http://www.cs.unc.edu/~cquammen
>>>>
>>>
>>>
>>>
>>> --
>>> Cory Quammen
>>> Research Associate
>>> Department of Computer Science
>>> University of North Carolina at Chapel Hill
>>> http://www.cs.unc.edu/~cquammen
>>> _______________________________________________
>>> Powered by www.kitware.com
>>>
>>> Visit other Kitware open-source projects at
>>> http://www.kitware.com/opensource/opensource.html
>>>
>>> Kitware offers ITK Training Courses, for more information visit:
>>> http://kitware.com/products/protraining.html
>>>
>>> Please keep messages on-topic and check the ITK FAQ at:
>>> http://www.itk.org/Wiki/ITK_FAQ
>>>
>>> Follow this link to subscribe/unsubscribe:
>>> http://www.itk.org/mailman/listinfo/insight-developers
>>>
>>
>
>
>
> --
> Cory Quammen
> Research Associate
> Department of Computer Science
> University of North Carolina at Chapel Hill
> http://www.cs.unc.edu/~cquammen
>



-- 
Cory Quammen
Research Associate
Department of Computer Science
University of North Carolina at Chapel Hill
http://www.cs.unc.edu/~cquammen


More information about the Insight-developers mailing list