Search code examples
recursionbinaryaccurev

Accurev binaries and recursive keep


My problem is in two parts:

  1. My team and I are using an Test Design Studio to write .vbs files in a Accurev Workspace. The problem is that Accurev recognize them as binaries instead text/ptext files... which causes problems when merging. Is there a setting in Accurev I can change to force it to recognize .vbs files as text/ptext?

  2. All those binaries that are already in the stream, I need solution to convert them all into text/ptext. I've given up on the Client UI, because it means I'd have to go in the Workspace explorer and go through every single folder, one by one, and keep those binaries. Then I thought of the commands. I tried

    2.1. accurev keep -c "keep ptext" -n -E ptext -R target_folder

    2.2. accurev keep -c "keep ptext" -n -E ptext -R .

    2.3. But I get a No Element Selected. That's because the "-n" flag is required for recursive, but it means it'll ignore non-modified files... and most of my files are backed and not modified... otherwise I can't even select the directory for keeping (I'll report "can't keep a directory"). I could create a file-list, but it would take as long as manually keeping all the files one by one. I also tried if I could work directly in the stream (since it has another empty stream above, it lists all it's files as outgoing), but I do not have the keep option in the stream. Is there an easy way to convert all files in stream/workspace as text/ptext?


Solution

    1. Yes, you will need to enable a pre-create-trigger using the elem_type.pl script found in "accurev install dir/examples" on your server. Inside the elem_type file, you will see the directions for setting this trigger.

    2. Yes, run the following command to generate a list of all the files in your workspace.

    "accurev stat -a -ffl > list.txt"

    Then run the this command to convert the files to ptext:

    "accurev keep -c "ptext conversion" -E ptext -l list.txt"

    Then you can promote those files.