ParaView/Git: Difference between revisions

From KitwarePublic
Jump to navigationJump to search
(Replaced content with "The instructions previously available on this page have been superseded. See [https://gitlab.kitware.com/paraview/paraview/blob/master/Documentation/dev/git/README.md here].")
 
(32 intermediate revisions by 7 users not shown)
Line 1: Line 1:
__TOC__
The instructions previously available on this page have been supersededSee [https://gitlab.kitware.com/paraview/paraview/blob/master/Documentation/dev/git/README.md here].
 
ParaView version tracking and development is hosted by [http://git-scm.com Git].
 
=Official Repository=
 
One may browse the repository online using the [http://git.wiki.kernel.org/index.php/Gitweb Gitweb] interface at http://paraview.org/gitweb.
 
==Cloning==
 
The clone URLs for the repository are
 
git://paraview.org/ParaView.git
http://paraview.org/ParaView.git
 
The push URL for the repository is
 
git@paraview.org:ParaView.git
 
For ParaViewData the URLs are
 
git://paraview.org/ParaViewData.git
http://paraview.org/ParaViewData.git
git@paraview.org:ParaViewData.git
 
See the [[VTK/Git | VTK]] Git documentation for further details.
 
==Branches==
 
At the time of this writing the repository has the following branches:
 
* '''master''': Development (default)
* '''release''': Release preparation branch (prior to switching to a brancy workflow; may go away later)
* '''hooks''': Local commit hooks ([[VTK/Git#Hooks|place]] in .git/hooks)
 
Release branches converted from CVS have been artificially merged into master. Actual releases have tags named by the release version number.
 
==Submodules==
 
ParaView references a few other projects as ''submodules''They can be obtained using the [http://www.kernel.org/pub/software/scm/git/docs/git-submodule.html git submodule] command.
First use the 'init' subcommand to register the submodules:
 
$ git submodule init
 
This configures the submodules to fetch from their default URLs, such as <code>git://vtk.org/VTK.git</code> for VTK.
Next one may optionally configure a different URL, perhaps to use the http protocol:
 
$ git config submodule.VTK.url http://vtk.org/VTK.git
 
(and similarly for other submodules if necessary).
Finally, use the 'update' subcommand to get the submodules:
 
$ git submodule update
 
Whenever you update your work tree to some revision of ParaView then 'git status' may report that the submodule directories are modified.  This is because commands like 'git checkout' do not automatically update submodules.  Use 'git submodule update' at any time to ensure that the submodule directories are updated to the versions referenced by the parent project.
 
===VTK===
 
ParaView references VTK as a ''submodule'' called '<code>VTK</code>'.
Repository URLs:
 
git://vtk.org/VTK.git
http://vtk.org/VTK.git
git@vtk.org:VTK.git
 
===IceT===
 
ParaView references IceT as a ''submodule'' called '<code>IceT</code>' at path '<code>Utilities/IceT</code>'.
Repository URLs:
 
git://paraview.org/IceT.git
http://paraview.org/IceT.git
git@paraview:IceT.git
git://public.kitware.com/IceT.git
http://public.kitware.com/IceT.git
git@public.kitware.com:IceT.git
 
===Xdmf===
 
ParaView references Xdmf as a ''submodule'' called '<code>Xdmf</code>' at path '<code>Utilities/Xdmf2</code>'.
Repository URLs:
 
git://paraview.org/Xdmf.git
http://paraview.org/Xdmf.git
git@paraview:Xdmf.git
git://public.kitware.com/Xdmf.git
http://public.kitware.com/Xdmf.git
git@public.kitware.com:Xdmf.git
 
=Submodules=
 
ParaView references the VTK repository as a ''submodule'' (and a few other projects too).
See the [http://www.kernel.org/pub/software/scm/git/docs/git-submodule.html git submodule] command documentation.
 
After the initial clone, Git does not tell you anything special about submodules by default:
 
$ git status
# On branch master
nothing to commit (working directory clean)
 
However, the Git submodule porcelain does:
 
$ git submodule status
-432f38d95bfa3c68d1345917680f4d2b4d1267c4 Utilities/IceT
-17f7aadc96a0a72c0f8f6e21cd37900db73b1b1f Utilities/Xdmf2
-3bc24abbd97b3d63574e1bafb91948a61033af34 VTK
 
This says that the currently checked out version of ParaView points to commit <code>3bc24abb</code> from VTK.
The "-" prefix means that the VTK submodule is ''not checked out'' in the current work tree.
We can confirm this by looking at the VTK directory:
 
$ ls -a VTK/
./ ../
 
Even though VTK is not there, the current version of ParaView knows what version of VTK it wants.
We can see this by using Git plumbing commands to list the content of the top-level tree:
 
$ git ls-tree HEAD | tail -3
040000 tree d46aa321e9971c38f484350a2d0495183a0cc517    Utilities
160000 commit 3bc24abbd97b3d63574e1bafb91948a61033af34  VTK
100644 blob 1cdb942f9a8c9e13a1e3da52b6fdbe522626981a    vtkPVConfig.h.in
 
Note that the entry for "VTK" is not a blob or a tree...it's a commit!
The commit is not necessarily known to the ParaView/.git repository because it comes from VTK.
We can see the commit here: [http://vtk.org/gitweb?p=VTK.git;a=commitdiff;h=3bc24abb 3bc24abb]
 
In order to get VTK we need to ask Git to checkout the submodules:
 
$ git submodule init
Submodule 'IceT' (git://paraview.org/IceT.git) registered for path 'Utilities/IceT'
Submodule 'Xdmf' (git://paraview.org/Xdmf.git) registered for path 'Utilities/Xdmf2'
Submodule 'VTK' (git://vtk.org/VTK.git) registered for path 'VTK'
$ git submodule update
Initialized empty Git repository in /path/to/ParaView/Utilities/IceT/.git/
...
Submodule path 'Utilities/IceT': checked out '432f38d95bfa3c68d1345917680f4d2b4d1267c4'
Initialized empty Git repository in /path/to/ParaView/Utilities/Xdmf2/.git/
...
Submodule path 'Utilities/Xdmf2': checked out '17f7aadc96a0a72c0f8f6e21cd37900db73b1b1f'
Initialized empty Git repository in /path/to/ParaView/VTK/.git/
...
Submodule path 'VTK': checked out '3bc24abbd97b3d63574e1bafb91948a61033af34'
 
Now Git's submodule porcelain reports
 
$ git submodule status
  432f38d95bfa3c68d1345917680f4d2b4d1267c4 Utilities/IceT (432f38d)
  17f7aadc96a0a72c0f8f6e21cd37900db73b1b1f Utilities/Xdmf2 (17f7aad)
  3bc24abbd97b3d63574e1bafb91948a61033af34 VTK (v5.4.2-4340-g3bc24ab)
 
Note the leading space on each line.
This means that the submodule is checked out to the version that our current ParaView version references.
We can confirm this by looking in VTK:
 
$ cd VTK
VTK$ git rev-parse HEAD
3bc24abbd97b3d63574e1bafb91948a61033af34
 
Note that the VTK work tree is on a ''detached head'', meaning that its <code>HEAD</code> does not point at a branch but instead directly at a commit:
 
VTK$ cat .git/HEAD
3bc24abbd97b3d63574e1bafb91948a61033af34
VTK$ git status
# Not currently on any branch.
nothing to commit (working directory clean)
VTK$ git branch
* (no branch)
  master
 
This is because the submodule reference stored in ParaView (3bc24abb) does not refer to a branch of VTK, but the specific commit.

Latest revision as of 12:29, 20 March 2015

The instructions previously available on this page have been superseded. See here.