Showing posts with label git. Show all posts
Showing posts with label git. Show all posts

Monday, December 17, 2012

GDCM Git migration in sf.net

Migration of GDCM to new sf.net/allura 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,gdcm@shell.sf.net 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):
/home/scm_git/g/gd/gdcm

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,gdcm@shell.sf.net 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://git.code.sf.net/p/gdcm/code
$ cd code.git
$ git push --mirror --all ssh://malat@git.code.sf.net/p/gdcm/gdcm
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:

https://sourceforge.net/p/forge/documentation/Git/#accessing-the-repository-via-the-shell

Thursday, November 4, 2010

warning: unable to rmdir my/module: Directory not empty

I am getting a bizarre behavior with git:

#!/bin/sh

# master
cd /tmp
mkdir test
cd test
git init
touch README
git add README
git commit -mREADME

# submodule
cd ..
mkdir module
cd module
git init
touch MODULE
git add MODULE
git commit -mMODULE

cd ../test
git submodule add file:///tmp/module my/module
git commit -a -m"adding submodule"

# empty branch
git symbolic-ref HEAD refs/heads/newbranch
rm .git/index
git clean -fdx
touch EMPTY
git add EMPTY
git commit -a -mEMPTY

# update
git checkout master
git submodule init
git submodule update
git checkout newbranch

Wednesday, September 15, 2010

svn-all-fast-export

svn-all-fast-export --identity-map ../authors.txt --rules ../config /home/mathieu/tmp/git/svneverever/gdcm


$ git branch -a ~/tmp/git/svneverever/dummy/gdcm
gdcm-2-0
gdcm-2-0-10
gdcm-2-0-11
gdcm-2-0-12
gdcm-2-0-13
gdcm-2-0-14
gdcm-2-0-15
gdcm-2-0-16
* master

* http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=596937

svn2git

/var/lib/gems/1.8/bin/svn2git http://gdcm.svn.sourceforge.net/svnroot/gdcm/ --exclude Sandbox --exclude documentation

$ git tag -l ~/tmp/git/migrate
gdcm-2-0-10
gdcm-2-0-11
gdcm-2-0-12
gdcm-2-0-13
gdcm-2-0-14
gdcm-2-0-15
gdcm-2-0-16
gdcm-2-0-4
gdcm-2-0-5
gdcm-2-0-6
gdcm-2-0-7
gdcm-2-0-8
gdcm-2-0-9

$ git branch -a ~/tmp/git/migrate
gdcm-2-0
* master
trunk@1097
remotes/gdcm-2-0
remotes/trunk
remotes/trunk@1097

Thursday, September 9, 2010

Shared Folder in VirtualBox and git

I think this is a bad idea, the file do not seems to be stored the same way...

$ git status
# On branch nightly-master
# Changed but not updated:
# (use "git add ..." to update what will be committed)
# (use "git checkout -- ..." to discard changes in working directory)
#
# modified: CMake/pre-commit
# modified: Code/Numerics/cvsrmvend
# modified: Documentation/cvspasswd.exe
# modified: Examples/SearchScript.sh
# modified: Testing/Code/install_test.sh.in
# modified: Utilities/Dart/AllowContinuous.sh.in
# modified: Utilities/Dart/BuildContinuous.sh.in
# modified: Utilities/Dart/BuildContinuousWithCTest.sh.in
# modified: Utilities/Dart/ChangedSince.csh.in
# modified: Utilities/Dart/NewSince.csh.in
# modified: Utilities/Dart/PreventContinuous.sh.in
# modified: Utilities/Doxygen/cvsVersionFilter.sh
# modified: Utilities/Doxygen/vxl_doxy.pl
# modified: Utilities/KWStyle/doAllStyle.csh.in
# modified: Utilities/gdcm/Source/DataDictionary/ParseDicts.py
# modified: Utilities/gdcm/Source/DataDictionary/txt2xml.py
# modified: Utilities/gdcm/Source/InformationObjectDefinition/ParseAttributes.py
# modified: Utilities/gdcm/Wrapping/Csharp/doxy2swig.py
# modified: Utilities/gdcm/Wrapping/Python/TestWrap.py
# modified: Utilities/gdcm/Wrapping/Python/doxy2swig.py
# modified: Utilities/itktiff/dist/newalpha
# modified: Utilities/itktiff/dist/newversion
# modified: Utilities/kwsys/kwsysDateStamp.py
# modified: Utilities/kwsys/kwsysHeaderDump.pl
# modified: Utilities/nifti/Testing/nifti_regress_test/@show.diffs
# modified: Utilities/nifti/Testing/nifti_regress_test/@test
# modified: Utilities/nifti/Testing/nifti_regress_test/cmake_testscripts/comment_test.sh
# modified: Utilities/nifti/Testing/nifti_regress_test/cmake_testscripts/dci_test.sh
# modified: Utilities/nifti/Testing/nifti_regress_test/cmake_testscripts/dsets_test.sh
# modified: Utilities/nifti/Testing/nifti_regress_test/cmake_testscripts/dts_test.sh
# modified: Utilities/nifti/Testing/nifti_regress_test/cmake_testscripts/fetch_data_test.sh
# modified: Utilities/nifti/Testing/nifti_regress_test/cmake_testscripts/mod_header_test.sh
# modified: Utilities/nifti/Testing/nifti_regress_test/cmake_testscripts/newfiles_test.sh
# modified: Utilities/nifti/Testing/nifti_regress_test/commands/c06.add.ext
# modified: Utilities/nifti/fsliolib/imcp
# modified: Utilities/nifti/fsliolib/imglob
# modified: Utilities/nifti/fsliolib/imln
# modified: Utilities/nifti/fsliolib/immv
# modified: Utilities/nifti/fsliolib/imrm
# modified: Utilities/nifti/fsliolib/imtest
# modified: Utilities/nifti/fsliolib/remove_ext
# modified: Utilities/vxl/config/cmake/DSPTemplates/mex/configure
# modified: Utilities/vxl/config/cmake/DSPTemplates/mex/install-sh
# modified: Utilities/vxl/v3p/netlib/libf2c/comptry.bat
# modified: Utilities/vxl/v3p/netlib/libf2c/scomptry.bat
# modified: Utilities/vxl/vcl/generic/zap.pl
# modified: Utilities/vxl/vcl/iso/generate.sh
# modified: Validation/StatisticalClustering/Code/BrainWeb.experiment.sh
# modified: Validation/StatisticalClustering/Code/IBSR.experiment.sh
# modified: Wrapping/CSwig/BasicFiltersA/MakeConsistentWrappedClasses.sh
# modified: Wrapping/CSwig/Tcl/itkwish
# modified: Wrapping/CSwig/pythonfiles.sh.in
# modified: Wrapping/WrapITK/Python/Tests/extras.py
# modified: Wrapping/WrapITK/Python/Tests/filterCoverage.py
# modified: Wrapping/WrapITK/Python/Tests/findSegfaults.py
# modified: Wrapping/WrapITK/Python/Tests/getNameOfClass.py
# modified: Wrapping/WrapITK/Python/Tests/module2module.py
# modified: Wrapping/WrapITK/Python/Tests/simple_pipeline.py
# modified: Wrapping/WrapITK/Python/Tests/template.py
# modified: Wrapping/WrapITK/Python/Tests/typemaps.py
# modified: Wrapping/WrapITK/Tcl/itkwish.in
#
no changes added to commit (use "git add" and/or "git commit -a")

Tuesday, September 7, 2010

error: Untracked working tree file

$ git pull --rebase
First, rewinding head to replay your work on top of it...
error: Untracked working tree file 'Utilities/gdcm/Utilities/gdcmjpeg/Jfif.txt' would be overwritten by merge.
could not detach HEAD


