[prev in list] [next in list] [prev in thread] [next in thread] 

List:       vtk-developers
Subject:    [vtk-developers] Clever git answer #3
From:       "Biddiscombe, John A." <biddisco () cscs ! ch>
Date:       2010-04-28 21:58:48
Message-ID: AB48A31C4EC97E498F4235B7CEF74A1915FE7EE6FF () MBX00 ! d ! ethz ! ch
[Download RAW message or body]

Enough of the git questions, misery, and submodule woe. Here's a helpful po=
st (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 mi=
rrors 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 whi=
ch 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 serv=
er names to ensure nobody commits to my public repos as I have no authentic=
ation yet
 ....I feel like after 3 days of reading every git wiki written, I now dese=
rve a git-fu beginner's badge for my jimmy-jams!

------
Initial steps, commands omitted for brevity, copying cvs diffs to pv was pa=
inful, 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 branc=
h, 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 br=
anch, 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 'Utiliti=
es/IceT'
Submodule 'Xdmf' (git://paraview.org/Xdmf.git) registered for path 'Utiliti=
es/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/Xdmf=
2
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, a=
nd 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 'Utiliti=
es/IceT'
Submodule 'Utilities/Xdmf2' (git:// horus.cscs.ch/pv-Xdmf.git) registered f=
or path 'Utilities/Xdmf2'
Submodule 'VTK' (git:// horus.cscs.ch/pv-VTK.git) registered for path 'VTK'
git submodule update

ta-daaa!!!


[Attachment #3 (text/html)]

<html xmlns:v="urn:schemas-microsoft-com:vml" \
xmlns:o="urn:schemas-microsoft-com:office:office" \
xmlns:w="urn:schemas-microsoft-com:office:word" \
xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" \
xmlns="http://www.w3.org/TR/REC-html40">

<head>
<meta http-equiv=Content-Type content="text/html; charset=us-ascii">
<meta name=Generator content="Microsoft Word 12 (filtered medium)">
<style>
<!--
 /* Font Definitions */
 @font-face
	{font-family:Calibri;
	panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
	{font-family:Consolas;
	panose-1:2 11 6 9 2 2 4 3 2 4;}
 /* Style Definitions */
 p.MsoNormal, li.MsoNormal, div.MsoNormal
	{margin:0cm;
	margin-bottom:.0001pt;
	font-size:11.0pt;
	font-family:"Calibri","sans-serif";}
a:link, span.MsoHyperlink
	{mso-style-priority:99;
	color:blue;
	text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
	{mso-style-priority:99;
	color:purple;
	text-decoration:underline;}
p.MsoPlainText, li.MsoPlainText, div.MsoPlainText
	{mso-style-priority:99;
	mso-style-link:"Plain Text Char";
	margin:0cm;
	margin-bottom:.0001pt;
	font-size:10.5pt;
	font-family:Consolas;}
span.PlainTextChar
	{mso-style-name:"Plain Text Char";
	mso-style-priority:99;
	mso-style-link:"Plain Text";
	font-family:Consolas;}
.MsoChpDefault
	{mso-style-type:export-only;}
@page Section1
	{size:612.0pt 792.0pt;
	margin:72.0pt 72.0pt 72.0pt 72.0pt;}
div.Section1
	{page:Section1;}
-->
</style>
<!--[if gte mso 9]><xml>
 <o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
 <o:shapelayout v:ext="edit">
  <o:idmap v:ext="edit" data="1" />
 </o:shapelayout></xml><![endif]-->
</head>

<body lang=EN-GB link=blue vlink=purple>

<div class=Section1>

<p class=MsoNormal><span lang=EN-US>Enough of the git questions, misery, and
submodule woe. Here&#8217;s a helpful post (I hope) for how to do the
following.<o:p></o:p></span></p>

<p class=MsoNormal><span lang=EN-US><o:p>&nbsp;</o:p></span></p>

<p class=MsoNormal><span lang=EN-US>pv-meshless is an svn repo, with heavily
modified versions of paraview core, Xdmf sub module and VTK submodule. I&#8217;d
like a paraview git clone which mirrors my original pv-meshless stuff (though \
I&#8217;m trying gradually to get rid of pv-meshless and move all functionality into
plugins).<o:p></o:p></span></p>

<p class=MsoNormal><span lang=EN-US><o:p>&nbsp;</o:p></span></p>

<p class=MsoNormal><span lang=EN-US>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.<o:p></o:p></span></p>

<p class=MsoNormal><span lang=EN-US><o:p>&nbsp;</o:p></span></p>

<p class=MsoNormal><span lang=EN-US>Here&#8217;s my Howto &#8211; apologies if
any steps have typos in them &#8211; I edited server names to ensure nobody
commits to my public repos as I have no authentication yet<o:p></o:p></span></p>

<p class=MsoNormal><span lang=EN-US>&nbsp;&#8230;.I feel like after 3 days of
reading every git wiki written, I now deserve a git-fu beginner&#8217;s badge
for my jimmy-jams!<o:p></o:p></span></p>

<p class=MsoNormal><span lang=EN-US><o:p>&nbsp;</o:p></span></p>

<p class=MsoNormal><span lang=EN-US>------<o:p></o:p></span></p>

<p class=MsoNormal><span lang=EN-US>Initial steps, commands omitted for
brevity, copying cvs diffs to pv was painful, but not so bad.<o:p></o:p></span></p>

<p class=MsoNormal><span lang=EN-US><o:p>&nbsp;</o:p></span></p>

<p class=MsoNormal><span lang=EN-US style='font-family:"Courier New"'>clone VTK
repo, commit all diffs from pv-meshless&nbsp; VTK onto cscs-pv branch, using
the commit SHA from the last CVS version<o:p></o:p></span></p>

<p class=MsoNormal><span lang=EN-US style='font-family:"Courier New"'>publish
pv-VTK repo on own git server setup at CSCS<o:p></o:p></span></p>

<p class=MsoNormal><span lang=EN-US style='font-family:"Courier \
New"'><o:p>&nbsp;</o:p></span></p>

<p class=MsoNormal><span lang=EN-US style='font-family:"Courier New"'>clone
Xdmf repo, commit all diffs from pv-meshless&nbsp; Xdmf onto cscs-pv branch,
using the commit SHA from the last CVS version<o:p></o:p></span></p>

<p class=MsoNormal><span lang=EN-US style='font-family:"Courier New"'>publish
pv-Xdmf repo on own git server setup at CSCS<o:p></o:p></span></p>

<p class=MsoNormal><span lang=EN-US style='font-family:"Courier \
New"'><o:p>&nbsp;</o:p></span></p>

<p class=MsoNormal><span lang=EN-US style='font-family:"Courier New"'>clone
ParaView repo, commit all diffs from pv-meshless main onto cscs-pv branch,
using the commit SHA from the last CVS version<o:p></o:p></span></p>

<p class=MsoNormal><span lang=EN-US style='font-family:"Courier New"'>publish
ParaView repo on own git server setup at CSCS<o:p></o:p></span></p>

<p class=MsoNormal><span lang=EN-US><o:p>&nbsp;</o:p></span></p>

<p class=MsoNormal><span lang=EN-US>Now replace the submodules in ParaView on
CSCS server in cscs-pv branch so that they load from CSCS server instead of
kitware.<o:p></o:p></span></p>

<p class=MsoNormal><span lang=EN-US><o:p>&nbsp;</o:p></span></p>

<p class=MsoNormal><span lang=EN-US style='font-size:9.0pt;font-family:"Courier \
New"'>git submodule init<o:p></o:p></span></p>

<p class=MsoNormal style='margin-left:36.0pt'><span lang=EN-US
style='font-size:8.0pt;font-family:"Courier New"'>Submodule 'IceT'
(git://paraview.org/IceT.git) registered for path \
'Utilities/IceT'<o:p></o:p></span></p>

<p class=MsoNormal style='margin-left:36.0pt'><span lang=EN-US
style='font-size:8.0pt;font-family:"Courier New"'>Submodule 'Xdmf'
(git://paraview.org/Xdmf.git) registered for path \
'Utilities/Xdmf2'<o:p></o:p></span></p>

<p class=MsoNormal style='margin-left:36.0pt'><span lang=EN-US
style='font-size:8.0pt;font-family:"Courier New"'>Submodule 'VTK'
(git://vtk.org/VTK.git) registered for path 'VTK'<o:p></o:p></span></p>

<p class=MsoNormal><span lang=EN-US style='font-size:9.0pt;font-family:"Courier \
                New"'>vi
.git/config<o:p></o:p></span></p>

<p class=MsoNormal style='margin-left:36.0pt'><span lang=EN-US
style='font-size:8.0pt;font-family:"Courier New"'>delete all lines about VTK
and Xdmf<o:p></o:p></span></p>

<p class=MsoNormal><span lang=EN-US style='font-size:9.0pt;font-family:"Courier \
                New"'>vi
.gitmodules<o:p></o:p></span></p>

<p class=MsoNormal style='margin-left:36.0pt'><span lang=EN-US
style='font-size:8.0pt;font-family:"Courier New"'>delete all lines about VTK
and Xdmf<o:p></o:p></span></p>

<p class=MsoNormal><span lang=EN-US style='font-size:9.0pt;font-family:"Courier \
New"'>git rm --cached VTK<o:p></o:p></span></p>

<p class=MsoNormal><span lang=EN-US style='font-size:9.0pt;font-family:"Courier \
New"'>git rm --cached Utilities/Xdmf2<o:p></o:p></span></p>

<p class=MsoNormal><span lang=EN-US style='font-size:9.0pt;font-family:"Courier \
New"'>git commit -a -m 'Remove submodules from Kitware'<o:p></o:p></span></p>

<p class=MsoNormal><span lang=EN-US style='font-size:9.0pt;font-family:"Courier \
                New"'>rm
-rf VTK<o:p></o:p></span></p>

<p class=MsoNormal><span lang=EN-US style='font-size:9.0pt;font-family:"Courier \
                New"'>rm
-rf Utilities/Xdmf2<o:p></o:p></span></p>

<p class=MsoNormal><span lang=EN-US style='font-size:9.0pt;font-family:"Courier \
New"'>git submodule add -b cscs-pv git://horus.cscs.ch/pv-VTK.git \
VTK<o:p></o:p></span></p>

<p class=MsoNormal><span lang=EN-US style='font-size:9.0pt;font-family:"Courier \
New"'>git commit -a -m 'Add CSCS version of VTK submodule'<o:p></o:p></span></p>

<p class=MsoNormal><span lang=EN-US style='font-size:9.0pt;font-family:"Courier \
New"'>git submodule add -b cscs-pv git://horus.cscs.ch/pv-Xdmf.git \
Utilities/Xdmf2<o:p></o:p></span></p>

<p class=MsoNormal><span lang=EN-US style='font-size:9.0pt;font-family:"Courier \
New"'>git commit -a -m 'Add CSCS version of Xdmf submodule'<o:p></o:p></span></p>

<p class=MsoNormal><span lang=EN-US style='font-size:9.0pt;font-family:"Courier \
New"'>git push<o:p></o:p></span></p>

<p class=MsoNormal><span lang=EN-US style='font-size:9.0pt;font-family:"Courier \
New"'><o:p>&nbsp;</o:p></span></p>

<p class=MsoNormal><span lang=EN-US>Now we do a clone of the CSCS ParaView repo,
checkout the cscs-pv branch, and hey-presto, all is well<o:p></o:p></span></p>

<p class=MsoNormal><span lang=EN-US style='font-size:9.0pt;font-family:"Courier \
New"'>git clone git://horus.cscs.ch/ParaView.git pv-cscs<o:p></o:p></span></p>

<p class=MsoNormal><span lang=EN-US style='font-size:9.0pt;font-family:"Courier \
New"'>cd pv-cscs<o:p></o:p></span></p>

<p class=MsoNormal><span lang=EN-US style='font-size:9.0pt;font-family:"Courier \
New"'>git checkout -b cscs-pv remotes/origin/cscs-pv<o:p></o:p></span></p>

<p class=MsoNormal><span lang=EN-US style='font-size:9.0pt;font-family:"Courier \
New"'>git submodule init<o:p></o:p></span></p>

<p class=MsoNormal style='margin-left:36.0pt'><span lang=EN-US
style='font-size:8.0pt;font-family:"Courier New"'>Submodule 'IceT'
(git://paraview.org/IceT.git) registered for path \
'Utilities/IceT'<o:p></o:p></span></p>

<p class=MsoNormal style='margin-left:36.0pt'><span lang=EN-US
style='font-size:8.0pt;font-family:"Courier New"'>Submodule 'Utilities/Xdmf2'
(git://</span><span lang=EN-US style='font-size:9.0pt;font-family:"Courier New"'>
</span><span lang=EN-US style='font-size:8.0pt;font-family:"Courier \
New"'>horus.cscs.ch/pv-Xdmf.git) registered for path \
'Utilities/Xdmf2'<o:p></o:p></span></p>

<p class=MsoNormal style='margin-left:36.0pt'><span lang=EN-US
style='font-size:8.0pt;font-family:"Courier New"'>Submodule 'VTK' (git://</span><span
lang=EN-US style='font-size:9.0pt;font-family:"Courier New"'> </span><span
lang=EN-US style='font-size:8.0pt;font-family:"Courier \
New"'>horus.cscs.ch/pv-VTK.git) registered for path 'VTK'<o:p></o:p></span></p>

<p class=MsoNormal><span lang=EN-US style='font-size:9.0pt;font-family:"Courier \
New"'>git submodule update<o:p></o:p></span></p>

<p class=MsoNormal><span lang=EN-US style='font-family:"Courier \
New"'><o:p>&nbsp;</o:p></span></p>

<p class=MsoNormal><span lang=EN-US style='font-family:"Courier \
New"'>ta-daaa!!!<o:p></o:p></span></p>

<p class=MsoNormal><o:p>&nbsp;</o:p></p>

</div>

</body>

</html>



_______________________________________________
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


--===============1151775787==--

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic