Solved

How is code history in templates supposed to work?

  • 9 July 2019
  • 1 reply
  • 114 views

Userlevel 4
Badge +4
I am confused on the workings of code history tab on control procedures - templates. The workings seems to differ from one version to another. The way I would expect it to work is like this:

The template is created in the trunk, amended in the trunk a day later. The next day a branch is created and the template is amended in the branch. And the next day it is merged back to the trunk.

trunk - create the template on 2019-1-1 in version 1.00
trunk - amended the template on 2019-1-2 in version 1.00
branch - amended the template on 2019-1-3 in version 1.00 (branch)
trunk - merged the branch back to the trunk on 2019-1-4 in version 1.10


now in the trunk I would expect the following in the code history:
insert - trunk - 1.00 - 2019-1-1
update - trunk - 1.00 - 2019-1-2
update - branch - 1.10 - 2019-1-4

and in the branch the following:
insert - trunk - 1.00 - 2019-1-1
update - trunk - 1.00 - 2019-1-2
update - branch - 1.00 - 2019-1-3

what i actually get after merging is this in the trunk history:
update - trunk - 1.10 - 2019-1-3

and this in the branch history:
update - branch - 1.00 - 2019-1-4

Can someone inform me on if my expectations are correct?
icon

Best answer by Anne Buit 25 July 2019, 08:43

Hi Erwin,

The way this history is recorded has changed a bit over time. When it comes to verison 2019.1 of the Thinkwise Platform, the code history is comprised of two types:
  • Plain history
  • Changelogs
Plain history shows every single update done to a template. This data is bound to the project version in which this change was done. If the project version is deleted, you lose the plain history. Copying a project version will not copy this history - changes would show up twice. When branching a project version, the plain history is not included.

There is one exception. When a changelog is created, the plain history is upgraded and will be preserved, copied to new versions and copied to branches.

This way, the important history is preserved and all the small changes to a template before a changelog was created will not be copied with project versions indefinitely.

So the way this works really depends on whether you use changelogs. But since the branch history had the changes done in the trunk present in the history, I think it is safe to assume changelogs were used. I'll assume the update done in the branch was accompanied by a changelog as well.

When you merge the branch back to the trunk, the changelog information is merged as well. If there are no conflicts, the template and changelog will both be placed in the new trunk version without further modifications.

I would expect the history in the new 1.10 trunk version to say the update originated in the branch on 2019-1-3.

The history in the branch should remain unchanged - it should also say the update originated in the branch on 2019-1-3.

I just tested this scenario and this works as I described. Perhaps my assumption on the usage of changelogs or the version of the Thinkwise Platform was incorrect?
View original

1 reply

Userlevel 5
Badge +2
Hi Erwin,

The way this history is recorded has changed a bit over time. When it comes to verison 2019.1 of the Thinkwise Platform, the code history is comprised of two types:
  • Plain history
  • Changelogs
Plain history shows every single update done to a template. This data is bound to the project version in which this change was done. If the project version is deleted, you lose the plain history. Copying a project version will not copy this history - changes would show up twice. When branching a project version, the plain history is not included.

There is one exception. When a changelog is created, the plain history is upgraded and will be preserved, copied to new versions and copied to branches.

This way, the important history is preserved and all the small changes to a template before a changelog was created will not be copied with project versions indefinitely.

So the way this works really depends on whether you use changelogs. But since the branch history had the changes done in the trunk present in the history, I think it is safe to assume changelogs were used. I'll assume the update done in the branch was accompanied by a changelog as well.

When you merge the branch back to the trunk, the changelog information is merged as well. If there are no conflicts, the template and changelog will both be placed in the new trunk version without further modifications.

I would expect the history in the new 1.10 trunk version to say the update originated in the branch on 2019-1-3.

The history in the branch should remain unchanged - it should also say the update originated in the branch on 2019-1-3.

I just tested this scenario and this works as I described. Perhaps my assumption on the usage of changelogs or the version of the Thinkwise Platform was incorrect?

Reply