accurev hist [ -t <transaction-range> ] [ -s
<stream> ] [ -c
<comment> ]
[ -u
<principal-name> ] [ -k
<transaction-kind> ] [ -f
<format(s)> ]
{ -a |
<element-list> | [ -Fx ] -l
<list-file> | -e
<eid> }
[ -p
<depot-name> ]
The hist command displays the part or all of the transaction history of one or more elements. For each transaction, it reports the creation time, who made changes, comments for each version, etc. For each version involved in a transaction, it reports the virtual version, the real version, the transaction number, the transaction time, who created the version and how, and the comment.
-e: (“expanded”) Display more detail for
promote transactions: information on the transaction(s) in the current workspace (
keep,
move, etc.) that recorded the change(s) being promoted.
-i: ("issue") Display issues related to a version of an element at the time of the specified transaction. If a version is not currently the head of an issue, but was at the time of the transaction, the issue is displayed with an attribute
historic_only=true. This attribute is not displayed if the version is currently the head and was also the head at the time of the transaction.
-v: (“verbose”) For
keep and
add transactions, include the modification time, checksum, file size, data type (text or binary), and
depot-relative pathname.
cpk transactions are listed as add or remove, followed by details of the
cpk add or
cpk remove operation.
(You can use
-fev to display both expanded and verbose information.)
-l: (“list”) For each transaction, show only the path of the element. For
move transactions, only the destination is shown.
-s: (“status”) If the displayed version of the element is in the default group of the stream specified with
-s (default: workspace stream), list it with “
(member)”. This option is intended to be used in combination with
-t, when you’re examining a transaction listed by
translist.
-t: (“transaction”) Display just the header line, including the transaction number.
-x: (“XML”) Display results in XML format.
Signals that <list-file> (see the
-l option) is an XML-format file, not a flat text file. Example:
<transactions>
<id>1</id>
<id>6</id>
</transactions>
Process the elements listed in <list-file>. This must be a text file, with one element name per line. Extra whitespace is not allowed; make sure there are no empty lines and no leading or trailing white space around the filenames. Wildcards are not expanded. There is no provision for comment lines in the file.
Display only the transactions of the specified kind. Valid values are:add, archive, chstream, co, compress, defcomp
defunct, dispatch, keep, move, mkstream
purge, stream, unarchive, undefunct
-t <time-spec>[ .
<count> ]
-t <time-spec> - <
time-spec>[ .<
count> ]
The second form specifies transactions that took place in the specified interval; the optional suffix truncates the listing after the most recent
<count> transactions. You may need to use quotes in composing the argument following
-t; the entire argument must be interpreted by the command shell as a single token. You cannot use the
now or
highest keyword in the interval specification. The command output depends on the order of the time-specs; list the most recent time-spec first to show the results in order from most recent to least recent. Reverse the order of the time-specs to reverse the order of the output.
•
|
Time in <YYYY/MM/DD HH:MM:SS> format: e.g. 2007/08/07 20:27:15. Note that you might need to use quotes in composing the argument following –t; the entire argument must be interpreted by the command shell as a single token.
|
Specifying the Transactions
By default, hist displays the entire transaction history of the element(s), or of the entire depot. The various forms of the
-t option restrict the display to a single transaction, or to a range of transactions. Each variant involves one or two
time-specs. A single time-spec means “the transaction that took place at this time” or “the most recent transaction that took place before this time”. Two time-specs define an interval;
hist reports all the transactions in the interval that involve the element(s) you’ve specified.
Display all the transactions for element base.cc that involved stream
gizmo_test:
Display information on the most recent promote transaction, including the
keep transactions that preceded it:
> accurev hist -t now -k promote -fe
transaction 113; promote; 2007/02/19 17:55:55 ; user: john
\.\src\brick.h 13/2 (16/2)
# add RIVER
version 16/2 (16/2)
ancestor: (16/1)
# remove ALLOCSIZE
version 16/1 (16/1)
ancestor: (15/1)
Version 4.7.2 of AccuRev introduced a <stream> element as a child of the
<transaction> element in the XML output. This new element contains more information on changes to streams and include/exclude rules.
Important! If you have been parsing the XML output from the hist command, you will need to check that you are getting the correct
<stream> tag, since that tag now appears within both the
<transaction> and the
<streams> tags. The content of the new
<stream> tag will vary depending on the AccuRev command recorded in the transaction.
Display issues related to a version of an element at the time of promote transactions, and format the output in XML. Note the
historic_only tag at the end, indicating that the version is no longer the head, but was at the time of the transaction.
> accurev hist -fix -a -k promote<AcResponse
Command="hist"
TaskId="1032">
....
<transaction
id="11"
type="promote"
time=""
user="testuser1">
<version
path="\.\file_0003"
eid="4"
virtual="2/2"
real="4/2"
virtualNamedVersion="s22245/2"
realNamedVersion="ws22245_1_testuser1/2"
elem_type="text"
dir="no">
<issueNum>2</issueNum>
</version>
</transaction>
<transaction
id="9"
type="promote"
time=""
user="testuser1">
<version
path="\.\file_0003"
eid="4"
virtual="2/1"
real="4/1"
virtualNamedVersion="s22245/1"
realNamedVersion="ws22245_1_testuser1/1"
elem_type="text"
dir="no">
<issueNum
historic_only="true">2</issueNum>
Display all AccuWork ("dispatch") transactions in XML format, using verbose mode. Note that any
cpk add and
cpk remove transactions are flagged in the XML output with "
cpk=" attributes in the
transaction tag.
<AcResponse Command="hist"
TaskId="1036">
<transaction
id="16"
type="dispatch"
time=""
user="testuser1"
cpk="add">
<issues>
<issue>
<issueNum>3</issueNum>
<elements>
<element
eid="2"
member="1"
head_version="4/2"
basis_version="0/0"
name="/file_0001"/>
</elements>
</issue>
</issues>
<streams>
<stream
id="4"
name="ws22245_1_testuser1"
type="workspace"/>
</streams>
</transaction>
<transaction
id="15"
type="dispatch"
time=""
user="testuser1"
cpk="remove">
<issues>
<issue>
<issueNum>3</issueNum>
<elements>
<element
eid="2"
member="0"
name="/file_0001"/>
</elements>
</issue>
</issues>
</transaction>