The setproperty command assigns a property name/ value pair to either a stream or a principal (user or group). If the property does not exist, AccuRev creates it; that is, a new property does not require a separate create command. Properties are not TimeSafe; if you respecify or remove a property, you cannot roll back to the prior property name/value pair.
If you have implemented a server_admin_trig server-side trigger at your site and you want to modify it to use stream and principal properties, see
Modifications to server_admin_trig on page 235.
To specify a file as a value (an image, for example), use -l with the
<file-name> option. 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. Note that when you use
-l, you must reverse the order of the name/value pair to pair/value.
The -l option transfers the file content to the AccuRev Server. Similarly, if a file name is specified when
reading a stream or principal property (using
getproperty, for example), AccuRev places the content in that file; otherwise, AccuRev returns an asterisk (*) for that property. See
getproperty on page 115 for more information.
Note that the order of the name/value pair changes to value/name when using the -l option to specify a file as a property value, as shown in the following two examples:
If you have implemented the server-side trigger server_admin_trig at your site, you need to modify it if you want it to work with the
setproperty command. See the "Trigger Parameters File" section in the "AccuRev Triggers" chapter of the AccuRev
Administrator’s Guide for more information.
<?xml version="1.0" encoding="utf-8"?><triggerInput>
<depot>test1</depot>
<hook>server_admin_trig</hook>
<command>setproperty</command>
<principal>testuser</principal>
<ip>10.10.10.177</ip>
<propertyKind>stream</propertyKind>
<streamName>stream1</streamName>
<propertyName>bingo</propertyName>
<propertyValue>bongo</propertyValue>
</triggerInput>
<?xml version="1.0" encoding="utf-8"?><triggerInput>
<hook>server_admin_trig</hook>
<command>setproperty</command>
<principal>testuser</principal>
<ip>10.10.10.177</ip>
<propertyKind>principal</propertyKind>
<principalName>user3</principalName>
<propertyName>foobar</propertyName>
<propertyValue>bongo</propertyValue>
</triggerInput>