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:
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:
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:
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").