AccuWork CLI Overview
The AccuWork CLI is implemented through a single command, accurev xml.
The xml command is a non-interactive general-purpose command dispatcher; it reads a specified file to determine the AccuRev operation — in this case, an AccuWork command — to be invoked. For example:
accurev xml -l mycmd.xml (“dash-ell” not “dash-one”)
Here, the xml command’s input comes from a file, mycmd.xml, which must contain an XML document. (The filename is irrelevant, and need not have a .xml suffix.) The XML document might contain this specification of an AccuWork query:
<queryIssue
issueDB="UserReportedBugs"
expandUsers="true">
21 == "rel2.0"
</queryIssue>
This example specifies the command, “find all issue records in depot UserReportedBugs whose value in field #21 (the targetRelease field) is the string rel2.0”. The results of an xml command are sent to standard output, also in the form of an XML document. For example, this query might retrieve two issue records, producing this output:
<issues>
<issue>
<issueNum
fid="1">2</issueNum>
<transNum
fid="2">3</transNum>
<targetRelease
fid="21">rel2.0</targetRelease>
<type
fid="7">defect</type>
... additional fields ...
<platform
fid="12">All</platform>
</issue>
<issue>
<issueNum
fid="1">3</issueNum>
<transNum
fid="2">26</transNum>
<targetRelease
fid="21">rel2.0</targetRelease>
<type
fid="7">enhancement</type>
... additional fields ...
<platform
fid="12">Linux</platform>
</issue>
</issues>
This output provides the correspondence between field-ID numbers (e.g. fid="21"
) and field-names (e.g. targetRelease
). This correspondence is important, since you must specify a query using field-IDs, not field-names (e.g. 21 == "rel2.0"
, not targetRelease == "rel2.0"
).