[Insight-developers] C# wrapping for SimpleITK

Dan Mueller dan.muel at gmail.com
Mon Sep 20 02:11:32 EDT 2010


Hi Dan (B), (others),

I'm a total git newbie and struggling a bit to send my SimpleITK C#
wrapping changes to gerrit.

I am following the steps you describe here:
    http://www.itk.org/Wiki/ITK/Gerrit/Primer

Firstly I rebased two commits into a single commit:
    $ git rebase -i HEAD~2
    [detached HEAD 6f6a4df] Add initial support for C# wrapping
     13 files changed, 407 insertions(+), 20 deletions(-)
     create mode 100644 Examples/SimpleGaussian.cs
     create mode 100644 Wrapping/AssemblyInfo.cs.in
     create mode 100644 Wrapping/CSharpModules/FindCSharp.cmake
     create mode 100644 Wrapping/CSharpModules/FindDotNetFrameworkSdk.cmake
     create mode 100644 Wrapping/CSharpModules/FindMono.cmake
     create mode 100644 Wrapping/CSharpModules/UseCSharp.cmake
     create mode 100644 Wrapping/CSharpModules/UseDotNetFrameworkSdk.cmake
     create mode 100644 Wrapping/CSharpModules/UseMono.cmake
     create mode 100644 Wrapping/CSharpTypemapHelper.i
    Successfully rebased and updated refs/heads/master.

Success. Then I tried to push to gerrit, but encountered my first
problem: I did not create a topic branch for this work, but committed
everything to the master of my github local repository. So the step:
    $ git push gerrit topic_branch_name:refs/for/master/remote_name
does not work because I don't have topic_branch_name.

Instead I just tried to push "master" (though not sure if this is
right). Anyhow, I got the following error:
    $ git push gerrit master:refs/for/master/SimpleITKCSharpWrapping
    Counting objects: 159, done.
    Delta compression using up to 2 threads.
    Compressing objects: 100% (87/87), done.
    Writing objects: 100% (159/159), 234.51 KiB, done.
    Total 159 (delta 79), reused 134 (delta 70)
    To danmuel at review.source.kitware.com:ITK
     ! [remote rejected] master ->
refs/for/master/SimpleITKCSharpWrapping (no common ancestry)
    error: failed to push some refs to 'danmuel at review.source.kitware.com:ITK'

I think my problem is that I need to add a remote to the SimpleITK
project (not the ITK project described in the primer), so I did this:
    $ git remote add gerritsimpleitk danmuel at review.source.kitware.com:SimpleITK

Questions: Is this correct? Will pushing my "master" work, or do I
need a topic branch? If I need a topic branch, how can I create one
when I have already committed the changes to the master?

Next issue: as described above, I rebased two commits into one.
However, before I did the rebase, I had previously pushed those single
commits to my remote repository on github. I was reading here
   http://progit.org/book/ch3-6.html#the_perils_of_rebasing
that pushing again will cause people to hate me. I don't really want
people to hate me...

Does that mean I should send two reviews to gerrit: one for each
pushed commit? (And revert the rebase to make sure I don't push it?).

Sorry for all the newbie questions...

Cheers, Dan

On 16 September 2010 22:07, Daniel Blezek <Blezek.Daniel at mayo.edu> wrote:
> Hi Dan,
>
>  I just finished writing a primer for Gerrit / git.  It is based on ITK,
> but if you substitute SimpleITK, it should be identical.  The last step is
> also different, as I simply push to my Github repo any final changes.
>
> http://www.itk.org/Wiki/ITK/Gerrit/Primer
>
> Best,
> -dan
>
>
> On 9/15/10 1:10 AM, "Dan Mueller" <dan.muel at gmail.com> wrote:
>
>> Hi Dan (B),
>>
>>>  Would you mind pushing this to Gerrit?
>> Sure. Once you're ready, just point me to the wiki page describing the
>> process.
>>
>> Cheers, Dan (M)
>>
>> On 14 September 2010 22:23, Daniel Blezek <Blezek.Daniel at mayo.edu> wrote:
>>> Hi Dan,
>>>
>>>  Would you mind pushing this to Gerrit?  I have not yet had time to put
>>> together a primer on how to assemble a Gerrit push, so if you want to wait a
>>> bit I can get that together and you can test it the process.
>>>
>>> Thanks,
>>> -dan
>>>
>>>
>>> On 9/14/10 2:21 PM, "Dan Mueller" <dan.muel at gmail.com> wrote:
>>>
>>>> Hi all,
>>>>
>>>> For your reference: I've finally had the time to finish my first
>>>> attempt adding C# wrapping to SimpleITK:
>>>>
>>>> http://github.com/danmuel/SimpleITK/commit/a851b4c8f185f9c97b95739de8e39a4c4
>>>> 2c
>>>> bca60
>>>>
>>>> I based the CMake modules on those in GDCM. The refactored CMake
>>>> modules may be useful for WrapITK. Currently only .NET on Windows is
>>>> supported; I still need to add support for Mono. Also, there is lots
>>>> more work required in the SWIG .i file, but at least it's a start...
>>>>
>>>> Cheers, Dan
>>>
>>> --
>>> Daniel Blezek, PhD
>>> Medical Imaging Informatics Innovation Center
>>>
>>> P 127 or (77) 8 8886
>>> T 507 538 8886
>>> E blezek.daniel at mayo.edu
>>>
>>> Mayo Clinic
>>> 200 First St. S.W.
>>> Harwick SL-44
>>> Rochester, MN 55905
>>> mayoclinic.org
>>> "It is more complicated than you think." -- RFC 1925
>>>
>>>
>
> --
> Daniel Blezek, PhD
> Medical Imaging Informatics Innovation Center
>
> P 127 or (77) 8 8886
> T 507 538 8886
> E blezek.daniel at mayo.edu
>
> Mayo Clinic
> 200 First St. S.W.
> Harwick SL-44
> Rochester, MN 55905
> mayoclinic.org
> "It is more complicated than you think." -- RFC 1925
>
>


More information about the Insight-developers mailing list