home *** CD-ROM | disk | FTP | other *** search
/ PC World 1997 November / PCWorld_1997-11_cd.bin / software / programy / komix / DATA.Z / cccommand.tcl < prev    next >
Text File  |  1997-06-06  |  20KB  |  714 lines

  1. #---------------------------------------------------------------------------
  2. #
  3. #      (c)     Cayenne Software Inc.    1997
  4. #
  5. #      File:           @(#)cccommand.tcl    /main/hindenburg/9
  6. #      Author:         <generated>
  7. #      Description:
  8. #---------------------------------------------------------------------------
  9. # SccsId = @(#)cccommand.tcl    /main/hindenburg/9   6 Jun 1997 Copyright 1997 Cayenne Software Inc.
  10.  
  11. # Start user added include file section
  12. require procs.tcl
  13. # End user added include file section
  14.  
  15. require_module_file "vscommand.tcl" vcm
  16.  
  17. # This class knows everything about ClearCase commands.
  18.  
  19. Class CCCommand : {VSCommand} {
  20.     method destructor
  21.     constructor
  22.     method classifyOutput
  23.     method execute
  24. }
  25.  
  26.  
  27. # The name of the cleartool command.
  28. #
  29. global CCCommand::cleartoolCommand
  30. set CCCommand::cleartoolCommand "cleartool"
  31.  
  32.  
  33. # This contains the cleartool path, it is set
  34. # during system initialization and only used on Windows.
  35. #
  36. global CCCommand::cleartoolPath
  37. set CCCommand::cleartoolPath ""
  38.  
  39.  
  40. method CCCommand::destructor {this} {
  41.     # Start destructor user section
  42.     # End destructor user section
  43.     $this VSCommand::destructor
  44. }
  45.  
  46. constructor CCCommand {class this command path description} {
  47.     set this [VSCommand::constructor $class $this $command $description]
  48.     # Start constructor user section
  49.     global CCCommand::cleartoolCommand
  50.     if { $path != "" } {
  51.     set command "$command [quoteIf $path]"
  52.     }
  53.     $this command "${CCCommand::cleartoolCommand} $command"
  54.     # End constructor user section
  55.     return $this
  56. }
  57.  
  58.  
  59. # Get a command to chheck out a ClearCase object.
  60. #
  61. proc CCCommand::checkOut {path comment reserved} {
  62.     set command "co -c \"$comment\""
  63.     if { !$reserved } {
  64.     set command "$command -unreserve"
  65.     }
  66.     return [CCCommand new "$command" "$path" "Checkout $path"]
  67. }
  68.  
  69.  
  70. # Get a command to check in a ClearCase object.
  71. #
  72. proc CCCommand::checkIn {path noComment comment} {
  73.     if $noComment {
  74.     set command "ci -nc"
  75.     } else {
  76.     set command "ci -c \"$comment\""
  77.     }
  78.  
  79.     return [CCCommand new "$command" "$path" "Checkin $path"]
  80. }
  81.  
  82.  
  83. # Get a command to un check out a ClearCase object.
  84. #
  85. proc CCCommand::unCheckOut {path keepPrivate} {
  86.     if $keepPrivate {
  87.     set command "unco -keep"
  88.     } else {
  89.     set command "unco -rm"
  90.     }
  91.  
  92.     return [CCCommand new "$command" "$path" "Uncheckout $path"]
  93. }
  94.  
  95.  
  96. # Get a command to create a ClearCase object.
  97. #
  98. proc CCCommand::createElem {path type comment} {
  99.     set command "mkelem -eltype $type -c \"$comment\""
  100.     return [CCCommand new "$command" "$path" "Create file $path"]
  101. }
  102.  
  103.  
  104. # Get command to set attribute value on all
  105. # versions of vob element specified in path.
  106. #
  107. proc CCCommand::setAttribute {path name value} {
  108.     set command "mkattr -replace $name \\\"$value\\\""
  109.     return [CCCommand new "$command" "${path}@@" "set attribute $name"]
  110. }
  111.  
  112.  
  113. # Get a command to remove a ClearCase name.
  114. #
  115. proc CCCommand::removeName {path} {
  116.     set command "rmname"
  117.     return [CCCommand new "$command" "$path" "Delete file $path"]
  118. }
  119.  
  120.  
  121. # Get a command to rename a ClearCase object.
  122. #
  123. proc CCCommand::rename {oldPath newPath} {
  124.     set command "mv [quoteIf $oldPath] [quoteIf $newPath]"
  125.     return [CCCommand new "$command" "" "Rename $oldPath" ]
  126. }
  127.  
  128.  
  129. # Get a command to create a ClearCase branch.
  130. #
  131. proc CCCommand::createBranch {path type comment} {
  132.     set command "mkbranch -c \"$comment\" $type"
  133.     return [CCCommand new "$command" "$path" "Create branch $type on $path"]
  134. }
  135.  
  136.  
  137. # Get a command to destroy a ClearCase branch.
  138. #
  139. proc CCCommand::destroyBranch {path} {
  140.     set command "rmbranch -f -nc"
  141.     return [CCCommand new "$command" "$path" "Destroy branch"]
  142. }
  143.  
  144.  
  145. # Get a command to create a new ClearCase branch type.
  146. #
  147. proc CCCommand::newBranchType {type comment vob} {
  148.     set command "mkbrtype -c \"$comment\" -vob [quoteIf $vob] $type"
  149.     return [CCCommand new "$command" "" "New branch type $type"]
  150. }
  151.  
  152.  
  153. # Get a command to destroy the specified branch type
  154. # in the specified vob.
  155. #
  156. proc CCCommand::destroyBranchType {type vob} {
  157.     set command "rmtype -brtype -vob [quoteIf $vob] $type"
  158.     return [CCCommand new "$command" "" "Destroy branch type $type"]
  159. }
  160.  
  161.  
  162. # get a command to reserve a ClearCase checkout.
  163. #
  164. proc CCCommand::reserve {path} {
  165.     set command "reserve"
  166.     return [CCCommand new "$command" "$path" "Reserve $path"]
  167. }
  168.  
  169.  
  170. # Get a command to unreserve a ClearCase checkout.
  171. #
  172. proc CCCommand::unreserve {path} {
  173.     set command "unreserve"
  174.     return [CCCommand new "$command" "$path" "Unreserve $path"]
  175. }
  176.  
  177.  
  178. # Get a command to list checkouts of a ClearCase object.
  179. #
  180. proc CCCommand::listCheckout {path} {
  181.     set command "lsco"
  182.     return [CCCommand new "$command" "$path" "List checkouts of $path"]
  183. }
  184.  
  185.  
  186. # Get a command to change the comment for a ClearCase object.
  187. #
  188. proc CCCommand::changeComment {path comment} {
  189.     set command "chevent -c \"$comment\" -replace"
  190.     return [CCCommand new "$command" "$path" "Change comment of $path"]
  191. }
  192.  
  193.  
  194. # Get command to show diff of selected version
  195. # with specified version.
  196. #
  197. proc CCCommand::diff {path version graphical} {
  198.     if $graphical {
  199.     set command "xdiff"
  200.     } else {
  201.     set command "diff -col 160"
  202.     }
  203.     set command "$command [quoteIf $path\@\@$version] [quoteIf $path]"
  204.  
  205.     return [CCCommand new "$command" "" "Show diff with other version"]
  206. }
  207.  
  208.  
  209. # Returns whether the directory specified by
  210. # directory is checked out.
  211. #
  212. proc CCCommand::isCheckedOut {directory} {
  213.     set command "lsco -cview -fmt %u -directory"
  214.     set lscoCommand [CCCommand new "$command" "$directory" "Get checkout status of $directory"]
  215.     if { ![vsCommandHandler executeSilent $lscoCommand] } {
  216.     return 0
  217.     }
  218.  
  219.     if { [$lscoCommand output] != "" } {
  220.     return 1
  221.     }
  222.  
  223.     return 0
  224. }
  225.  
  226.  
  227. # Return whether the file path refers to exists in the vob.
  228. #
  229. proc CCCommand::existsInVob {path} {
  230.     # this should not be called if path does not exist
  231.     set command "ls -vob"
  232.     set lsCommand [CCCommand new "$command" "$path" "Searching $path in vob"]
  233.     if { ![vsCommandHandler executeSilent $lsCommand] } {
  234.     return 0
  235.     }
  236.  
  237.     if { [$lsCommand output] != "" } {
  238.     return 1
  239.     }
  240.  
  241.     return 0    
  242. }
  243.  
  244.  
  245. # Returns the previous version of path.
  246. #
  247. proc CCCommand::getPredecessor {path} {
  248.     set command "describe -fmt \"%PVn\""
  249.     set descCommand [CCCommand new "$command" "$path" "Get previous version of $path"]
  250.     if { ![vsCommandHandler executeSilent $descCommand] } {
  251.     return ""
  252.     }
  253.  
  254.     return "[$descCommand output]"
  255. }
  256.  
  257.  
  258. # Get value of attribute specified by name
  259. # from versions specified by path.
  260. #
  261. proc CCCommand::getAttributeValue {path name} {
  262.     set command "describe -s -aattr $name"
  263.     set getCommand [CCCommand new "$command" "${path}@@" "Get attribute $name"]
  264.     if { ![vsCommandHandler executeSilent $getCommand] } {
  265.     return ""
  266.     }
  267.  
  268.     regsub -all {"} [string trim [$getCommand output]] "" value
  269.     return $value
  270. }
  271.  
  272.  
  273. # Executes the remove branch command without
  274. # actually removing and intercepts the remove warning and
  275. # returns it.
  276. #
  277. proc CCCommand::getRemoveBranchWarning {path} {
  278.     set command "rmbranch -nc"
  279.     set rmCommand [CCCommand new "$command" "$path" "Destroy branch"]
  280.     $rmCommand input "no"
  281.     if { ![vsCommandHandler executeSilent $rmCommand] } {
  282.     return ""
  283.     }
  284.  
  285.     # remove superfluous output from warning
  286.     regsub -all {\[no\]} [$rmCommand output] "" warning
  287.  
  288.     # special Windows/sport7 hack, input echo does not work well
  289.     regsub {.*abort, yes, no.} $warning "" warning
  290.  
  291.     return $warning
  292. }
  293.  
  294.  
  295. # Do a ClearCase listing in the specified paths and add following information to infoDict:
  296. # filename, version, checkout status, rule.
  297. #
  298. proc CCCommand::longListing {pathList infoDict} {
  299.     set existingPaths {}
  300.     foreach path $pathList {
  301.     if [file isdirectory $path] {
  302.         lappend existingPaths $path
  303.     }
  304.     }
  305.  
  306.     if [lempty $existingPaths] {
  307.     return ""
  308.     }
  309.  
  310.     set pathList $existingPaths
  311.  
  312.     set lsCommandString "ls -l "
  313.     set lscoCommandString "lsco -cview "
  314.     foreach path $pathList {
  315.     set lsCommandString "$lsCommandString [quoteIf $path]"
  316.     set lscoCommandString "$lscoCommandString [quoteIf $path]"
  317.      }
  318.  
  319.     # execute ClearCase ls commands
  320.     set lsCommand [CCCommand new "$lsCommandString" "" "$lsCommandString"]
  321.     if { ![vsCommandHandler executeSilent $lsCommand] } {
  322.     return
  323.     }
  324.  
  325.     set lsOutput "[$lsCommand output]"
  326.  
  327.     # it succeeded, now format output so the browser understands it
  328.     foreach line [split $lsOutput "\n"] {
  329.     # it is either 'version' or 'directory version'. Skip directories
  330.     if [regexp {^directory.} $line] {
  331.         continue
  332.     }
  333.     if { ![regexp "^version" $line] } {
  334.         if { ![regexp {no version selected} $line] } {
  335.         continue
  336.         }
  337.         # no version selected: retrieve name
  338.         regexp {([^     ]+)\@\@} $line dummy name
  339.         set version "Not Selected"
  340.         set infoList {}
  341.         lappend infoList $version
  342.         lappend infoList ""
  343.         lappend infoList ""
  344.         $infoDict set $name $infoList
  345.         continue
  346.     }
  347.  
  348.     # if there is no 'Rule' in the line it is not a selected version
  349.     if { ![regexp {Rule:} $line] } {
  350.         continue
  351.     }
  352.  
  353.     # get version path name of file
  354.     regexp {^version[     ]+(.*)[     ]+Rule:} $line dummy nameVersion
  355.     # get just the path in filePath
  356.     regexp {(.*)\@\@} $nameVersion dummy filePath
  357.     # get the version name
  358.     regexp {\@\@([^     ]+)[     ]+} $nameVersion dummy version
  359.     # get the selection rule
  360.     regexp {Rule: (.*)$} $line dummy rule
  361.  
  362.     # if file is checkedout append 'from' information
  363.     if { [regexp { from [^      ]* } $line fromVersion] } {
  364.         set version "$version $fromVersion"
  365.         set status "Reserved"
  366.     } else {
  367.         set status "CheckedIn"
  368.     }
  369.     set infoList {}
  370.     lappend infoList $version
  371.     lappend infoList $status
  372.     lappend infoList $rule
  373.     $infoDict set $filePath $infoList
  374.     }
  375.  
  376.     # obtain checkout information
  377.     set lscoCommand [CCCommand new "$lscoCommandString" "" "$lscoCommandString"]
  378.     if { ![vsCommandHandler executeSilent $lscoCommand] } {
  379.     return
  380.     }
  381.  
  382.     # if the checkout line contains 'unreserved' retrieve the file name
  383.     # and update in dictionary
  384.     foreach line [split [$lscoCommand output] "\n"] {
  385.     if { [regexp {\(unreserved\)$} $line] } {
  386.         regexp { checkout version \"([^     ]*)\" } $line dummy filePath
  387.         set infoList [$infoDict set $filePath]
  388.         $infoDict set $filePath [lreplace $infoList 1 1 "Unreserved"]
  389.     }
  390.     }
  391. }
  392.  
  393.  
  394. # Do a clearcase listing in the directories in
  395. # pathList and return a list with filenames.
  396. #
  397. proc CCCommand::shortListing {pathList} {
  398.     set existingPaths {}
  399.     foreach path $pathList {
  400.     if [file isdirectory $path] {
  401.         lappend existingPaths $path
  402.     }
  403.     }
  404.  
  405.     if [lempty $existingPaths] {
  406.     return ""
  407.     }
  408.  
  409.     set pathList $existingPaths
  410.     set lsCommandString "ls "
  411.     foreach path $pathList {
  412.     set lsCommandString "$lsCommandString [quoteIf $path]"
  413.      }
  414.  
  415.     # execute ClearCase ls commands
  416.     set lsCommand [CCCommand new "$lsCommandString" "" "$lsCommandString"]
  417.     if { ![vsCommandHandler executeSilent $lsCommand] } {
  418.     return ""
  419.     }
  420.  
  421.     # retrieve versions only: go through output and select
  422.     set fileList {}
  423.     foreach line [split [$lsCommand output] "\n"] {
  424.     # if there is no 'Rule' in the line it is not a selected version
  425.     if { ![regexp {Rule:} $line] } {
  426.         continue
  427.     }
  428.  
  429.     # get just the path in filePath
  430.     regexp {(.*)\@\@} $line dummy filePath
  431.     lappend fileList [path_name file $filePath]
  432.     }
  433.  
  434.     return $fileList
  435. }
  436.  
  437.  
  438. # Do a description on the specified ClearCase object and add to InfoDict:
  439. # Comments, Labels, Attributes, Hyperlinks value pairs.
  440. #
  441. proc CCCommand::describe {path infoDict} {
  442.     # First command: retrieve everything but hyperlinks
  443.     set commandString "describe -fmt %Na\\n%Vd\\n%u\\n%Nl\\n%c"
  444.     set command [CCCommand new "$commandString" "$path" "Retrieving info of $path"]
  445.     if { ![vsCommandHandler executeSilent $command] } {
  446.     return
  447.     }
  448.  
  449.     # parse output and add to the dictionary
  450.     set descLines [split [$command output] "\n"]
  451.     $infoDict set Attributes [lindex $descLines 0]
  452.     $infoDict set Created [lindex $descLines 1]
  453.     $infoDict set "Created By" [lindex $descLines 2]
  454.     $infoDict set Labels [lindex $descLines 3]
  455.     set comments [join [lrange $descLines 4 end] "\n"]
  456.     $infoDict set Comments $comments
  457.  
  458.     # Get hyperlinks and ClearCase Type
  459.     set commandString "describe"
  460.     set command [CCCommand new "$commandString" "$path" "Retrieving description of $path"]
  461.     if { ![vsCommandHandler executeSilent $command] } {
  462.     return
  463.     }
  464.  
  465.     # parse output and retrieve information
  466.     # hyperlinks part start with a HyperLinks: line, element type
  467.     # is on an element type: line
  468.     set inHyperLinkLines 0
  469.     set hyperLinkLines {}
  470.     set ccType ""
  471.     foreach descLine [split [$command output] "\n"] {
  472.     if [regexp {element type: (.*)} $descLine dummy type] {
  473.         set ccType $type
  474.     }
  475.  
  476.     # normally nothing follows the Hyperlinks: part, but be careful
  477.     # just in case the comment contains a Hyperlinks: part
  478.     if $inHyperLinkLines {
  479.         if { ![regexp :$ $descLine] } {
  480.         lappend hyperLinkLines $descLine
  481.         } else {
  482.         set inHyperLinkLines 0
  483.         }
  484.     }
  485.  
  486.     if [regexp {Hyperlinks:} $descLine] {
  487.         set inHyperLinkLines 1
  488.         set hyperLinkLines {}
  489.     }
  490.     }
  491.  
  492.     set hyperLinks [join $hyperLinkLines "\n"]
  493.     $infoDict set Hyperlinks [string trim $hyperLinks]
  494.     $infoDict set "ClearCase Type" $ccType
  495.  
  496.     # get class that this file was generated from
  497.     global VSFile::classAttribute
  498.     set name [CCCommand::getAttributeValue $path ${VSFile::classAttribute}]
  499.     $infoDict set "Generated From Class" $name
  500. }
  501.  
  502.  
  503. # Get the known branch types in the current vob and return them.
  504. #
  505. proc CCCommand::getBranchTypes {vob} {
  506.     set command "lstype -brtype -fmt \"%n \" -vob"
  507.     set listBranchCommand [CCCommand new "$command" "$vob" "List branch types"]
  508.     if { ![vsCommandHandler executeSilent $listBranchCommand] } {
  509.     return ""
  510.     }
  511.  
  512.     return "[$listBranchCommand output]"
  513. }
  514.  
  515.  
  516. # Get the version tree on 'path' and return it.
  517. #
  518. proc CCCommand::getVersions {path} {
  519.     set command "lsvtree -all -s -nco"
  520.     set lsVersionsCommand [CCCommand new "$command" "$path" "Retrieving versions of $path"]
  521.     if { ![vsCommandHandler executeSilent $lsVersionsCommand] } {
  522.     return ""
  523.     }
  524.  
  525.     # parse output: get version extensions only
  526.     # discard versions that are not printable versions such as /main
  527.     set versionList {}
  528.     foreach outputLine [split [$lsVersionsCommand output] "\n"] {
  529.     regsub -all {.*\@\@} $outputLine "" version
  530.     if [regexp {.*[0-9]} $version] {
  531.         lappend versionList $version
  532.     }
  533.     }
  534.  
  535.     return $versionList
  536. }
  537.  
  538.  
  539. # Get the active views on this machine and return in list.
  540. #
  541. proc CCCommand::getActiveViews {} {
  542.     set command "lsview"
  543.     set lsViewCommand [CCCommand new "$command" "" "Listing active views"]
  544.     if { ![vsCommandHandler executeSilent $lsViewCommand] } {
  545.     return ""
  546.     }
  547.  
  548.     # parse view list: get active view names only
  549.     set viewList {}
  550.     foreach outputLine [split [$lsViewCommand output] "\n"] {
  551.     if [regexp {\*[     ]+(.*)} $outputLine dummy viewLine] {
  552.         regsub {[/A-Z\\].*} $viewLine "" view
  553.         lappend viewList [string trim $view]
  554.     }
  555.     }
  556.  
  557.     return $viewList
  558. }
  559.  
  560.  
  561. # Returns whether the specified view exists in
  562. # the view directory.
  563. #
  564. proc CCCommand::viewIsActive {view} {
  565.     if $win95 {
  566.     set viewPath [path_name concat M: $view]
  567.     } else {
  568.     set viewPath [path_name concat /view $view]
  569.     }
  570.  
  571.     return [file isdirectory $viewPath]
  572. }
  573.  
  574. proc CCCommand::getWorkingView {} {
  575.     set command "pwv -s -set"
  576.     set pwvCommand [CCCommand new "$command" "" "Determine working view"]
  577.     if { ![vsCommandHandler executeSilent $pwvCommand] } {
  578.     return ""
  579.     }
  580.  
  581.     set view [$pwvCommand output]
  582.     if [regexp  {\*\* NONE \*\*} $view] {
  583.     return ""
  584.     }
  585.     return $view
  586. }
  587.  
  588.  
  589. # Try to start the specified view.
  590. #
  591. proc CCCommand::startView {view} {
  592.     set command "startview"
  593.     set startViewCommand [CCCommand new "$command" "$view" "Start view $view"]
  594.     return [vsCommandHandler execute $startViewCommand]
  595. }
  596.  
  597.  
  598. # Get config spec of specified view.
  599. #
  600. proc CCCommand::getConfigSpec {view} {
  601.     set command "catcs -tag"
  602.     set getConfigSpecCommand [CCCommand new "$command" "$view" "Get config spec of $view"]
  603.     if { ![vsCommandHandler executeSilent $getConfigSpecCommand] } {
  604.     return ""
  605.     }
  606.  
  607.     return [$getConfigSpecCommand output]
  608. }
  609.  
  610.  
  611. # Set specified config spec of specified view.
  612. #
  613. proc CCCommand::setConfigSpec {view specFile} {
  614.     set command "setcs -tag [quoteIf $view] $specFile"
  615.     set setConfigSpecCommand [CCCommand new "$command" "" "Set config spec of $view"]
  616.     return [vsCommandHandler execute $setConfigSpecCommand]
  617. }
  618.  
  619.  
  620. # Determines the path to cleartool and save it in
  621. # cleartoolPath. Prepend cleartool command.
  622. # Windows only.
  623. #
  624. proc CCCommand::initializeCleartoolPath {} {
  625.     global CCCommand::cleartoolPath
  626.     global CCCommand::cleartoolCommand
  627.     if { ${CCCommand::cleartoolPath} != "" } {
  628.     return
  629.     }
  630.  
  631.     set fullName [VSCommand::findPath atria cleartool]
  632.     if { $fullName != "" } {
  633.     set CCCommand::cleartoolPath [path_name directory $fullName]
  634.     set CCCommand::cleartoolCommand $fullName
  635.     } else {
  636.     vsCommandHandler error "cleartool path not found"
  637.     }
  638. }
  639.  
  640.  
  641. # Classify the ClearCase output.
  642. #
  643. method CCCommand::classifyOutput {this} {
  644.     set outputLines {}
  645.     set warningLines {}
  646.     foreach line [split [$this output] "\n"] {
  647.     if [regexp -nocase {warning\:} $line] {
  648.         lappend warningLines $line
  649.         continue
  650.     }
  651.     lappend outputLines $line
  652.     }
  653.     if { $warningLines != "" } {
  654.     $this warnings [join $warningLines "\n"]
  655.     }
  656.     $this output [join $outputLines "\n"]
  657. }
  658.  
  659.  
  660. # Execute the command and classify if classifyOutput is set.
  661. #
  662. method CCCommand::execute {this {classifyOutput 0}} {
  663.     # if there is input feed it to command
  664.     if { [$this input] != "" } {
  665.     set echoCommand "echo"
  666.     set commandString "exec $echoCommand [$this input] |"
  667.     } else {
  668.     set commandString "exec"
  669.     }
  670.  
  671.     # do this to keep backslashes
  672.     set commandParts [$this command]
  673.     while { "$commandParts" != "" } {
  674.     if { ![regexp {^"([^"]*)"[     ]*(.*)$} $commandParts \
  675.         dummy commandPart commandParts] } {
  676.         regexp {^([^     ]*)[     ]*(.*)$} $commandParts \
  677.             dummy commandPart commandParts
  678.     }
  679.     if { "$commandPart" == "" } {
  680.         set commandString "$commandString \"\""
  681.     } else {
  682.         if [regexp {\"} $commandPart] {
  683.         set commandString "$commandString $commandPart"
  684.         } else {
  685.         set commandString "$commandString [list $commandPart]"
  686.         }
  687.     }
  688.     }
  689.  
  690.     # do it
  691.     if [ catch { set output [eval $commandString] } errors] {
  692.     # Remove cleartool strings from output
  693.     regsub -all {cleartool[^:]*: } $errors "" commandOutput
  694.  
  695.     # Cleartool has error exit status on warnings so check
  696.     # if this really was an error
  697.     if { ![regexp -nocase {warning:} $commandOutput] } {
  698.         $this errors $commandOutput
  699.         return
  700.     }
  701.     } else {
  702.     # Remove cleartool strings
  703.     regsub -all {cleartool[^:]*: } $output "" commandOutput
  704.     }
  705.  
  706.     $this output $commandOutput
  707.     if $classifyOutput {
  708.     $this classifyOutput
  709.     }
  710. }
  711.  
  712. # Do not delete this line -- regeneration end marker
  713.  
  714.