4. XML Output Reference : hist Command

hist Command
Displays the part or all of the transaction history of one or more elements. See hist on page 122 for more information.
<?xml version="1.0" encoding="utf-8"?>        XML declaration
<AcResponse        root element of the XML output
    Command="hist"        the name of the AccuRev command
    TaskId="1037">        the ID of the task associated with the command
  <element        a list of one or more elements returned for certain transactions. See below for details.
      name="/outline.txt"        the element location and name
      id="2">        the element ID
    <transaction         a list of transactions for this element. See below for details
        id="3"        the transaction ID
        type="add"        the transaction type. See below for details
        time="1407174305"        the transaction time in Epoch time
        user="dfoster">        the name of the user who executed the transaction
        streamName="phoenix_n"  stream name in which the transaction occurred (promote only)*
        streamNumber="1"        the number of the stream (promote only)*
        fromStreamName="phoenix_n_dfoster"  the name of the source stream (promote only)*
        fromStreamNumber="2">  the number of the source stream (promote only)*
        cpk="add">    type of change package action (if applicable). values are "add" and "remove".*
      <comment>new file</comment>    comment associated with the transaction*
      <version  a list of versions for this transaction. See below for details.
          status="(member)"    element status (appears with -fs)*
          virtual="2/1"    element virtual version (stream ID/version in stream)*
          real="2/1"    element real version (stream ID/version in stream)*
          virtualNamedVersion="phoenix_n_dfoster/1"    See below for details*
          realNamedVersion="phoenix_n_dfoster/1"    See below for details*
          elem_type="text"  element type: dir, text, binary, ptext, elink, slink. See below for details
          dir="no"  whether or not the element is a directory; not displayed for dispatch transactions*
          ancestor="2/2"    ancestor stream ID and version; not displayed for purge or eacl
                                                                   commands*
          ancestorNamedVersion="wf1_update_testuser/2"   ancestor stream ID and
                                                                                                                                         version; not displayed for
                                                                                                                                         purge or eacl commands*
          merged_against="2/2"    merged against stream ID and version; not displayed for
                                                                                 purge or eacl commands*
          mergedAgainstNamedVersion="f1_update_testuser/2"  merged against
                                                                                                                                                stream name and
                                                                                                                                                version; not displayed
                                                                                                                                                for purge or eacl
                                                                                                                                                commands*
          new_revert="yes"    internal use only. indicates whether or not the reverse patch
                                                                        algorithm was used*
          target_eid="2"      for elinks, the ID of the element to which this element is linked*
          target_name="no"    for elinks, the ID of the element to which this element is linked*
          sz="17">    version element size, in bytes; displayed only if version attribute dir="no"*
      </version>
    </transaction>
  </element>
  <streams>    a list of all the streams and workspaces whose IDs are included in the <version>
                                    information for an element
    <stream
        id="2"    stream ID
        name="phoenix_n_dfoster"    stream name
        type="workspace"/>          stream type. values: normal, workspace, snapshot, gated,
                                                                                      staging, passthrough
  </streams>
</AcResponse>
Additional Information
This section provides additional information for some of the child elements of <AcResponse> in the XML output for the hist command.
<element>

The
hist command returns a list of one or more elements only for the following transactions types:
promote, demote, defunct, undefunct, move, add, co, keep, purge, defcomp, eacl, dispatch
If there is no history associated with the specified element, AccuRev returns:
<Message>No history corresponding to selection.</Message>
<element>
        <transaction>

If the transaction type is not one supported by the
hist command, AccuRev returns:
<Message>No such transaction: -3.</Message>
<element>
        <transaction>
                <stream>

The
<stream> child element of the <transaction> element is displayed in the XML output for mkstream, chstream, and defcomp transactions.
If the transaction was mkstream or defcomp, the XML output for <transaction> includes the <stream> child element with the following attributes. For example:
<transaction
  <stream
      name="dev"        
stream name
      streamNumber="3"        stream number
      depotName="phoenix_n"        depot in which stream was created
      type="normal"        stream type. values: normal, workspace, snapshot, gated, staging,
                                                                 passthrough
      basis="phoenix_n"         name of the stream’s basis stream
      basisStreamNumber="1"/>         number of the stream’s basis stream
  </stream>
 
If the transaction was chstream, the following attributes are added to the <stream> child element. For example:
<transaction
  <stream        
same attributes as those returned for mkstream and defcomp transactions, plus:
      prev_name="dev"        the stream’s previous name
      time="0"        for time-based streams, basis time in Epoch time
      prevTime="0"        for re-set time-based streams, previous basis time in Epoch time
      prevBasis="phoenix_n"        name of the stream’s previous basis stream
      prevBasisStreamNumber="1">        number of the stream’s previous basis stream
      prevHidden="true">       if the stream was previously hidden (values are "true" and "false")
  </stream>
 
Note: The type= attribute for the <transaction> element returns "chstream" for chws commands executed on workspaces.
<element>
        <transaction>
                <stream>
                        <wspace>

If the
mkstream or chstream command was executed against a workspace, the <wspace> child element appears under <stream>. For example:
<transaction
  <stream        
      ...
    <wspace
        Storage="C:/feenix_n/workspaces/phoenix_n"   
