AcUtils
A high performance abstraction layer for AccuRev
AccuNotes
Member AcUtils.AcDepots.initAsync (DepotsCollection depotsCol=null, IProgress< int > progress=null)
The XML attribute locWidth from show -fx depots is obsolete. It's an AccuRev 4.x artifact and should be removed. RPI defect 1112042, SupportLine AR3325.
Member AcUtils.AcGroups.initMembersListAsync (string group)
Unlike the show command used here, its show -fx -u <user> groups counterpart does include memberships resulting from indirect (implicit) membership.
Member AcUtils.AcLocks.lockAsync (string stream, string comment, LockKind kind=LockKind.all, AcPrincipal prncpl=null, OnlyExcept onlyexcept=OnlyExcept.Except)
The CLI lock command can be used on a workspace stream but the same cannot be done using the AccuRev GUI client. AccuRev defect 23850.
Member AcUtils.AcPreferences.getIgnoreOptionsAsync ()
Selecting "Ignore Whitespace" and "Ignore Changes in Whitespace" applies to diff only. The merge command does not use these settings and will show all conflicts.
Member AcUtils.AcPreferences.getPreferencesAsync ()
When using the AccuRev GUI client, changes in User Preferences do not always persist. As a workaround, use setpref:
  1. Exit the AccuRev client.
  2. Put the setting(s) needed in a file named set_pref.xml
  3. Open a command window and cd to the folder where the file is located.
  4. Run the command accurev setpref -l set_pref.xml (-l switch is a lowercase L)
  5. Run the AccuRev client and verify the setting(s).
    <AcRequest>
    <USE_IGNORE_ELEMS_OPTIMIZATION>true</USE_IGNORE_ELEMS_OPTIMIZATION>
    ...
    </AcRequest>
    
Member AcUtils.AcPrincipal.Members
We use a set object as a workaround for show -fx -u <user> groups where the same group names are repeated multiple times. AccuRev defect 28001.
Member AcUtils.AcQuery.getCatFileAsync (int eid, AcDepot depot, string ver_spec)

The CLI cat command fails on Windows for ptext files larger than 62,733 bytes. Fixed in 6.0. AccuRev defect 28177.

For the name, anc and cat commands, the validity of the results is guaranteed only if the commands are issued outside a workspace, or in a workspace whose backing stream is in the same depot for both workspace and the -v <ver_spec> option used. If issued from a workspace that has a different backing stream than the -v <ver_spec>, provided both workspace and ver_spec share the same depot, the command results can be deemed valid. However, if issued from a workspace whose backing stream is in a different depot than the -v <ver_spec>, the command results are invalid. Applications should set the default directory to a non-workspace location prior to issuing these commands. AccuRev defects 18080, 21469, 1097778.

Member AcUtils.AcQuery.getElementNameAsync (string stream, int EID)
For the name, anc and cat commands, the validity of the results is guaranteed only if the commands are issued outside a workspace, or in a workspace whose backing stream is in the same depot for both workspace and the -v <ver_spec> option used. If issued from a workspace that has a different backing stream than the -v <ver_spec>, provided both workspace and ver_spec share the same depot, the command results can be deemed valid. However, if issued from a workspace whose backing stream is in a different depot than the -v <ver_spec>, the command results are invalid. Applications should set the default directory to a non-workspace location prior to issuing these commands. AccuRev defects 18080, 21469, 1097778.
Member AcUtils.AcQuery.getPrincipalAsync ()
To support GUIs logging into replicas, get host and port from info command (instead of from XML <serverInfo> results, which are not correct for replica) to use in titlebar, preferences.xml, and MQTT messages. 35934/17776122 (35921/17776020)
Class AcUtils.AcRules

The lsrules -t option to display the rules set that existed as of a specified time does not work. AccuRev defect 22659.

The -l <file> option for mkrules will crash the server when the file argument contains bad XML. AccuRev defect 26252.

Class AcUtils.AcSession
A server IP address change requires renewing the session token for the service account that runs the AccuRev service, otherwise trigger operations will fail. To do so, reissue the persistent login command login -n for the service account.
Member AcUtils.AcStreams.initAsync (AcDepot depot, string listfile=null)
The following XML attributes from show -fx -p <depot> streams may exist depending on the version of AccuRev in use. They are used internally by AccuRev and are not intended for customer usage. Micro Focus incident #3132463.
  • eventStream: Efficient way to determine if the server process needs to fire the event trigger processing.
  • eventStreamHWM: Used by GitCentric to track the high watermark for synchronization.
  • hasProperties: Efficient way for the GUI to determine if the property icon is displayed in the StreamBrowser.
Member AcUtils.AcUser.initGroupsListAsync ()
Unlike the show command used here, its show -fx -g <group> members counterpart does not include memberships resulting from indirect (implicit) membership.
Member AcUtils.ElementType

A defect exists where the XML elem_type attribute value can be the string "* unknown *".

(external)(elink) elements are grayed out in the Mac GUI and cannot be added to the depot. Defect 1101826.

Member AcUtils.Extensions.acxComment (this XElement element)
For promote transactions, the comment element above the first version element listed in the parent transaction is the transaction comment and not the version comment. Therefore in this case, when querying version elements, the first version element in the transaction is ignored and null is returned.
Member AcUtils.Extensions.acxRealNamed (this XElement version)
For promote transactions, the realNamedVersion attribute value in the transaction's first version element is the same in the second version element. Therefore, in this case the first version element is ignored and null is returned.
Member AcUtils.Extensions.acxVirtualNamed (this XElement transaction)
For promote transactions, the virtualNamedVersion attribute value is correct only in the first version element listed in the parent transaction. In all other version elements, the virtualNamedVersion attribute has the same value as its realNamedVersion attribute sibling. This falls under AccuRev defect 18636, RPI # 1107275.
Member AcUtils.StreamType
AccuRev is not consistent in its designation of stream types. The show streams command returns passthrough and normal while the server_admin_trig receives passthru and regular and the server_master_trig receives dynamic. We cover them all here in one enum.