Update File Status: update-status
When you update the status of a file, StarTeam compares the working file with the revision you checked out and the tip revision. For example, your File list may say that the file is Current, but someone else has just checked in a copy of it, so the status of your file is actually is Out Of Date.
Updating file statuses is not the same as updating files. If a file is not in your working folder, updating the status lets you know that the file’s status is Missing, but will not check out the file for you. Normally, you update file status to determine whether a file should be checked in, checked out, added, or ignored.
For example, you may want to:
- Check in a file if its status is Out Of Date, Missing, or Merge.
- Check out a file if its status is Modified or Merge.
- Add a file to the application if its status is Not In View. However, the update-status command never lists files that have the status Not In View because they are not stored in the repository.
Use
stcmd{Ex} update-status
to display the filename, its status before the command, and its status after the command. A sample line of output might be:
x.cpp: status is Current (was Unknown)
Syntax
The syntax for this command is:
stcmd{Ex} update-status [-p "projectSpecifier" [-epwdfile "filePath"] [-cmp] [-csf] [-encrypt encryptionType]][-is] [-vb] [-rp "folderPath" | -fp "folderPath"] [-filter "fileStatus"] [-cfgl "labelName" | -cfgp "stateName" | -cfgd "asOfDate"] [-pattern "pattern"] [-q|-pf “filterName”] [-ofp “resultsOutputFilePath”] [files...]
Parameters
For information about the command parameters, refer to Operation Parameters.
In addition:
Parameter | Description |
---|---|
-vb | If specified, then the output reports all identified files, whether or not their status changed as a consequence of the call to update-status. When not specified (the default behavior), the output only describes those files whose status changed by virtue of this command. |
Example
The following example uses update-status to verify that each file in the working folder for the StarTeam folder named SourceCode has an accurate status. SourceCode is a child of the root folder StarDraw (in the StarDraw view of the StarDraw project).
Use the -p with update-status or the stateful set command to set the context of the project/view/parent folder.
stcmd update-status -rp "/StarDraw/StarDraw/SourceCode" "*"