Can you please advise if there's a way to use a CLI command to copy down files from AccuRev associated to a given issue number?
1 Answers
There isn't a single command to accomplish this, but the information is readily available. You can run a command like "accurev cpkdescribe" to find out what files and versions are currently part of a Change Package:
c:\AccuRev\bin>accurev cpkdescribe -p Support -I 2111
Issue: 2111
/com.accurev.ide.common/src/com/accurev/ide/common/parsers/AccuRevHandler.java 52/1 2/1
/com.accurev.ide.common/src/com/accurev/ide/common/parsers/ShowUsersParser.java 52/1 2/1
/com.accurev.ide.common/src/com/accurev/ide/common/process/ElementProcess.java 52/1 2/1
/FileLister/FileLister.java 52/1 38/1
/RemoveSCC/AssemblyInfo.cs 52/1 38/1
/FileLister/W2L-Installation.txt 52/1 0/0
/FileLister/W2L-README.txt 52/1 0/0
/RemoveSCC/W2L-Installation.txt 52/1 0/0
/RemoveSCC/W2L-README.txt 52/1 0/0
You can even run this with -fx to retrieve the information in xml format. You then parse that output for the file name (location attribute) and version (real_version attribute or the first version from the non-xml output) and pass it into an "accurev pop" command.
It's actually quite simple in practice and can easily be made into a basic script which takes the depot name and issue number as parameters and pops to a specific location. The accurev command-line is very flexible so you can explore these options as necessary...
Hope this helps, ~James

- 1,158
- 6
- 7