Comparing Team Developer .app, .apt,or .apl source file

Discussion forum about all things Gupta, OpenText and the community.
analiz
Turkey
Posts: 6
Joined: 09 Aug 2017, 13:59
Location: CYPRUS

Comparing Team Developer .app, .apt,or .apl source file

Post by analiz » 17 Dec 2018, 06:35

Hello Friends,

I wonder If anyone of you uses any compare tool to compare same apt-file of different versions.
I found one but it shows the difference of two files in binary form. I want something to show
me the difference in text format apt format.

Thanks & Regards
Mehmet

Dave Rabelink
Founder/Site Admin
Founder/Site Admin
Netherlands
Posts: 2912
Joined: 24 Feb 2017, 09:12
Location: Gouda, The Netherlands

Re: Comparing Team Developer .app, .apt,or .apl source file

Post by Dave Rabelink » 17 Dec 2018, 06:55

Hi Mehmet,

I'm using WinMerge to compare text files.
(opensource)

http://winmerge.org/?lang=en


It easily attaches itself to the Explorer context menu. So selecting two files in Explorer and start the compare like this:

WinMergeContextMenu.png

This will open the files and show the differences:

WinMergeCompare.png

We also use SVN (Tortoise). In there you can configure to use WinMerge as tool to compare.
Problem with TD source files is that the default text format is nearly unreadable when you want to see the logic of the code. It is all condensed without any indentation.

So we save our files in Indented Text format. Then when using WinMerge (see screenshot) shows the code like you expect, having the correct levels.

I also use WinMerge to copy changes from one source to another.

And forget app (normal format). Always use text format.
You do not have the required permissions to view the files attached to this post.
Regards,
Dave Rabelink

Image
Articles and information on Team Developer Tips & Tricks Wiki
Download samples, documents and resources from TD Sample Vault
Videos on TDWiki YouTube Channel

analiz
Turkey
Posts: 6
Joined: 09 Aug 2017, 13:59
Location: CYPRUS

Re: Comparing Team Developer .app, .apt,or .apl source file

Post by analiz » 17 Dec 2018, 10:00

Hello Dave,

That looks great.
Thank you very much.

Met

Igor Ivanovic
Site Admin
Site Admin
Croatia
Posts: 1257
Joined: 05 Mar 2017, 12:37
Location: Zagreb, Croatia

Re: Comparing Team Developer .app, .apt,or .apl source file

Post by Igor Ivanovic » 17 Dec 2018, 12:19

Dave Rabelink wrote:
17 Dec 2018, 06:55
So we save our files in Indented Text format. Then when using WinMerge (see screenshot) shows the code like you expect, having the correct levels.
I also use WinMerge to copy changes from one source to another.
I suppose the problems we had in the past (don't remember anymore what they were) with Indented Text files are all solved?
I really never checked Indented text format again but it is good to know that you are using it, so I can switch back :-)
As I am using SVN with TortoiseMerge it will be good to read the sources normally again.

Any specific reason you are using WinMerge and not TortoiseMerge?
Igor Ivanovic
Image

Dave Rabelink
Founder/Site Admin
Founder/Site Admin
Netherlands
Posts: 2912
Joined: 24 Feb 2017, 09:12
Location: Gouda, The Netherlands

Re: Comparing Team Developer .app, .apt,or .apl source file

Post by Dave Rabelink » 17 Dec 2018, 12:26

Igor Ivanovic wrote:
17 Dec 2018, 12:19
I suppose the problems we had in the past (don't remember anymore what they were) with Indented Text files are all solved?
Well, we did not find any issues since TD 6.0. All projects here are saved as indented text.

Igor Ivanovic wrote:
17 Dec 2018, 12:19
Any specific reason you are using WinMerge and not TortoiseMerge?
Not really. I'm used to WinMerge. But I will have a look at TortoiseMerge :)
Regards,
Dave Rabelink

Image
Articles and information on Team Developer Tips & Tricks Wiki
Download samples, documents and resources from TD Sample Vault
Videos on TDWiki YouTube Channel

Dave Rabelink
Founder/Site Admin
Founder/Site Admin
Netherlands
Posts: 2912
Joined: 24 Feb 2017, 09:12
Location: Gouda, The Netherlands

Re: Comparing Team Developer .app, .apt,or .apl source file

Post by Dave Rabelink » 17 Dec 2018, 12:39

Oh, by the way. The only files I save as normal format are generated ActiveX libraries (apl).
This is due to this defect:

viewtopic.php?f=26&t=45954


When I need to check differences between those apls, I temporarily save them as indented text and do the compare.
But never checkin the text formats.
Regards,
Dave Rabelink

Image
Articles and information on Team Developer Tips & Tricks Wiki
Download samples, documents and resources from TD Sample Vault
Videos on TDWiki YouTube Channel

EwaldP
Austria
Posts: 376
Joined: 07 Mar 2017, 08:00
Location: Austria

Re: Comparing Team Developer .app, .apt,or .apl source file

Post by EwaldP » 18 Dec 2018, 07:18

Hi,

I wonder why nobody suggests SQLWindows Visual Diff Tool (TMDTI63.exe)? I have no bad experiences with it.

Thanks for the tip with intended text. Due to problems for many years, I've never checked this option.

Ewald
Ewald P. Palmetshofer
EDV-Hausleitner GmbH
4020 Linz
www.edv-hausleitner.at

Dave Rabelink
Founder/Site Admin
Founder/Site Admin
Netherlands
Posts: 2912
Joined: 24 Feb 2017, 09:12
Location: Gouda, The Netherlands

Re: Comparing Team Developer .app, .apt,or .apl source file

Post by Dave Rabelink » 18 Dec 2018, 10:06

EwaldP wrote:
18 Dec 2018, 07:18
Due to problems for many years, I've never checked this option.
Are there specific issues you encountered?
My experience is that due to the huge amount of sources (containing all kinds of source structures varied from small to really huge sizes) I have never seen corruptions or other crippling effects.
But maybe you encountered specific cases, which I would like to check.

One rule though I never break: i save all sources in the used TD version. When porting to a newer major TD version every file is converted to that TD version file format (text).
I never mix TD versions on source level.
EwaldP wrote:
18 Dec 2018, 07:18
I wonder why nobody suggests SQLWindows Visual Diff Tool (TMDTI63.exe)?
Well, I tried it but found it much less powerful than most of the free compare tools out there.
For one, it only compares sources within the same TD version.
Mostly, when we branch, we need to copy the changes from one product version to another which is most cases are in different TD versions.
(and in TD 7.x the older TD version sources are converted).

Also, not everything is visible in the TD compare tool. There is hidden stuff which is not visible in the outline view and only on text level.
For one, we would like to see the comments and documentation within the sources which could be changed but also contains JIRA case numbers for specific code changes.
It is hard to filter out only those changes using the TD tool without them being displayed in the tool.

The "compare by selecting files in explorer" feature is also one of the main advantages of the other free tools. They display the differences using color coding and offer much more display options all together.

And not forget the "merge" features. When copying code changes from one branch to another, the free tools are very precise in copying only those parts which are relevant.
I never copy changes manually from one source to another, I use a tool which makes forgetting changes or incomplete copies much more visible.
Regards,
Dave Rabelink

Image
Articles and information on Team Developer Tips & Tricks Wiki
Download samples, documents and resources from TD Sample Vault
Videos on TDWiki YouTube Channel

EwaldP
Austria
Posts: 376
Joined: 07 Mar 2017, 08:00
Location: Austria

Re: Comparing Team Developer .app, .apt,or .apl source file

Post by EwaldP » 18 Dec 2018, 13:10

Hi Dave,
thanks for the clarification. Regarding the intended text format, I can remember that we had huge problems in TD 1.1.2 AND TD 1.5.1. Like Igor, I didn't consider using it again later.

Ewald
Ewald P. Palmetshofer
EDV-Hausleitner GmbH
4020 Linz
www.edv-hausleitner.at

Jeff Luther
Site Admin
Site Admin
United States of America
Posts: 2368
Joined: 04 Mar 2017, 18:34
Location: Palm Springs, California

Re: Comparing Team Developer .app, .apt,or .apl source file

Post by Jeff Luther » 18 Dec 2018, 21:04

Few thoughts for this thread:

RECOMMENDATION: I have used Beyond Compare from ScooterSoftware for years: http://www.scootersoftware.com/
and think it's great for comparing text files. I've attached a shot of a partial diff for 2 different versions of TD.

Note the "Show Differences" prompt top of the image. That's one of the options; show differences only with a couple lines of same text before/after the diff. It helps to show the context of the diff.

Re Indented text: I seem to recall, ages ago, about problems with this text format, and I save all files as Text with an APP extension. (Maybe what I recall is that if the indenting changes somehow, TD gets out of sync with how far in a given line in the file should be? With '.head X' at the beginning of each line in my attached image, the X shows the indent level. The '-' or '+' after the X shows whether the next line is further indented or not.
You do not have the required permissions to view the files attached to this post.
Jeff Luther @ PC Design
Palm Springs, California
TD info. & samples: http://www.jeffluther.net/TD/

analiz
Turkey
Posts: 6
Joined: 09 Aug 2017, 13:59
Location: CYPRUS

Re: Comparing Team Developer .app, .apt,or .apl source file

Post by analiz » 19 Dec 2018, 14:49

Hi Dave,

Saving in 'intended text' format also decreases the number of KB's.
But my question is when I click SAVE by default, It is saved in the text format,
Is there an option to make 'intended text' format default when I click SAVE.

Thanks a lot.

Met

Igor Ivanovic
Site Admin
Site Admin
Croatia
Posts: 1257
Joined: 05 Mar 2017, 12:37
Location: Zagreb, Croatia

Re: Comparing Team Developer .app, .apt,or .apl source file

Post by Igor Ivanovic » 23 Dec 2018, 10:15

Met,

I always thought that when you save you source in one of the formats that subsequent saves would save it in that format, but I just tested it and found out I was wrong.
If I load a file saved as indented text and save it, it is saved in text format.
So, is there a way to force a save in a particular format?
Igor Ivanovic
Image

Dave Rabelink
Founder/Site Admin
Founder/Site Admin
Netherlands
Posts: 2912
Joined: 24 Feb 2017, 09:12
Location: Gouda, The Netherlands

Re: Comparing Team Developer .app, .apt,or .apl source file

Post by Dave Rabelink » 23 Dec 2018, 14:56

Strange..
This is not the case here.
(it would be very irritating if that would be the case. But we use indented text for years and never see this happen)

The original saved format is kept when pressing save.

The only situation when you save a new file. It is saved in the default format defined in the template.

Which TD version are you talking about? Maybe there is a specific version which has this issue.
Regards,
Dave Rabelink

Image
Articles and information on Team Developer Tips & Tricks Wiki
Download samples, documents and resources from TD Sample Vault
Videos on TDWiki YouTube Channel

Igor Ivanovic
Site Admin
Site Admin
Croatia
Posts: 1257
Joined: 05 Mar 2017, 12:37
Location: Zagreb, Croatia

Re: Comparing Team Developer .app, .apt,or .apl source file

Post by Igor Ivanovic » 24 Dec 2018, 09:08

I tested it again and it does work as it should ie. keeps the last saved format.

But, if you open two instances of TD, one with a file with indented text and the other with text, when you save the first file it gets converted to text.
That was the case I was having. Weird.
Opening only files with indented text and saving them preserves the format.
Igor Ivanovic
Image

wardies
Great Britain
Posts: 91
Joined: 21 Mar 2017, 10:44
Location: UK

Re: Comparing Team Developer .app, .apt,or .apl source file

Post by wardies » 24 Jan 2019, 17:16

It's because the default in the Save as type box corresponds to the type of the last library loaded in the outline.

For example, if you load an indented text APP that includes the following libraries:

File Include: test1.apl ! saved as indented text
File Include: test2.apl ! saved as APT text format

Then when you Save As... it will default to APT text, because that's the format of the last library loaded.

This is the way it has always worked since we noticed it in TD 1.1.2 when we switched from binary to Text.

[Edit]: And yes, as I see you already discovered...
The solution is simply to ensure all your loaded libraries are also saved in the desired format.

Return to “General Discussion”

Who is online

Users browsing this forum: [Ccbot] and 0 guests