[Insight-developers] Gerrit thinks my new patch depends on another patch, when it shouldn't?

Marcus D. Hanwell marcus.hanwell at kitware.com
Fri Oct 22 19:43:00 EDT 2010


This is a git level thing, and most of the time is exactly what you
want - all dependent commits are brought along. If you want a truly
independent patch, then make sure you start the topic branch from a
clean origin/master that doesn't have local commits on it. This is the
behavior we rely upon for things like topic branches.

The prepush macro will let you see what unmerged changes (relative to
origin/master) are on any currently checked out branch.

Marcus

On Fri, Oct 22, 2010 at 7:22 PM, Bill Lorensen <bill.lorensen at gmail.com> wrote:
> Every time I think things are getting easier, something like this
> comes up. What can we do to prevent it from happening?
>
> Bill
>
> On Fri, Oct 22, 2010 at 6:14 PM, Marcus D. Hanwell
> <marcus.hanwell at kitware.com> wrote:
>> Hi Kent,
>>
>> On Thu, Oct 21, 2010 at 1:51 PM, kent williams
>> <norman-k-williams at uiowa.edu> wrote:
>>> http://review.source.kitware.com/#change,221
>>>
>>> My procedure:
>>>
>>> git checkout -b FixImageLinearIteratorWithIndex2-Example
>>>
>>> # edit the file that needs fixing
>>>
>>> git commit -a
>>>
>>> git push gerrit
>>> HEAD:refs/for/master/FixImageLinearIteratorWithIndex2-Example
>>>
>>> I think my problem was not doing this at the start:
>>>
>>> git checkout -b FixImageLinearIteratorWithIndex2-Example origin/master
>>>
>>> Is there a way to break the dependency?
>>>
>> You would want to make a new topic branch, and then cherry-pick your
>> commit to it, and push the new topic branch to Gerrit.
>>
>> git fetch
>> git checkout -b new-topic origin/master
>> git cherry-pick <hash-of-commit>
>>
>> Then you can push this new topic, and the dependency will be broken.
>> If using the aliases I added, before pushing do,
>>
>> git prepush
>>
>> Otherwise,
>>
>> git log origin/master..
>>
>> That will give you a list of commits you are about to push into Gerrit.
>>
>> I hope that helps, please let me know if you are confused. The main
>> thing is copying/pasting the hash of the commit you want to move onto
>> the new topic branch. I have also just cherry-picked commits using
>> Gerrit before staging/merging.
>>
>> Marcus
>> _______________________________________________
>> 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
>>
>


More information about the Insight-developers mailing list