git reset --hard
git reset --hard ORIG_HEAD
git reset --soft HEAD^
git reset --hard
git checkout -f master
git clean -n -d
git clean -d Utilities/gdcm/Source/InformationObjectDefinition/Part3.xml
git clean -f -d Utilities/gdcm/Source/InformationObjectDefinition/Part3.xml
git clean -f -d Utilities/gdcm/Source/MediaStorageAndFileFormat/TODO.txt
git clean -f -d Utilities/gdcm/TODO
git clean -f -d Utilities/gdcm/Utilities/gdcmjpeg/Jfif.txt
git clean -f -d Utilities/gdcm/Utilities/gdcmjpeg/install.doc
git clean -f -d Utilities/gdcm/Utilities/gdcmjpeg/libjpeg.doc
git clean -f -d Utilities/gdcm/Utilities/gdcmjpeg/usage.doc
git rebase --skip

Friday, August 27, 2010

integration-gdcm-2-0-16 pushed to master !

This is a big day today ! GDCM 2.x has been pushed to ITK, enjoy !

$ ssh git@itk.org stage ITK merge integration-gdcm-2-0-16
Fetching upstream master
Merge topic 'integration-gdcm-2-0-16'

448bcde Rename GDCMTargets to ITKTargets
5714c2f Handle case where zlib is the system one
b25d59f Make sure to include a C99 wrapper for MSVC compiler
92d15f9 trivial compilation fixes
4c73133 Make sure to use proper name mangling
4be1690 remove openjpeg version for now
3891f5f Need to define openjpeg version major
f2b6ec7 Need to export libs
8284318 updates so that things configure in cmake 2.8 on windows
b322034 Fix GDCM to handle older expat library.
0949e16 Final pass to make GDCM compile within ITK
99893f1 Remove any reference to GDCM 1.x, update to GDCM 2.x
f08de4d Backport cmakelist from previous ITK version
fdb6b18 Update JPEG library (IJG 8b release)
0f12009 Adding a patched GDCM 2.0.16 version
b5848c3 Remove old unsupported GDCM 1.2.x source

