Jump to content

Gitsync : plastic xlink and git submodules mapping


Sam

Recommended Posts

Hello everybody,

 

When I try to sync Plastic with a git repo that contains submodules I get stuck with this error :

 

The equivalent Git reposytory for '' has not been defined. The xlink cannot be pushed... (see capture)

 

The message tells me to add equivalence in gitsync.conf, but this file doesn't exist on the indicated location.

 

Moreover I have no idea on how to write the requested "equivalence", I only found how to map users and emails, but I found nowhere on the web information about the "submodule section" of the file gitsync.conf

 

The targetted git repositories are already synced with another plastic repository on my server, so the mapping should be possible.

 

Did someone succeed in that ? Any part of documentation I missed ?

 

A big thank by advance for help.

post-28381-0-94858600-1416910705_thumb.png

Link to comment
Share on other sites

Hi Sam!

 

look, edit the gitsync.conf file, you can specify the submodules references as follows:

 

[submodules]
git://localhost/code -> code@localhost:8084 writable:true relativeserver:true
git://localhost/doc -> doc@localhost:8084 writable:false relativeserver:true

 

 

or...

 

[submodules]
git://localhost/repoA -> gitsync@localhost:8084 writable:true relativeserver:true
c:\\tmp\\repos\\repoB -> repoB@localhost:8084 writable:false relativeserver:true

Link to comment
Share on other sites

Thanks a lot, I will try to create the file myself then.

 

I still have couple of questions :

- what is the syntax for a git repository over https (from github, ie: https://github.com/user/repo.git), can I write directly : https://github.com/user/repo.git -> gitsync@localhost:8084 writable:true relativeserver:true ?

 

- Perhaps I misunderstood something, is it true that I have to set the gitsync.conf file up on client side ? Does it means that every client have to set-up its own file ? Is there a way to make the mapping populating over the clients connected to my server ? Or perhaps is it automatic ?

Link to comment
Share on other sites

Hi Sam,

 

 

- what is the syntax for a git repository over https (from github, ie: https://github.com/user/repo.git), can I write directly : https://github.com/user/repo.git -> gitsync@localhost:8084 writable:true relativeserver:true ?

 

It should be the same as the one defined in the .gitmodules file, for example:

[submodule "externals/repoB"]
	path = externals/repoB
	url = c:\\tmp\\repos\\repoB

Then I need to use the "c:\\tmp\\repos\\repoB" path in my gitsync.conf file.

 

 

- Perhaps I misunderstood something, is it true that I have to set the gitsync.conf file up on client side ? Does it means that every client have to set-up its own file ? Is there a way to make the mapping populating over the clients connected to my server ? Or perhaps is it automatic ?

 

Yes, everyone using the gitSync with the external git repository and the local Plastic SCM server has to manually configure the file.

Link to comment
Share on other sites

Hi Manu,

 

It begins to work but I stuck to the next step :

 

For one repository I had the message :

The equivalent Git repository for 'https://github.com/user/repoX.git' has not been defined. The xlink cannot be pushed

So I have added the following line on gitsync.conf :

[submodules]
https://github.com/user/repoX.git -> repoX@ssl://personalserver:8088 writable:true relativeserver:true

I retried the sync then I had another message for the new adresse of the git repo who has been moved during the project's life :

The equivalent Git repository for 'https://personalGitServer/Git/repoX.git' has not been defined. The xlink cannot be pushed

So I have added a second line on gitsync.conf, pointing to the same plastic repository (all the history of the moved git repo is consistent, only it's address changed)

[submodules]
https://github.com/user/repoX.git -> repoX@ssl://personalserver:8088 writable:true relativeserver:true
https://personalGitServer/Git/repoX.git -> repoX@ssl://personalserver:8088 writable:true relativeserver:true

Then I had a new error :

The configuration file : 'C:\Users\Sam\AppData\Local\plastic4\gitsync.conf cannot be read, because it's data is invalid or corrupt.

I understand that it is because there are two lines pointing to the same Plastic repository ... OK, but this can happend, nothing is tricky here, just a change of git repo address that results on a modification of .gitmodules file during the progress of the project. I can't maintain a sync of another Plastic repo to the old git repo address because it doesn't exists anymore (deleted on github after a full history copy to another server).

 

So this is the first problem I still have.

The second one happens on 5-6 git repositories I want to sync, each of them have only one or two submodules but this time the message is the one of the first capture of the first message (with nothing between the apostophes ''). The submodules and .gitmodules file weren't present since the first commit but they were added later.

The equivalent Git repository for '' has not been defined. The xlink cannot be pushed

So I guess if Plastic makes something wrong by reading an unexisting file in the first commits (.gitmodules is not in the fist commits) or perhaps reading a blank line that it interprets as a blank repository url. Anyway it seems to have a real problem with this.

 

Can I do something by myself or do I need to wait for un update of Plastic ? I'm really stuck with this.

 

Thanks for your help.

 

Sam

Link to comment
Share on other sites

So I guess if Plastic makes something wrong by reading an unexisting file in the first commits (.gitmodules is not in the fist commits) or perhaps reading a blank line that it interprets as a blank repository url. Anyway it seems to have a real problem with this.

 

Let me check that with an empty git ".gitmodules" file.

Link to comment
Share on other sites

  • 1 month later...

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...