Wikis - Page

How can I retrieve an AccuWork issue attachment from the cli.

0 Likes

PROBLEM/ABSTRACT:
How can I retrieve an AccuWork issue attachment from the cli?

SOLUTION:
The xml format of an AccuWork issue will show you the names of the files that are attached to the issue record as well as a storage id for each attachment. Here is some sample xml output that I cut and paste from an "accurev issuelist" command:

<acResponse>
<issues>
<issue>
<issueNum
fid="1">2111</issueNum>
<transNum
fid="2">152</transNum>
[?]
<Attachments
fid="33"><attachment>
<name>sample.doc</name><userNum>1</userNum><date>1148492716683</date><fileSize>23040</fileSize><originalFileName>AccuRev vs.doc</originalFileName><comment></comment><StorageID>504</StorageID></attachment></Attachments>

[?]

</issue>
</issues>
</acResponse>

The name and StorageID can then be used in the command

accurev getstorage -p depotname -s StorageID -l .\name

to get the contents of the file and store them in the current directory with the name provided. You can put in a complete path instead of "." to have the files written to any location on disk that you would like.

Using the above xml output as an example, you would run the command

accurev getstorage -p sample_depot -s 504 -l C:\temp\sample.doc

to get the attached sample.doc file and put it in C:\temp.


For more information contact AccuRev Support.

Comment List
Related
Recommended