Removing Utilities/gdcm/.cvsignore
Removing Utilities/gdcm/CMake/gdcmTestFUNCTION.cxx
Removing Utilities/gdcm/ChangeLog
Removing Utilities/gdcm/DEVELOPPER
Removing Utilities/gdcm/Dicts/.cvsignore
Removing Utilities/gdcm/Dicts/ACUSON.dic
Removing Utilities/gdcm/Dicts/CMakeLists.txt
Removing Utilities/gdcm/Dicts/DicomDir.dic
Removing Utilities/gdcm/Dicts/DictGroupName.dic
Removing Utilities/gdcm/Dicts/ELSCINT.dic
Removing Utilities/gdcm/Dicts/GE-EchoPAC.dic
Removing Utilities/gdcm/Dicts/GEMS-Advance.dic
Removing Utilities/gdcm/Dicts/GEMS-Advantx.dic
Removing Utilities/gdcm/Dicts/GEMS-CR.dic
Removing Utilities/gdcm/Dicts/GEMS-DLX.dic
Removing Utilities/gdcm/Dicts/GEMS-Genie.dic
Removing Utilities/gdcm/Dicts/GEMS-HiSpeed.dic
Removing Utilities/gdcm/Dicts/GEMS-Infinia.dic
Removing Utilities/gdcm/Dicts/GEMS.dic
Removing Utilities/gdcm/Dicts/HITACHI-MR-pronto.dic
Removing Utilities/gdcm/Dicts/PHILIPS-EasyVision.dic
Removing Utilities/gdcm/Dicts/PHILIPS-Intera.dic
Removing Utilities/gdcm/Dicts/Papyrus.dic
Removing Utilities/gdcm/Dicts/ParseDict.py
Removing Utilities/gdcm/Dicts/README
Removing Utilities/gdcm/Dicts/SIEMENS-syngo.dic
Removing Utilities/gdcm/Dicts/SIEMENS.dic
Removing Utilities/gdcm/Dicts/SPI.dic
Removing Utilities/gdcm/Dicts/dicomAttributeTypes.dic
Removing Utilities/gdcm/Dicts/dicomGroupNameAbbreviations.dic
Removing Utilities/gdcm/Dicts/dicomTS.dic
Removing Utilities/gdcm/Dicts/dicomV3PhilipsIntera.dic
Removing Utilities/gdcm/Dicts/dicomVR.dic
Removing Utilities/gdcm/Dicts/gdcm.dic.in
Removing Utilities/gdcm/INSTALL
Removing Utilities/gdcm/README
Removing Utilities/gdcm/README.ITK.txt
Removing Utilities/gdcm/gdcm.spec.in
Removing Utilities/gdcm/gdcmConfigure.h.in
Removing Utilities/gdcm/src/.cvsignore
Removing Utilities/gdcm/src/CMakeLists.txt
Removing Utilities/gdcm/src/gdcm.h
Removing Utilities/gdcm/src/gdcmArgMgr.cxx
Removing Utilities/gdcm/src/gdcmArgMgr.h
Removing Utilities/gdcm/src/gdcmBase.cxx
Removing Utilities/gdcm/src/gdcmBase.h
Removing Utilities/gdcm/src/gdcmBinEntry.cxx
Removing Utilities/gdcm/src/gdcmBinEntry.h
Removing Utilities/gdcm/src/gdcmCommon.h
Removing Utilities/gdcm/src/gdcmContentEntry.cxx
Removing Utilities/gdcm/src/gdcmContentEntry.h
Removing Utilities/gdcm/src/gdcmDebug.cxx
Removing Utilities/gdcm/src/gdcmDebug.h
Removing Utilities/gdcm/src/gdcmDefaultDicts.cxx.in
Removing Utilities/gdcm/src/gdcmDicomDir.cxx
Removing Utilities/gdcm/src/gdcmDicomDir.h
Removing Utilities/gdcm/src/gdcmDicomDirElement.cxx
Removing Utilities/gdcm/src/gdcmDicomDirElement.h
Removing Utilities/gdcm/src/gdcmDicomDirImage.cxx
Removing Utilities/gdcm/src/gdcmDicomDirImage.h
Removing Utilities/gdcm/src/gdcmDicomDirMeta.cxx
Removing Utilities/gdcm/src/gdcmDicomDirMeta.h
Removing Utilities/gdcm/src/gdcmDicomDirObject.cxx
Removing Utilities/gdcm/src/gdcmDicomDirObject.h
Removing Utilities/gdcm/src/gdcmDicomDirPatient.cxx
Removing Utilities/gdcm/src/gdcmDicomDirPatient.h
Removing Utilities/gdcm/src/gdcmDicomDirSerie.cxx
Removing Utilities/gdcm/src/gdcmDicomDirSerie.h
Removing Utilities/gdcm/src/gdcmDicomDirStudy.cxx
Removing Utilities/gdcm/src/gdcmDicomDirStudy.h
Removing Utilities/gdcm/src/gdcmDicomDirVisit.cxx
Removing Utilities/gdcm/src/gdcmDicomDirVisit.h
Removing Utilities/gdcm/src/gdcmDict.cxx
Removing Utilities/gdcm/src/gdcmDict.h
Removing Utilities/gdcm/src/gdcmDictEntry.cxx
Removing Utilities/gdcm/src/gdcmDictEntry.h
Removing Utilities/gdcm/src/gdcmDictGroupName.cxx
Removing Utilities/gdcm/src/gdcmDictGroupName.h
Removing Utilities/gdcm/src/gdcmDictSet.cxx
Removing Utilities/gdcm/src/gdcmDictSet.h
Removing Utilities/gdcm/src/gdcmDirList.cxx
Removing Utilities/gdcm/src/gdcmDirList.h
Removing Utilities/gdcm/src/gdcmDocEntry.cxx
Removing Utilities/gdcm/src/gdcmDocEntry.h
Removing Utilities/gdcm/src/gdcmDocEntryArchive.cxx
Removing Utilities/gdcm/src/gdcmDocEntryArchive.h
Removing Utilities/gdcm/src/gdcmDocEntrySet.cxx
Removing Utilities/gdcm/src/gdcmDocEntrySet.h
Removing Utilities/gdcm/src/gdcmDocument.cxx
Removing Utilities/gdcm/src/gdcmDocument.h
Removing Utilities/gdcm/src/gdcmElementSet.cxx
Removing Utilities/gdcm/src/gdcmElementSet.h
Removing Utilities/gdcm/src/gdcmException.cxx
Removing Utilities/gdcm/src/gdcmException.h
Removing Utilities/gdcm/src/gdcmFile.cxx
Removing Utilities/gdcm/src/gdcmFile.h
Removing Utilities/gdcm/src/gdcmFileHelper.cxx
Removing Utilities/gdcm/src/gdcmFileHelper.h
Removing Utilities/gdcm/src/gdcmGlobal.cxx
Removing Utilities/gdcm/src/gdcmGlobal.h
Removing Utilities/gdcm/src/gdcmJPEGFragment.cxx
Removing Utilities/gdcm/src/gdcmJPEGFragment.h
Removing Utilities/gdcm/src/gdcmJPEGFragmentsInfo.cxx
Removing Utilities/gdcm/src/gdcmJPEGFragmentsInfo.h
Removing Utilities/gdcm/src/gdcmJpeg.cxx
Removing Utilities/gdcm/src/gdcmJpeg12.cxx
Removing Utilities/gdcm/src/gdcmJpeg16.cxx
Removing Utilities/gdcm/src/gdcmJpeg2000.cxx
Removing Utilities/gdcm/src/gdcmJpeg8.cxx
Removing Utilities/gdcm/src/gdcmJpegLS.cxx
Removing Utilities/gdcm/src/gdcmMpeg.cxx
Removing Utilities/gdcm/src/gdcmOrientation.cxx
Removing Utilities/gdcm/src/gdcmOrientation.h
Removing Utilities/gdcm/src/gdcmPixelReadConvert.cxx
Removing Utilities/gdcm/src/gdcmPixelReadConvert.h
Removing Utilities/gdcm/src/gdcmPixelWriteConvert.cxx
Removing Utilities/gdcm/src/gdcmPixelWriteConvert.h
Removing Utilities/gdcm/src/gdcmRLEFrame.cxx
Removing Utilities/gdcm/src/gdcmRLEFrame.h
Removing Utilities/gdcm/src/gdcmRLEFramesInfo.cxx
Removing Utilities/gdcm/src/gdcmRLEFramesInfo.h
Removing Utilities/gdcm/src/gdcmSQItem.cxx
Removing Utilities/gdcm/src/gdcmSQItem.h
Removing Utilities/gdcm/src/gdcmSeqEntry.cxx
Removing Utilities/gdcm/src/gdcmSeqEntry.h
Removing Utilities/gdcm/src/gdcmSerieHelper.cxx
Removing Utilities/gdcm/src/gdcmSerieHelper.h
Removing Utilities/gdcm/src/gdcmTS.cxx
Removing Utilities/gdcm/src/gdcmTS.h
Removing Utilities/gdcm/src/gdcmUtil.cxx
Removing Utilities/gdcm/src/gdcmUtil.h
Removing Utilities/gdcm/src/gdcmVR.cxx
Removing Utilities/gdcm/src/gdcmVR.h
Removing Utilities/gdcm/src/gdcmValEntry.cxx
Removing Utilities/gdcm/src/gdcmValEntry.h
Removing Utilities/gdcm/src/gdcmValidator.cxx
Removing Utilities/gdcm/src/gdcmValidator.h
Removing Utilities/itkjpeg/12/CMakeLists.txt
Removing Utilities/itkjpeg/16/CMakeLists.txt
Removing Utilities/itkjpeg/8/CMakeLists.txt
Removing Utilities/itkjpeg/mangle_jpeg12bits.h
Removing Utilities/itkjpeg/mangle_jpeg16bits.h
Removing Utilities/itkjpeg/mangle_jpeg8bits.h
Pushing upstream master
To ../../ITK.git
Deleting fully merged topic 'integration-gdcm-2-0-16' (448bcde) from stage.

