Search code examples
gitplasticscm

GitSync linked to old repository


I have a plastic repository and sync'ed it with a gitlab account. However this was just a test. Now I cannot change that URL (no idea where) and even fresh other repositories with some branches pulled from the original (plastic)repo will fail to sync with the message:

The sync cannot start because the target repository was replicated from a repository synchronized with git. The repository originally synchronized is 'MyRepo@PlasticSrv - https://old gitlab server.git'. Please contact support for further info.

How do I unlink the old gitlib address from a plastic repository?


Solution

  • Let me explain you how Gitsync internally links the synced repos. It´s valid after the 5.4.16.662 version (in previous versions the links were performed using attributes).

    If you drive to:

    C:\Users\UserName\AppData\Local\plastic4\sync\git\0d1ab65f-6aa8-440c-8ebd-d6867d29dff9

    You will be able to see the different mappings.

    cset.mapping.conf -> it contains the changesetid / commit mappings.

    git.repository.conf -> it contains the git url synced.

    reference.mapping.conf -> it contains the current mapping of each branch/tag synced between plastic & git.

    git.mapping.conf -> it contains the extra meta info of the commits pulled (email, author, committer)

    id-index, sha-index -> these two folders are a persistent cache for the revisions mapping. As the number of revisions is huge, they use a binary storage to get the best performance.

    You can remove the mappings folder if you don´t need to keep the link and as soon as you you perform new syncs, the mappings will be stored in additional folders.