Showing posts with label ITK. Show all posts
Showing posts with label ITK. Show all posts

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