TDScriptLeafNode{#name:'postUpgradeSortedCollectionSortBlocks',#contents:'[ :topez :objIn :tokens :command :commandNode | 
  | opts args |
  \"for help: ./postUpgradeSortedCollectionSortBlocks -h\"
  command
    getOptsMixedLongShort:
      {#(\'help\' $h #\'none\').
      #(\'sourceVersion\' nil #\'required\')}
    optionsAndArguments: [ :options :operands | 
      opts := options.
      args := operands ].
  opts
    at: \'help\'
    ifAbsent: [ 
      | gsTool sourceStoneVersion currentStoneVersion report userId scInstances result |
      gsTool := topez toolInstanceFor: \'gs\'.
      currentStoneVersion := ((gsTool gsversion: #\'stone\') at: \'gsVersion\')
        asMetacelloVersionNumber.
      opts
        at: \'sourceVersion\'
        ifPresent: [ :sourceVersionString | sourceStoneVersion := sourceVersionString asMetacelloVersionNumber ]
        ifAbsent: [ nil error: \'Required option --sourceVersion not present\' ].
      userId := GsCurrentSession currentSession userProfile userId.
      Transcript
        cr;
        show: \'Recompiling Sort Blocks using \' , command command printString;
        cr;
        show: \'-----------------------\';
        cr;
        show: \'Finding sorted collections...\'.
      System commit.
      result := SortedCollection findAllSortedCollectionsForUser: userId.
      SortedCollection initializeForConversion.
      (SortedCollection respondsTo: #\'_loadHiddenSet:\')
        ifTrue: [ 
          scInstances := SortedCollection _loadHiddenSet: 41.
          Transcript
            cr;
            show:
                \'Recompiling sort blocks for \' , scInstances printString
                    , \' sorted collections...\'.
          System hiddenSetReinit: 41 ].
      report := (SortedCollection
        respondsTo: #\'convertInstancesFromFilesForGem:of:\')
        ifTrue: [ SortedCollection convertInstancesFromFilesForGem: 1 of: 1 ]
        ifFalse: [ 
          | filename |
          \"3.1.x\"
          Transcript
            cr;
            show:
                \'Recompiling sort blocks for \' , result printString , \' sorted collections...\'.
          filename := \'$upgradeLogDir/AllSortedCollections.bms\'.
          SortedCollection convertInstancesFromFile: filename forGem: 1 of: 1 ].
      Transcript
        cr;
        show: report.
      SortedCollection writeTotalsFiles.
      SortedCollection createConversionResultFileForTotalGems: 1.
      report ]
    ifPresent: [ :ignored | 
      TDManPage
        viewManPage:
          \'NAME
  postUpgradeSortedCollectionSortBlocks - Post-upgrade recompile sortBlocks for SortedCollections
SYNOPSIS
  postUpgradeSortedCollectionSortBlocks [-h|--help] --sourceVersion=<source-gemstone-version>

DESCRIPTION
  Recompile sortBlocks for SortedCollections.

  The environment variable $upgradeLogDir is expected to be set -- normally set by 
  $GS_HOME/bin/upgradeStone.

EXAMPLES
  ./postUpgradeSortedCollectionSortBlocks -h

  ./postUpgradeSortedCollectionSortBlocks --sourceVersion=3.2.9 
\'
        topez: topez ] ]',#creationTime:DateAndTime['2016-05-23T10:31:54.3779799938201-07:00'],#modificationTime:DateAndTime['2016-06-07T14:53:13.51614189147949-07:00']}