Integrating GDCM 2.x to ITK (the hard way)

Let's start from the begining:

$ git clone git://itk.org/ITK.git

install hooks and pushurl...

$ git checkout -b integration-gdcm-2-0-16

git status reval I now on branch integration-gdcm-2-0-16

HACK HACK
$ git commit
...

Now in order to share code with Mark Roden. I decided to push to my github account:

$ git remote add perso git@github.com:malaterre/ITK.git
$ git push perso integration-gdcm-2-0-16

After a couple of exchange the branch was properly compiling on Linux/Win32/MacOSX.
I was ready to push GDCM 2.x to ITK. As suggested by Brad Lowekamp I pushed to stage first:

$ git remote add stage git://itk.org/stage/ITK.git
$ git config remote.stage.pushurl git@itk.org:stage/ITK.git
$ git fetch stage --prune
$ git checkout integration-gdcm-2-0-16
$ git push stage HEAD

one can then print it:

$ ssh git@itk.org stage ITK print

I pushed it also to gerrit for review.

$ git log gerrit/master..
$ git push gerrit HEAD:refs/for/master/integration-gdcm-2-0-16

This lead to some discussion with Brad King.

$ git add CMake/ExportConfiguration/CMakeLists.txt CMakeLists.txt
$ git commit
$ git push gerrit d2ee19d:refs/changes/24
Counting objects: 14, done.
Delta compression using up to 16 threads.
Compressing objects: 100% (8/8), done.
Writing objects: 100% (8/8), 9.84 KiB, done.
Total 8 (delta 6), reused 0 (delta 0)
To malaterre@review.source.kitware.com:ITK
! [remote rejected] d2ee19d -> refs/changes/24 (squash commits first)
error: failed to push some refs to 'malaterre@review.source.kitware.com:ITK'

This was not quite right, I had to squash the last two commits:

$ git commit --amend
$ git push gerrit 1ddc92d:refs/changes/24
Counting objects: 14, done.
Delta compression using up to 16 threads.
Compressing objects: 100% (8/8), done.
Writing objects: 100% (8/8), 9.85 KiB, done.
Total 8 (delta 6), reused 0 (delta 0)
To malaterre@review.source.kitware.com:ITK
! [remote rejected] 1ddc92d -> refs/changes/24 (squash commits first)
error: failed to push some refs to 'malaterre@review.source.kitware.com:ITK'

Still not ! I need to actually edit the word 'pick' and change it to 'squash':

$ git rebase -i HEAD~2
$ git push gerrit 448bcde:refs/changes/24
Counting objects: 62, done.
Delta compression using up to 16 threads.
Compressing objects: 100% (35/35), done.
Writing objects: 100% (38/38), 21.88 KiB, done.
Total 38 (delta 25), reused 0 (delta 0)
To malaterre@review.source.kitware.com:ITK
* [new branch] 448bcde -> refs/changes/24

Now that the change are on gerrit, push them to stage too:

$ git push stage HEAD
To git@itk.org:stage/ITK.git
! [rejected] HEAD -> integration-gdcm-2-0-16 (non-fast-forward)
error: failed to push some refs to 'git@itk.org:stage/ITK.git'
To prevent you from losing history, non-fast-forward updates were rejected
Merge the remote changes before pushing again. See the 'Note about
fast-forwards' section of 'git push --help' for details.

