Monday, December 17, 2012

GDCM Git migration in

Migration of GDCM to new system did not work quite as I expected. I really like the shell based control I used to have.

So here is what I discover to copy/over the old setup to the new one:

Login to your shell space:
$ ssh -t malat, create
As 17/12/2012, the sf-help command is not really helpful since it only returns path to my old git directory:

% sf-help
Your project DSCM repositories are here (use adminrepo for CVS and SVN):

Anyway I discover this is right here:

$ cd /home/git/p/gdcm
The new system is not as flexible, you cannot easily create new directory:

[malat@shell-22006]/home/git/p/gdcm% touch bla.git
touch: cannot touch `bla.git': Permission denied
Instead you have to go back to the web interface, go 'Admin', then 'Tools', then click 'Git'. It will ask for a Label and a Mount Point, in my case I wanted Code/code to become Gdcm/gdcm. Fill accordingly to your project. Click ok.

Now if you go back to

$ cd /home/git/p/gdcm
You'll be pleasantly surprised... that nothing happened. Even if you log off, and log back in, no gdcm.git has been created...well technically yes. Simply type:

[malat@shell-22006]/home/git/p/gdcm% shutdown
and then log back in:

$ ssh -t malat, create
$ cd /home/git/p/gdcm
And now, you can edit in place file as you want

[malat@shell-22006]/home/git/p/gdcm% echo "super" > gdcm.git/description 
Now all is left to do is copy code.git over to gdcm.git:

$ git clone --mirror git://
$ cd code.git
$ git push --mirror --all ssh://
You can even use diff to your old rep:

[malat@shell-22006]/home/git/p/gdcm% diff -ru gdcm.git /home/scm_git/g/gd/gdcm/gdcm
Of course, when you are done, go back to Allura web interface, go to Admin/Tools and select select Git/Code and click 'Delete'.
Hope this help !

Update: Only after struggling with this did I discover the path was actually documented here:

No comments: