AcclaroDev
AcclaroDev

Reputation: 21

git: handling gupta apl files with git-extensions and WinMerge (encoding issues)

I'm using git extensions for easy git functionality. I was trying to use it for old gupta code. In the files is a lot of binary and meta data:

[...]
.head 7 +  On cAM_F3
.head 8 -  Call c_fktToggleButtonPerson( )
.head 5 +  Pushbutton: pbPersonAG
.data CLASSPROPSSIZE
0000: 2400
.enddata
.data CLASSPROPS
0000: 5400610062004300 680069006C006400 4E0061006D006500 73000000FFFE0200
0020: 00000000
.enddata
[...]

However it works kinda well. I added *.apl diff to .gitattributes so git extensions shows me the changes properly. Though I noticed when doing merges and cherry-picks git doesn't care about the changes, just if it changed or not, which makes it a bit tedious. So it's still handling the files as binary.

So I learned the files encoding is ISO-10646-UCS-2 BOM according to WinMerge or UCS-2 LE BOM according to Notepad++. So I changed .gitattributes to *.apl diff working-tree-encoding=UCS-2 eol=CRLF and ignored the warning that git actions will take longer since it's now converting the files. The first changes on those files contain "remove everything and rewrite everything" probably because it changes the encoding(?)

After that they look better before / after but WinMerge doesn't handle the encodings properly and for the first commit it handles it only for one half.

Doing diffs (which in gitextensions is done automatically before being able to commit) seem to take ages. I also noticed, that the IDE seems to have problems reading the changed files if I checkout other branches and go back afterwards.

I'm not sure if the extra waiting before commits is worth the potential of a better merge / cherry pick process. And I don't know if I can repair the files that broke.

Before I redo some of the work, I want to get some suggestions what I should do and what should I write in my .gitattributes? Should I use different tools?

Thanks in advance.

Edit: It seems git has an issue with converting the internal used UTF-8 to UCS-2. When trying to Reset certain uncommitted work, I sometimes get the error that git can't convert the file.

Upvotes: 0

Views: 215

Answers (1)

Steve Leighton
Steve Leighton

Reputation: 840

. You don't mention which version of Gupta TeamDeveloper your .apl files are built with.

But v7.1 onwards (7.1 could now be considered 'old' ), all come supporting Git out of the box. 1

Also, Gupta's own Team Object Manager is a great Repository tool that can ( amongst other things ) compare two or more SQLWindows (.apl, .apt, .app ) files and report the differences between them. It can also carry out merges of files with its subsequent versions, producing a final version containing the common code and three way modified areas from the merge participants.

If you're running a version prior to v7:

  1. You could (should) consider upgrading to at least v7.3
  2. Experiment with using TortoiseSVN which is a really easy to use Revision control / version control / source control. I used to use it on v4 .apls . Its based on Apache Subversion (SVN); TortoiseSVN provides a nice and easy user interface for Subversion. Go here: for TortoiseSVN

Upvotes: 0

Related Questions