Forum Discussion

ANW's avatar
ANW
Contributor
14 years ago

Version-controlling TestComplete in git

Now this is not as much as question regarding TC itself, but more some help from others if they have used Git for version controlling TestComplete.



I have some problems seeing changes in git gui and gitk for my .sd files. git keeps assuming they are binary files, and thus I can't see changes in the file. The thing is that it can easily understand that f.x. my .tcTas, .pjs, .pjs.tcLS files etc. are text files, and can show me the changes.



Now I am by no means a git expert (it confuses me a lot), but from what I can gather through Google, is that others who have this problem, seem to have those files in UTF-16 format instead of UTF-8. Are the .sd files stored in UTF-16? ... or do I need to look elsewhere for a solution?



I have tried using the attributes file for git, to try and force it to read the .sd files as Text, but that haven't worked either.



Any ideas would be more than welcome, or I might have to consider using a different Source Control System than all the developers use. I would prefer to use the same as the rest of the company.



Thanks in advance
  • ANW's avatar
    ANW
    Contributor
    Hmm .. it seems there is a property on the Project where the encoding can be set. It is Auto by default, and this apparently does not save the .sd files as UTF-8 (but all other files are?).



    Once I set this to UTF-8 for all my projects and changed each .sd file and re-committed them into Git, it can now read them as text files.
  • j416's avatar
    j416
    Occasional Contributor
    Hi Anders,



    Found your post through googling, I ran in to a similar problem where some TC scripts ended up mangled. Our version control system also assumes the .sd-files to be binary. The reason (at least in our case), is that the files are saved using UTF-16 little endian encoding, and the version control system assumes UTF-8 by default.



    Changing the script format from "Auto" to "UTF-8" solved all problems.





    Thank you for confirming that you experienced the same thing.



    Johan