intersystems-community / cache-tort-git

Access to Tortoise Git interface from Caché Studio
https://github.com/intersystems-ru/cache-tort-git/wiki
MIT License
31 stars 20 forks source link

Git holds xml instead of actual code #34

Open syonip opened 8 years ago

syonip commented 8 years ago

This makes it really hard to view diffs on the code. Is there any way to make the actual class files be saved to git, instead of the xml representations?

Thanks, Jonathan.

adaptun commented 8 years ago

Hi Jonathan.

There is Caché class %Compiler.UDL.TextServices that supports export/import of classes in text format.

That would be major change in cache-tort-git to export in text format instead of XML. Currently all I do is call $system.OBJ.Export/$system.OBJ.Load for any (class, routine, inc) item. For text format I would have to handle different cases, depending on item type.

Given that Atelier (new Eclipse-based Studio) is already in beta testing, I don't think cache-tort-git will support export/import in text format.

Regards, Alexander.

adaptun commented 8 years ago

this is basically copy of #8

syonip commented 8 years ago

Thanks Alexander. Can you recommend some workaround I could implement, let's say just for CLS files, to convert the xml to cls?

adaptun commented 8 years ago

I don't think there is an easy workaround.

You might try to check simple source control class: https://github.com/intersystems-ru/cache-source-control

It also uses XML as import/export format.

You might try to replace $$Export^%occXMLExport and $$Import^%occSAX(filename,"fv-d-l") to methods SetTextFromFile, GetTextAsFile of %Compiler.UDL.TextServices. But again -- you'll need to check that you are doing this only for classes

syonip commented 8 years ago

Thank you I will take a look.