[prev in list] [next in list] [prev in thread] [next in thread]
List: vtk-developers
Subject: Re: [vtk-developers] [Paraview-developers] CVS->Git Transition Plan
From: pat marion <pat.marion () kitware ! com>
Date: 2010-04-21 14:01:58
Message-ID: s2v2c86953b1004210701h81081efflb1f03a3c73c45af2 () mail ! gmail ! com
[Download RAW message or body]
[Attachment #2 (multipart/alternative)]
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@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@paraview.org
> http://public.kitware.com/mailman/listinfo/paraview-developers
>
[Attachment #5 (text/html)]
Trying to understand the mechanics of submodules, I found it helpful to read this \
article explaining the detached-head concept in git:<br><br><a \
href="http://sitaramc.github.com/concepts/detached-head.html" \
target="_blank">http://sitaramc.github.com/concepts/detached-head.html</a><br>
<br>So in paraview:<br><br>$ cd ParaView<br>$ git submodule status VTK<br> \
892014037f07ac668979c85b85112fc850515b94 VTK (v5.4.2-4331-g8920140)<br>$ cd VTK/<br>$ \
cat .git/HEAD<br>892014037f07ac668979c85b85112fc850515b94<br>
$ git checkout -b mywork<br>$ cat .git/HEAD<br>ref: refs/heads/mywork<br>$ cat \
.git/refs/heads/mywork<br>892014037f07ac668979c85b85112fc850515b94<br><br><br>Pat<br><br><div \
class="gmail_quote">On Wed, Apr 21, 2010 at 9:12 AM, Brad King <span dir="ltr"><<a \
href="mailto:brad.king@kitware.com" \
target="_blank">brad.king@kitware.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); \
margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div>Biddiscombe, John A. wrote:<br> \
>> The matching Git commit is<br> >><br>
>> <a href="http://vtk.org/gitweb?p=VTK.git;a=commitdiff;h=fddd6bba" \
target="_blank">http://vtk.org/gitweb?p=VTK.git;a=commitdiff;h=fddd6bba</a><br> \
><br> > It seems like the sub modules have lives of their own.<br>
<br>
</div>Correct. I've been meaning to put more submodule documentation<br>
on the Wiki but haven't had time yet.<br>
<div><br>
> I'm working with paraview, and have a bunch of changes in<br>
> paraview : Xdmf : VTK<br>
> which are really their own repositories.<br>
<br>
</div>Oh, sorry, I didn't realize from your original email that it<br>
was more than just VTK.<br>
<div><br>
> Do I treat these as separate repos for the purposes of my<br>
> git management.<br>
<br>
</div>Yes, but they can be in one tree. See below.<br>
<div><br>
> Can I checkout paraview with a single tag and get all 3.<br>
<br>
</div>Yes:<br>
<br>
<a href="http://paraview.org/gitweb?p=ParaView.git;a=commit;h=c8805939" \
target="_blank">http://paraview.org/gitweb?p=ParaView.git;a=commit;h=c8805939</a><br> \
<br> $ git checkout -b mypv c8805939<br>
$ git submodule update<br>
<div><br>
> Basically, can I do all in one, or must I do 3<br>
<br>
</div>The above command will give you a tree with<br>
<br>
.git/ = ParaView clone<br>
VTK/.git/ = VTK clone<br>
Utilities/IceT/.git/ = IceT clone<br>
Utilities/Xdmf2/.git/ = Xdmf clone<br>
<br>
The local ParaView will be on the "mypv" branch created<br>
by the checkout command (the name is arbitrary). The other<br>
submodule repositories will be in a "detached HEAD" state.<br>
This means that their work trees have been checked out as<br>
the versions specified by ParaView's submodule references<br>
as of c8805939. These should match the last cvs versions<br>
for all of the projects.<br>
<br>
Then you can go into each submodule repo and create a local<br>
branch on which to put your commits. The local branches<br>
will automatically start from the current versions, which<br>
is what you want:<br>
<br>
$ cd VTK<br>
$ git checkout -b myvtk<br>
$ cd ../Utilities/Xdmf2<br>
$ git checkout -b myxdmf<br>
<br>
Next, apply your patches from CVS to the whole ParaView<br>
tree. Then go into each submodule and create their commits.<br>
When finished with all the submodules, run "git status"<br>
at the top level of ParaView. It should report that the<br>
submodules have been modified. This means that their<br>
HEAD points at a different version than that referenced<br>
by ParaView. Use "git add" to stage the new references.<br>
Then add the rest of your changes in ParaView and commit.<br>
<div><div></div><div><br>
-Brad<br>
_______________________________________________<br>
Paraview-developers mailing list<br>
<a href="mailto:Paraview-developers@paraview.org" \
target="_blank">Paraview-developers@paraview.org</a><br> <a \
href="http://public.kitware.com/mailman/listinfo/paraview-developers" \
target="_blank">http://public.kitware.com/mailman/listinfo/paraview-developers</a><br>
</div></div></blockquote></div><br>
_______________________________________________
Powered by www.kitware.com
Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html
Follow this link to subscribe/unsubscribe:
http://www.vtk.org/mailman/listinfo/vtk-developers
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic