The Insight subdirectory contains a portion of the Insight project from vtk.org


The VolView-ITK-upstream branch in the Insight subdirectory contains the latest
version of Insight that has been copied into VolView.  Sticky tags on the
branch mark versions that have been merged into the VolView trunk.

MOST RECENTLY MERGED TAG: VolView-ITK-upstream-ITK-3-2
PREVIOUSLY MERGED TAG: VolView-ITK-2006-09-07

See below for instructions to upgrade the Insight version.
IT IS STRONGLY RECOMMENDED TO DO SO FROM A UNIX BOX.

------------------------------------------------------------------------------
In order to upgrade the Insight version contained follow the steps below.
Make sure other developers know to not change the VolViewExternalLibraries/Insight
directory during this process.

1.) Create a checkout of VolView and make sure there are no modified
    files.

2.) Switch your checkout to the "VolView-ITK-upstream" branch:

  cd /path/to/VolViewExternalLibraries/Insight
  cvs update -dAP -r VolView-ITK-upstream

3.) Export the desired Insight version in another directory. Use the -kv option
    to substitute CVS keywords in Insight sources with the Insight repository
    value. Replace VolVIewExternalLib with whatever ITK version or date
    you want to upgrade to.

  cd /path/to/upstream
  cvs -d :pserver:anoncvs@www.itk.org:/cvsroot/Insight export -kv -r VolViewExternalLib Insight

4.) Copy the source to Insight subdirectory in VolViewExternalLibraries/Insight

  cd /path/to/VolViewExternalLibraries/Insight
  cp -R /path/to/upstream/Insight/* .

5.) Use diff to make sure the directories are the same.  If there are
    any files reported as "Only in ./something" they should be removed
    with "rm ./something" followed by "cvs rm ./something".

  cd /path/to/VolViewExternalLibraries/Insight
  diff -r -x CVS . /path/to/upstream/Insight

6.) Use "cvs -nq update" to identify files and directories that have
    been added.  Use "cvs add" to prepare all the
    changes for checkin. *Re-iterate* until there is no more files to add.
    WATCH OUT FOR BINARY FILES (cvs add -kb), *see* Notes at bottom
    For reference grep -v -e '\.\(tcl\|cxx\|cmake\|h\|in\|py\|txt\|c\|f\|i\|java\|txx\|swg\|P\|NoDartCoverage\|notwrapped\|rc\|def\)$' | grep -v README

6.1) Re-iterate over 5)

7.) Commit the changes to the VolView-ITK-upstream branch.

  cd /path/to/VolViewExternalLibraries/Insight
  cvs commit -m "ENH: Updating VolView-ITK-upstream branch to 2006-09-07 Insight version."

8.) Create a sticky tag on the branch to mark the Insight upstream version:

  cd /path/to/VolViewExternalLibraries/Insight
  cvs tag VolView-ITK-2006-09-07

9.) Move your checkout back to the trunk of VolView:

  cd /path/to/VolViewExternalLibraries/Insight
  cvs update -dAP

10.) Create a sticky tag on the trunk to mark the state before the Insight
     upgrade.  Note this tag should appear on the entire VolView and
     VolViewExternalLibraries tree:

  cd /path/to/VolViewLibraries
  cvs tag VolView-ITK-2006-09-07-merge-pre

  cd /path/to/VolViewApplications
  cvs tag VolView-ITK-2006-09-07-merge-pre

  cd /path/to/VolViewExternalLibraries
  cvs tag VolView-ITK-2006-09-07-merge-pre

11.) Merge changes from the VolView-ITK-upstream branch from between the last
     merge and the new version.  In this example the previous merge
     pulled changes up through the VolView-ITK-2006-09-06 tag onto the trunk.
     Our new tag is VolView-ITK-2006-09-07.  See the top of this file
     or the cvs log of VolViewExternalLibraries/Insight/Common/vtkVersion.cxx to identify
     the most recent version that has been merged.

  cd /path/to/VolViewExternalLibraries/Insight
  cvs update -d -j VolView-ITK-2006-09-06 -j VolView-ITK-2006-09-07
  (-d is for subdirectories)

12.) Manually resolve conflicts and test building VolView.  THIS STEP CONTAINS
     THE MAJORITY OF THE WORK IN MANUALLY EDITING Insight SOURCES FOR VolView.
     Once everything builds and the tests pass it is safe to move on.

13.) Commit all changes to the entire VolView tree:

  cd /path/to/VolViewLibraries
  cvs commit -m "ENH: Merging changes from VolView-ITK-2006-09-06 to VolView-ITK-2006-09-07"

  cd /path/to/VolViewApplications
  cvs commit -m "ENH: Merging changes from VolView-ITK-2006-09-06 to VolView-ITK-2006-09-07"

  cd /path/to/VolViewExternalLibraries
  cvs commit -m "ENH: Merging changes from VolView-ITK-2006-09-06 to VolView-ITK-2006-09-07"

14.) Create a sticky tag on the trunk to mark the state after the Insight
     upgrade.  Note this tag should appear on the entire VolView tree:

  cd /path/to/VolViewLibraries
  cvs tag VolView-ITK-2006-09-07-merge-post

  cd /path/to/VolViewApplications
  cvs tag VolView-ITK-2006-09-07-merge-post

  cd /path/to/VolViewExternalLibraries
  cvs tag VolView-ITK-2006-09-07-merge-post

15.) Watch the dashboard!

------------------------------------------------------------------------------
NOTES:
For ITK we retrieved a branch and the command line used for VTK did not work
you have to discard the output that containt the keyword Sticky

  cvs status -l | grep  "\-kb" -B 3 | grep revision  | grep -v Sticky > kb.list

then you can pipe the output of this file to the cvs admin -kb command to fix
the file that were not recognized as being binary:

  cat /path/to/kb.list | xargs cvs admin -kb 

The change will only appear on the server so you need to to cvs update your
local copy:

  cvs update -dPA

The command line to import the Insight project into VolView was:

  cvs -d :ext:malaterre@www.kitware.com:/cvsroot/VolView import \
    VolViewExternalLibraries/Insight ITK-upstream-vendortag ITK-upstream-releasetag

ITK-upstream-vendortag will be branch
ITK-upstream-releasetag will be a tag

