[vtk-developers] Gerrit and topic dependencies

David Lonie loniedavid at gmail.com
Mon Aug 22 09:48:48 EDT 2011


On Sun, Aug 21, 2011 at 9:43 PM, Marcus D. Hanwell
<marcus.hanwell at kitware.com> wrote:
> On Wed, Aug 17, 2011 at 8:31 AM, David Lonie <loniedavid at gmail.com> wrote:
>> I have a question about gerrit. The vtkChemistry branch that I'm
>> working on will depend on the commit in the macro-vtkVector branch.
>> When the time comes, how should I go about pushing vtkChemistry? Will
>> gerrit detect that the vtkVector patch in the chemistry branch is the
>> same as the one that is already uploaded for review? Or will it create
>> a duplicate entry in Gerrit? I ran into this problem with the avogadro
>> project a few months ago, and I'm wondering if there is some sort of
>> branch-dependency implemented yet.
>
> If the commit hashes match, then the dependency will be seen and no
> duplicate will be created. If you rebase or cherry pick the vtkVector
> patch, the SHA hash would change and it would not see the same commit
> unless a Change-Id line is present.

Ok -- I will be sure to include the change ID in the commit.

>> I also have a few other commits that aren't necessarily chemistry
>> related in the chemistry branch, but that the new chemistry code
>> depends on (e.g.
>>
>> https://github.com/dlonie/VTK/commit/951f49892ac4fffd874459648475f757de7cddae
>> and
>> https://github.com/dlonie/VTK/commit/49c7117cc49eef1e3f0e6ac9529b00a53a1332b2
>>
>> ). Should I submit these as separate topics, or lump them into the
>> chemistry topic?
>>
> They look related enough to me, and I am happy to see them in the same
> branch. I think the name of the second commit macro is too specific,
> but it can be addressed in Gerrit. The macro you defined applies
> equally well to smart and weak pointers, and the repetition of VTK
> doesn't seem ideal.

Actually, it does not work with smart and weak pointers due to slight
differences in implementation. vtkNew<typename T> holds a pointer of
type T for the actual object and uses it directly, while the smart and
weak pointers store a pointer to a vtkObjectBase and static_cast it
every time it's used. As a result, the macro in that commit won't work
with forward-declared classes, since inheritance information is needed
for the static_cast in GetPointer to compile.

I'm not sure if this was intentional or could be changed?

> I have time set aside to review changes, and get them merged. Thanks
> for all of your work over the summer, I will work on getting some of
> these merged as soon as possible. It would be great to see an overall
> summary of what you have in this branch for the benefit of the wider
> community (I know you have been blogging about this as you have
> worked).

Sure -- I'll get the branch pushed today and summarize the commits in
a message to the list.

Thanks,

Dave



More information about the vtk-developers mailing list