Closed wilmargh closed 7 years ago
It means that on line 1458 the processing of the accurev info
command failed to find the string DB Encoding:
. Can you run the accurev info
command and post the output here? Remember to redact any sensitive information, but please leave the general structure and Accurev fields as they are.
The solution will be to change the dictionary element access from the []
to use the .get()
like we do on line 1463 which should make the script assign the value None
to the variable when this field is missing. This field has no use in the rest of the script so it should be safe to ignore using the change described..
Thanks - first, let me say thanks for your generosity in taking the time to help. I appreciate it very much. The .get() fixed it as you said. The problem now is that it's not finding the Accurev stream. We are now entering an area where the problem is that I don't really understand Accurev very deeply. (We use it only for basic source control, and are now just trying to get away from it). So I'm not sure what to tell ac2git to do.
Anyway, here's accurev info:
And here's the latest log:
And here is a view of the streams. One issue could be (?) that I don't have permissions to access the _PRD stream. I don't care about that, but maybe ac2git does. ?? I only care about the _G_wilmar stream.
If you only care about one stream then you should use the configuration file to specify only the stream you're interested in. The script is able to autogenerate an example config file for you, and this is documented in the help:
./ac2git.py --help
The example config file is in XML and will have a lot of comments explaining its different options.
The script definitely assumes you have permission to access all the streams. If that's not the case, you will want to restrict it to only process some of the streams. This is done in the config file.
You will be interested in the <streams>
section where you'll need to specify only the streams that you want the script to process and convert to Git.
Thanks. I did specify a single stream in the config file. ac2git can't find that stream. Here's my config file:
From the screenshot you gave us earlier it seems to me like this stream is actually a workspace. Also, it seems like there is different capitalization in the stream name in the config file. IIRC Accurev stream names are case sensitive. You have:
<stream>sym_bidm_int_G_wilmar</stream>
in the config file and from what is shown in the screenshot the stream name should be:
<stream>sym_BIDM_INT_G_wilmar</stream>
Would you mind trying that and posting any errors that show up?
You can prove this by trying the following two accurev commands:
accurev show streams -s "sym_bidm_int_G_wilmar"
which should fail, and return no streams.
accurev show streams -s "sym_BIDM_INT_G_wilmar"
which should succeed and print some information about your workspace, if I'm right.
Side note:
In your configuration file you specify that you wish to exclude workspaces from processing with the <stream-list exclude-types="workspace">
line. However, this code seems to ignore the exclusions when streams are explicitly specified, like what you have. Regardless, you could remove or comment out the exclude-types="workspace"
part of the config file.
@wilmargh do you have any updates on this issue? If it has been resolved, can you please close it?
Hi - thanks.! It worked and I was able to create the Git repository from Accurev. All I had to do was fix the case in the stream list in the config file. (I should have thought of that!)
Glad we could help. Thanks for letting us know about the problem and working through it with us.
KeyError: 'DB Encoding'
?? What does this refer to?