Hum, something happen during the squash that made the push non-trivial on stage.

Meanwhile, let's push to my github account:

$ git push perso integration-gdcm-2-0-16

Thanks to Brad L., I tried it again:

$ git checkout integration-gdcm-2-0-16
$ git log master..
$ git push -f stage integration-gdcm-2-0-16
$ ssh git@itk.org stage ITK print
$ ssh git@itk.org stage ITK merge integration-gdcm-2-0-16

Finally all set ! Thanks to Brad K. and Brad L. !

References:
* http://www.itk.org/Wiki/ITK/Gerrit
* http://www.itk.org/Wiki/ITK/Git#Topic_Stage
* http://www.itk.org/Wiki/ITK/Git#Pushing

Friday, July 30, 2010

Still struggling with cmake/git

  cd CMake
  git checkout master
  git pull
  git checkout -b fix-issue-9611
  cp ~/tmp/cmake-2.8.2/Modules/FindJNI.cmake Modules/FindJNI.cmake
  git add --  Modules/FindJNI.cmake
  git commit -m"BUG: 0009611 Fix Arch independent FindJNI.cmake on Linux to support Sun Java, OpenJDK, Kaffe and GCJ paths. Based on patch from debian"
  git checkout -b next origin/next
  git checkout next
  git pull
  git merge  fix-issue-9611
  git push
Counting objects: 15, done.
Delta compression using up to 16 threads.
Compressing objects: 100% (8/8), done.
Writing objects: 100% (8/8), 1.58 KiB, done.
Total 8 (delta 6), reused 0 (delta 0)
----------------------------------------------------------------------
commit 6a3d7d46 has an invalid message:
  the first line must not be more than 78 characters
commit message is:
BUG: 0009611 Fix Arch independent FindJNI.cmake on Linux to support Sun Java, OpenJDK, Kaffe and GCJ paths. Based on patch from debian
----------------------------------------------------------------------
error: hook declined to update refs/heads/next
To git@cmake.org:cmake.git
 ! [remote rejected] next -> next (hook declined)
error: failed to push some refs to 'git@cmake.org:cmake.git'

Tuesday, June 15, 2010

git: New workflow for CMake

git clone git://cmake.org/cmake.git CMake
cd CMake
git checkout master
git checkout -b finddcmtk
cp ~/Perso/gdcm/trunk/CMake/FindDCMTK.cmake Modules
git add -- Modules/FindDCMTK.cmake
git commit -m"Cleanup FindDCMTK (using foreach). Fix linking on win32 static libs."
git checkout -b next origin/next
git checkout next
git pull
git merge finddcmtk
git config remote.origin.pushurl git@cmake.org:cmake.git
git push

watchout that commit message should be single-lined:

$ git push -v
Pushing to git@cmake.org:cmake.git
Counting objects: 15, done.
Delta compression using up to 16 threads.
Compressing objects: 100% (8/8), done.
Writing objects: 100% (8/8), 2.19 KiB, done.
Total 8 (delta 5), reused 0 (delta 0)
------------------------------------------------------------------------------
commit 7cc81454 has an invalid message:
the second line must be empty (if it exists)
commit message is:
Adding simplified version of DCMTK.
Fix linking on win32 static build
------------------------------------------------------------------------------
error: hook declined to update refs/heads/next
To git@cmake.org:cmake.git
! [remote rejected] next -> next (hook declined)
error: failed to push some refs to 'git@cmake.org:cmake.git'

References:
* http://public.kitware.com/Wiki/Git/Workflow/Topic
* http://www.cmake.org/Wiki/CMake/Git
* http://cmake.org/gitweb?p=cmake.git;a=tree