hsigget Command-Signature File Query

The hsigget command retrieves and displays the information stored in  signature files. You can query for information on one or more specific files. You can also request information for all attributes or query specific attributes by name. If no attributes are specified, all of them are reported.
cahscm101
The hsigget command retrieves and displays the information stored in 
CA Harvest SCM
 signature files. You can query for information on one or more specific files. You can also request information for all attributes or query specific attributes by name. If no attributes are specified, all of them are reported.
The output from the hsigget command returns a status for each file found. The status codes are:
  • Untouched
  • Modified
  • Removed
If the signature file cannot be opened, this command returns -
1
. If you renamed the signature file, it is considered as having been removed or deleted and the command returns
3
.
This command has the following format:
hsigget 
filename...
 [-a 
attribute1
 
attribute2
...] [-context] [-purge {[
filename...
] | all]} [-v] [-t] [-o 
filename
 | -oa 
filename
] [-i 
inputfile.txt
 | -di 
inputfile.txt
] [-arg] [-gl] [-wts] [-h]
  • filename...
    Specifies one or more file names in the signature file to query.
  • -a 
    attribute1
     
    attribute2
    ...
    (Optional) Specifies one or more attributes to be reported.
    The following attributes can be queried and modified with the hsigget command. They are identified by their symbolic name.
  • author
    Specifies the user who created the reserved version for a check out for update, or the user who created the version through check-in. The value of this attribute is the real name supplied in the User Properties, if it exists; otherwise, it is the user name. For check out for update, the author and user are the same. The value of this attribute is updated during:
  • Check-out (reserve only)
    • All modes of check-in
  • crtime
    Specifies the time a version was created. For a reserved version, this is set either through check out for update or check in for update and keep. For check out for browse, this is version creation time.
    The value of this attribute is updated during:
    • Check-out (except for reserve only)
    • All modes of check-in
  • environment
    Specifies the project context of the corresponding item.
    The value of this attribute is updated during:
    • Check-out (except for reserve only)
    • All modes of check-in
  • modtime
    Specifies the modification time of the file when the signature file was last updated by check-in or check-out. Used to determine if the file has been modified since it was checked out or in.
    The value of this attribute is updated during:
    • Check-out (except for reserve only)
    • All modes of check-in
  • package
    Specifies the package name used during a check out for update, blank if checked out for browse.
    The value of this attribute is updated during:
    • Check out for update
    • Check in for update and release
    • Check in for release only (clears value)
  • size
    Specifies the file size in bytes when the signature file was last updated. Used to determine if the file has been modified since it was checked out or in.
    The value of this attribute is updated during:
    • Check-out (except for reserve only)
    • Check-in
  • state
    Specifies the state context of the corresponding item.
    The value of this attribute is updated during:
    • Check-out (except for reserve only)
    • Check-in (except for release only)
  • status
    Calculates if the file has been modified since it was last checked in or out. This attribute is calculated when its value is queried by comparing the modtime and size attributes with the actual file modification time and size. Possible values are Modified, Untouched, or Removed.
    The value of this attribute is calculated when queried.
  • tag
    Specifies if the version is tagged as reserved. An empty string represents no tag.
    The value of this attribute is updated during:
    • Check-out (except for reserve only)
    • Check in for update and release
    • Check in for release only (removes reserved tag)
  • user
    Specifies the user who performed the check-out. The value of this attribute is the real name supplied in the User Properties, if it exists; otherwise it is the user name.
    The value of this attribute is updated during:
    • Check-out (except for reserve only)
    • All modes of check-in
  • version
    Specifies the environment version number of the corresponding item.
    The value of this attribute is updated during:
    • Check-out (except for reserve only)
    • Check in for update and release, if differences are found
    • Check in for update and keep, if differences are found
  • versionid
    Specifies a number that uniquely identifies the version, updated on check-in and check-out, and used as a basis for the synchronize process.
    The value of this attribute is updated during:
    • Check-out (except for reserve only)
    • All modes of check-in
  • viewpath
    Specifies the view path context of the corresponding item.
    The value of this attribute is updated during:
    • Check-out (except for reserve only)
    • All modes of check-in
  • -context
    Specifies to report information about the context variables in the signature file set by hsigset.
  • -purge [
    filename...
    ] | all
    (Optional) Specifies to remove information about files that are no longer located in the current directory. If the -purge option is followed by one or more optional file names, information for only those file names is removed. If the -purge option is followed by all, information for all files is removed.
  • -v
    (Optional) Specifies to generate a report with a pre-selected subset of attributes related to version information, including file name, status, tag, version, and package.
  • -t
    (Optional) Specifies that the output should be specially formatted to make it easy to import into a spreadsheet or word processor. Each field in the output is separated with a single tab.
    Fields that contain multiple lines of data present a special challenge for report generation. Because new-line characters separate records, if a field also contains new-line characters, the output becomes ambiguous and difficult to format.
    To make it easy to distinguish between a field separator and a record separator, special processing is done on multiple line output. Multiple line output for one field is merged into one long line with the string <NL> substituted for any occurrence of a new-line. Any occurrence of tabs in the data is replaced with the string <TAB>.
    This algorithm removes any ambiguity between field and record separators. After the data is imported into the spreadsheet or table, it is easy to reformat by searching and replacing the <NL> and <TAB> strings.
    When -t is not specified, each attribute of a record is specified on a new line and two new-lines separate records. If -nh is not specified, the output value follows the field name, unless the output is multi-line; in which case, output starts on a new line.
  • -gl
    (Optional) Specifies that the time format is output according to the local settings.
Examples: hsigget command
To report attribute information for “package” and “environment” that is contained in the signature file for the file foo.cpp, use the following command:
hsigget foo.cpp -a package environment
To report version attributes contained in the signature file, use the following command:
hsigget -v
To report information about the context variables in the signature file set by hsigset, use the following command:
hsigget -context
To remove information about all file names contained in the signature file, use the following command:
hsigget -purge all
To remove information that is contained in the signature file for file foo.cpp, use the following command:
hsigget -purge foo.cpp