workspace storage location
        Host="con-davidf-e6410"        the name of the computer that hosts the file system
                                                                                              on which the workspace is located
        Target_trans="11"        the most recent transaction at the time of the workspace’s
                                 most recent update
        fileModTime="1407248340"        the time of the last update or stat in Epoch time
        EOL="0"        end-of-line character: 0=OS default; 1=force UNIX; 2=force Windows
        Type="1"/>   workspace type: 1=full workspace; 9=exclusive locking; 17=anchor required
  </stream>
        <transaction>
                <version>

A list of one or more versions in the transaction.
The elem_type attribute displays the element type. Values include dir, text, binary, ptext, elink, and slink. It is not displayed for the dispatch transactions. For example:
    <version
        ...
        elem_type=
"text"        values include dir, text, binary, ptext, elink, slink
        ...
If the transaction was move, the XML output for <version> includes the following (for example):
<move
      dest="\.\subdir1\subdir11\foo.c"        
destination and element name of the move
      source="\.\subdir1\subdir11\foobar.c"/>    source and element name of the move
If you use v option with -fx, the XML output for <version> includes, for example:
    <version
        path="\.\outline.txt"
 element name and location in workspace
        eid="2"               element ID
        mtime="1407524402"    version modification time in Epoch time; displayed only if dir="no"
        cksum="2514403315"    version element checksum; displayed only if dir="no"
         <eacl                element access control list
           action="set"              eacl action; values are "add", "remove", and "set"
           <ace                      a list of all ACEs for this element
              principal="all"        values are "all", "<user_name>", and "<group_name>"
              privilege="all"/>      values are "all", "none", and "clear"
        </eacl>
        <transaction>
                <version>
                        <patchSegment>

Patch segments are displayed in the XML output only if the transaction type is not
purge and the element has no ancestor. There can be multiple <segment> child elements. For example:
    <version
           ...
           
<patchSegments>        displays patch segments
             <segment        displays patch segment details
                 head_stream="5"       segment head stream ID
                 head_stream_name="whmp2_testuser"      segment head stream name
                 head_version="2"         segment head stream version
                 basis_stream="5"         segment basis stream ID
                 basis_stream_name="whmp2_testuser"     segment basis stream name
                 basis_version="1"         segment basis stream version
                 is_tip_version="yes"/>         segment is a tip version ("yes" or "no"
           </patchSegments>
        <transaction>
                <version>
                        <revertSegment>

Revert segments are displayed in the XML output only if the transaction type is not purge and the element has no ancestor. There can be multiple <segment> child elements. For example:
    <version
           ...
           
<revertSegments>         revert segments
             <segment        displays revert segment details
                 head_stream="5"       segment head stream ID
                 head_stream_name="whmp2_testuser"      segment head stream name
                 head_version="2"         segment head stream version
                 basis_stream="5"         segment basis stream ID
                 basis_stream_name="whmp2_testuser"     segment basis stream name
                 basis_version="1"         segment basis stream version
                 is_tip_version="yes"/>         segment is a tip version ("yes" or "no")
           </revertSegments>
        <transaction>
                <comp_rule>

The
<comp_rule> child element appears for the <transaction> element if one of the following include/exclude rules was applied to the element: clear, excl, incl, incldo. Displays attributes for cross-linked elements if applicable.
<comp_rule
          kind="incl"         
type of rule: clear, excl, incl, incldo
          xlinkStreamNum="4"         the ID of the stream to which the element is cross-linked
          xlinkStreamName="hist2"   the name of the stream to which the element is cross-linked
          prevXlinkStreamNum="2"         if include rule was reset, the ID of the previously
                                                                                                  cross-linked stream
          prevXlinkStreamName="hist2a"/>  if include rule was reset, the ID of the previously
                                                                                                     cross-linked stream

In addition, when an include/exclude rule is in force, the value of the
type= attribute for the <transaction> element displays "defcomp" (short for "define component"), as shown here:
    <transaction
        id="3"
        type="defcomp"     
"defcomp" displayed when clear, excl, incl, or incldo rules are in force
        time="1407174305"  time of the transaction in Epoch time
        ...
<element>
        <transaction>
                <issues>

The
<issues> child element appears for <transaction> if you are using change packages (CPK) to promote elements. The <issues> child element can have multiple <issue> child elements.
<issues>        displays change package issues
  <issue>        displays issue details
    <issueNum    the AccuWork issue number; attributes used for third-party ITS, if any,
      thirdPartyName="MyJiraKey"    the name of the third-party ITS key field, if any,
      thirdPartyValue="J1003">4</issueNum>    the attribute is the third-party key value
      <elements>     elements in the change package; there can be multiple <element> child elements
        <element         element details
            eid="5"        element ID
            member="1"        element member number
            head_version="5/4"        element head version
            basis_version="5/3"        element basis version
            name="Access denied"/>        change package name; displays "Access denied"                                                                                                      if the user executing hist command lacks
                                                                                                     sufficient rights
      </elements>
  </issue>
</issues>

Borland