2. AccuRev® Command-Line Reference : getproperty

getproperty
list stream or principal properties
Usage
accurev getproperty [ -f ] [ -ks |-ku ] [ -p <depot> ] [ -s <stream> |
-u <principal> ] [ -r ] [ -l <file-name> ][ -n <pattern> ]
Description
The getproperty command displays the name/value pair for the specified stream or principal property. If the property value is a file, getproperty displays the file name for the value. If a target file is specified using the -l option, getproperty writes the file contents to that file.
Options
-f <format(s)>
Specifies output format. Use one or more of the following format letters:
-i: Include properties for hidden streams or principals.
-v: Display property name only.
-x: Display the results in XML format.
-ks | ku
Shows properties for all streams (-ks) or all principals (-ku). Note that -ks requires the use of -p to specify the depot.
-p <depot>
Specifies the name of the depot whose properties you want to display.
-s <stream>
Specifies the name of the stream whose properties you want to display.
-u <principal>
Specifies the name of the user or group whose properties you want to display.
-l <file-name>
Specifies the name of the file to which you want the property value written. This option can be used only for a property value that was originally specified as a file (setting a "profile" property to a .png file, for example).
This option creates the file you specify, and the command fails if the file already exists. You can use either a relative or absolute path to specify the file location. If you do not specify a path, AccuRev assumes the file is in the current directory. The file should have an extension appropriate for the data that will be written to it. If the property is an image, the file should have a .png or .jpg extension, for example.
-n <pattern>
Specifies the glob pattern the property name must match; only properties whose name matches the glob pattern are displayed.
The glob pattern is a simple pattern that allows "*" to specify one or more unmatched characters or "?" to match exactly one unmatched character. Use the backslash (\) as an escape character to pass a literal "*" or "?". A name with no pattern characters will be exactly matched.
Note: You must use -n to specify a pattern for the property name if you use the -l option.
-r
Option required to get reserved properties for the specified stream (-s), or for all the streams in the specified depot (-p).
Examples
Get all properties on stream "prod_2010":
> accurev getproperty -s prod_2010
Get the value of the "streamStyle" reserved property on stream "nightly":
> accurev getproperty -s nightly -r -n streamStyle
Get the value of all reserved properties on stream "nightly" and display them using XML format:
> accurev getproperty -s nightly -r -fx
Get all properties on all streams in depot "phoenix":
> accurev getproperty -ks -p phoenix
Get the value of the "profile" property on user "jsmith":
> accurev getproperty -u jsmith profile
Get the value of the "profile" property on user "jsmith" and write the value to "c:\temp\jsmith.txt":
> accurev getproperty -u jsmith -l c:\temp\jsmith.txt -n profile
Note: The preceding example assumes that the value of the "profile" property was specified as a file.
XML Output Examples
Stream Properties
<?xml version="1.0" encoding="utf-8"?>
<properties>
   <property
      kind="stream"
      depotName="test"
      streamNumber="2"
      streamName="prod_2010"
      propertyName="Status">obsolete</property>
   <property
      kind="stream"
      depotName="test"
      streamNumber="2"
      streamName="prod_2010"
      propertyName="Project">Amber</property>
</properties>
User Properties
<?xml version="1.0" encoding="utf-8"?>
<properties>
  <property
      kind="principal"
      principalNumber="1"
      principalName="jsmith"
      propertyName="profile">*</property>
</properties>
See Also
setproperty, rmproperty, show

Micro Focus