0

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?

  • After some searching, we discovered that our Code Editor, Test Design Studio, is encoding the files in UTF 16 Little Endian, instead of UTF 8, and that's why Accurev would not recognize the file as text... We're trying to find a way to force the encoding... – cimonfortierg Mar 05 '15 at 18:51

2 Answers2

1
  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.

jstanley
  • 2,087
  • 15
  • 22
  • Command seems to be working nicely... I'll have to wait for tomorrow to execute it on the whole project. For the pre-trigger, will it execute on server, or per Project/stream? or can it be set locally? considering we are a big company and there are a lot of people using Accurev, I would not like to affect other projects than mine. (I'll relay this information to our Accurev Team) – cimonfortierg Mar 04 '15 at 20:36
  • The trigger is set per depot, using the mktrig command. This is a client side trigger, so each one of your clients will need to have access to this script from their machines. For more information regarding the triggers, you can check out section "10. AccuRev Triggers" in the admin manual found under "accurev install dir/doc". – jstanley Mar 04 '15 at 20:59
0

Check the files with a hex editor to see if there are any non-ASCII characters.

If there's binary content in the file AccuRev will see those files as binary.

Overwrite the keep as jstanley suggested to change the type.

On the add use "accurev add -E ptext -c "your favorite comment" file.vbs

David Howland
  • 402
  • 2
  • 3