[Paraview-developers] CVS->Git Transition Plan

pat marion pat.marion at kitware.com
Wed Apr 21 10:01:58 EDT 2010


Trying to understand the mechanics of submodules, I found it helpful to read
this article explaining the detached-head concept in git:

http://sitaramc.github.com/concepts/detached-head.html

So in paraview:

$ cd ParaView
$ git submodule status VTK
  892014037f07ac668979c85b85112fc850515b94 VTK (v5.4.2-4331-g8920140)
$ cd VTK/
$ cat .git/HEAD
892014037f07ac668979c85b85112fc850515b94
$ git checkout -b mywork
$ cat .git/HEAD
ref: refs/heads/mywork
$ cat .git/refs/heads/mywork
892014037f07ac668979c85b85112fc850515b94


Pat

On Wed, Apr 21, 2010 at 9:12 AM, Brad King <brad.king at kitware.com> wrote:

> Biddiscombe, John A. wrote:
> >> The matching Git commit is
> >>
> >>   http://vtk.org/gitweb?p=VTK.git;a=commitdiff;h=fddd6bba
> >
> > It seems like the sub modules have lives of their own.
>
> Correct.  I've been meaning to put more submodule documentation
> on the Wiki but haven't had time yet.
>
> > I'm working with paraview, and have a bunch of changes in
> > paraview : Xdmf : VTK
> > which are really their own repositories.
>
> Oh, sorry, I didn't realize from your original email that it
> was more than just VTK.
>
> > Do I treat these as separate repos for the purposes of my
> > git management.
>
> Yes, but they can be in one tree.  See below.
>
> > Can I checkout paraview with a single tag and get all 3.
>
> Yes:
>
>  http://paraview.org/gitweb?p=ParaView.git;a=commit;h=c8805939
>
>  $ git checkout -b mypv c8805939
>  $ git submodule update
>
> > Basically, can I do all in one, or must I do 3
>
> The above command will give you a tree with
>
>  .git/                 = ParaView clone
>  VTK/.git/             = VTK clone
>  Utilities/IceT/.git/  = IceT clone
>  Utilities/Xdmf2/.git/ = Xdmf clone
>
> The local ParaView will be on the "mypv" branch created
> by the checkout command (the name is arbitrary).  The other
> submodule repositories will be in a "detached HEAD" state.
> This means that their work trees have been checked out as
> the versions specified by ParaView's submodule references
> as of c8805939.  These should match the last cvs versions
> for all of the projects.
>
> Then you can go into each submodule repo and create a local
> branch on which to put your commits.  The local branches
> will automatically start from the current versions, which
> is what you want:
>
>  $ cd VTK
>  $ git checkout -b myvtk
>  $ cd ../Utilities/Xdmf2
>  $ git checkout -b myxdmf
>
> Next, apply your patches from CVS to the whole ParaView
> tree.  Then go into each submodule and create their commits.
> When finished with all the submodules, run "git status"
> at the top level of ParaView.  It should report that the
> submodules have been modified.  This means that their
> HEAD points at a different version than that referenced
> by ParaView.  Use "git add" to stage the new references.
> Then add the rest of your changes in ParaView and commit.
>
> -Brad
> _______________________________________________
> Paraview-developers mailing list
> Paraview-developers at paraview.org
> http://public.kitware.com/mailman/listinfo/paraview-developers
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/paraview-developers/attachments/20100421/0237e7fa/attachment.htm>


More information about the Paraview-developers mailing list