You are not logged in. Click here to log in.

codebeamer Application Lifecycle Management (ALM)

Search In Project

Search inClear

Tags:  not added yet

Manual Synchronization of External Git Repository Changes

It may happen that some changes of an external repository don't get updated in codeBeamer because of technical problems (e.g. broken scmloop configuration).
In such a case, changes can be synchronized manually (after the technical problems were fixed). It is demonstrated in the following example.

We have four changes in a remote repository committed to the same codeBeamer item (id = 27098).
Two of those, the first and the last, are successfully updated in codeBeamer (commit messages successful1 and successful2).
However, the two others are missing (commit messages missing1 and missing2).

Git log shows all the four changes:

commit dcbfe97a4b8577dd0f7cc4ef676f1245564d2d96
Author: bond <bond@mail.server>
Date:   Tue Oct 31 11:42:04 2017 +0100

    #27098 successful2

commit 45b18dbdf6a954301244647ea8665fd728d26200
Author: bond <bond@mail.server>
Date:   Tue Oct 31 11:39:17 2017 +0100

    #27098 missing2

commit 43983ddedabcc40e943a7ec2e79b228cd69102fa
Author: bond <bond@mail.server>
Date:   Tue Oct 31 11:35:52 2017 +0100

    #27098 missing1

commit 19fde45633ced7db2a3d88cd7b683e9f763f0686
Author: bond <bond@mail.server>
Date:   Tue Oct 31 11:30:29 2017 +0100

    #27098 successful1

On the other hand, codeBeamer shows only two of the four changes in the repository view and also at the item:


To correct this, do the following on the server hosting the remote repository:

  • Create a text file based on git log changes (e.g. missingchanges.txt). Put each change that needs to be synchronized into a new line:
    <old_hash_1> <new_hash_1> <target_1>
    <old_hash_2> <new_hash_2> <target_2>
     .
     .
    <old_hash_n> <new_hash_n+1> <target_n+1>
    
    For example:
    19fde45633ced7db2a3d88cd7b683e9f763f0686 43983ddedabcc40e943a7ec2e79b228cd69102fa refs/heads/master
    43983ddedabcc40e943a7ec2e79b228cd69102fa 45b18dbdf6a954301244647ea8665fd728d26200 refs/heads/master
    

  • Call git post receive hook for each change by executing the command (where <file_name> is the previously created text file, and <path> is the path to the repository folder):
    cat <file_name>|<path>/hooks/post-receive
    
    For example, running the command from the repository folder:
    cat missingchanges.txt|./hooks/post-receive
    

Once the above steps are done, the missing changes should appear in codeBeamer: