[vtk-developers] Clever git answer #3

Biddiscombe, John A. biddisco at cscs.ch
Wed Apr 28 17:58:48 EDT 2010


Enough of the git questions, misery, and submodule woe. Here's a helpful post (I hope) for how to do the following.

pv-meshless is an svn repo, with heavily modified versions of paraview core, Xdmf sub module and VTK submodule. I'd like a paraview git clone which mirrors my original pv-meshless stuff (though I'm trying gradually to get rid of pv-meshless and move all functionality into plugins).

What I would like is for a user to clone pv-meshless and get submodules which are my versions of Xdmf/VTK. My first attempts always tried to push the submodules back to Kitware and not to my own internal git servers.

Here's my Howto - apologies if any steps have typos in them - I edited server names to ensure nobody commits to my public repos as I have no authentication yet
 ....I feel like after 3 days of reading every git wiki written, I now deserve a git-fu beginner's badge for my jimmy-jams!

------
Initial steps, commands omitted for brevity, copying cvs diffs to pv was painful, but not so bad.

clone VTK repo, commit all diffs from pv-meshless  VTK onto cscs-pv branch, using the commit SHA from the last CVS version
publish pv-VTK repo on own git server setup at CSCS

clone Xdmf repo, commit all diffs from pv-meshless  Xdmf onto cscs-pv branch, using the commit SHA from the last CVS version
publish pv-Xdmf repo on own git server setup at CSCS

clone ParaView repo, commit all diffs from pv-meshless main onto cscs-pv branch, using the commit SHA from the last CVS version
publish ParaView repo on own git server setup at CSCS

Now replace the submodules in ParaView on CSCS server in cscs-pv branch so that they load from CSCS server instead of kitware.

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'
vi .git/config
delete all lines about VTK and Xdmf
vi .gitmodules
delete all lines about VTK and Xdmf
git rm --cached VTK
git rm --cached Utilities/Xdmf2
git commit -a -m 'Remove submodules from Kitware'
rm -rf VTK
rm -rf Utilities/Xdmf2
git submodule add -b cscs-pv git://horus.cscs.ch/pv-VTK.git VTK
git commit -a -m 'Add CSCS version of VTK submodule'
git submodule add -b cscs-pv git://horus.cscs.ch/pv-Xdmf.git Utilities/Xdmf2
git commit -a -m 'Add CSCS version of Xdmf submodule'
git push

Now we do a clone of the CSCS ParaView repo, checkout the cscs-pv branch, and hey-presto, all is well
git clone git://horus.cscs.ch/ParaView.git pv-cscs
cd pv-cscs
git checkout -b cscs-pv remotes/origin/cscs-pv
git submodule init
Submodule 'IceT' (git://paraview.org/IceT.git) registered for path 'Utilities/IceT'
Submodule 'Utilities/Xdmf2' (git:// horus.cscs.ch/pv-Xdmf.git) registered for path 'Utilities/Xdmf2'
Submodule 'VTK' (git:// horus.cscs.ch/pv-VTK.git) registered for path 'VTK'
git submodule update

ta-daaa!!!

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/vtk-developers/attachments/20100428/ba6fa747/attachment.html>


More information about the vtk-developers mailing list