cache-tort-git icon indicating copy to clipboard operation
cache-tort-git copied to clipboard

Git holds xml instead of actual code

Open syonip opened this issue 9 years ago • 5 comments

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.

syonip avatar Jan 18 '16 10:01 syonip

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 avatar Jan 18 '16 11:01 adaptun

this is basically copy of #8

adaptun avatar Jan 18 '16 11:01 adaptun

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

syonip avatar Jan 18 '16 11:01 syonip

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

adaptun avatar Jan 18 '16 11:01 adaptun

Thank you I will take a look.

syonip avatar Jan 18 '16 11:01 syonip