Jump to content

Issues trying to gitsync a repo with submodules


dean
 Share

Recommended Posts

Hi!

I am trying to migrate a repo from GitHub to Plastic. It has a submodule.

I have gitsynced the submodule to plastic. 

 

gitSync2.PNG.73570d69d48940039bdc0fb1e37ac57c.PNG

 

I've set up the gitsync.conf as below. Im not sure of the syntax is correct. The only example I could find was a local repo not a github one.

gitSync3.thumb.PNG.0270769dbfb5aae573e5e6be7c7cb746.PNG

When I try and gitsync the parent project. I get this:

gitSync.PNG.874e48e43b5dee323e57968e96f2e97e.PNG

Can anyone help?

Thanks!

Link to comment
Share on other sites

14 hours ago, calbzam said:

Hello,

You need to sync all the Xlinks/submodules first before you run the sync for the parent repo.

I think this may be the problem.

Regards,

Carlos.

Hi Carlos, thanks for the reply.

Is there some way I could be confusing what you mean by "sync all submodules"? I have definitely done that, to the best of my knowledge. You can see a screen grab of the result of syncing the submodule in the OP.

Link to comment
Share on other sites

Wow I am getting really really inconsistent results here...

I tried pushing a change to the repo with git, then the next time I tried to sync, it completed successfully! Succes! Maybe. When I go to view changesets/branch explorer, it seems there is nothing there. 

I then tried the same with my actual project, and I got a different issue. An error saying that the Submodule mapping needed to be set up in gitsync.conf. Even though the submodule is the same repo that was successful for the previous test. Very strange.

As another test, I am on a different machine and trying to gitsync the same project. This time there is a completely different error. It says that there is a branch with multiple heads! 

image.png.b3afdcfa190dd2025fe9a1e6c5eed6b5.png

That branch looks fine in Git, I am able to commit to it and push to github without any errors. If I try and view the branch explorer, there is nothing there.

 

So... are there a lot of bugs in GitSync or... Am I just very unlucky or what? 

I have really high hopes for Plastic, but if this is the typical experience then we might have to stick with the known frustration of Git, which would be sa.

 

Link to comment
Share on other sites

Hi,

- Regarding the initial error, when Plastic is syncing the this submodule there is a git sha commit that was not previously synced with Plastic. If this sha doesn't even exist in the git repo, you can use the following setting in "gitsync.conf" to avoid the error:

eg:

[submodules]
ignore.submoduleUrl = git@bitbucket.org:Organization/MyRepo.git

NOTE: If the git main repo has as pointer to a submudule sha, this sha needs to exist in Plastic before you run the sync for it to succeed.

- It's important that you always run the GitSync operation from the same Plastic client. The GitSync mappings are stored in the client side and if you run a GitSync froma  different client machine, Plastic won't find any mapping and the full repo history may be duplicated.

- We don't have tracked any GitSync important issue so let's try to debug your setup to upderstand what could be the problem.

Regards,

Carlos. 

 

Link to comment
Share on other sites

Hi Carlos,

Thanks for the tips. I have been in email to support as well and received similar advice. 

I will try again today with those things in mind.

One thing that could definitely be clearer in the docs is the syntax for the gitconf submodule equivalence. The only docs I could find use a local repo.

What is the exact syntax for a github repo? Is it...

git:https://github.com/user/repo -> repo@org@cloud writable:true relativeserver:true

or

git:https://github.com/user/repo.git -> repo@org@cloud writable:true relativeserver:true

or maybe just

https://github.com/user/repo.git -> repo@org@cloud writable:true relativeserver:true

(I did manage to get it working, but was never sure it was right, or if it was causing issues. For the sake of others it would be great if there were examples in the docs for github, bitbucket etc.)

As some general feedback, the attraction of plastic over git is that it's gui based, I was really surprised to have to dig out a conf file and do this is a text editor. How come it's not in a preferences page in the gui? 

 

One more question:

Also I often see a port number specified. What does that mean? Is one required for Cloud?

code@localhost:8084

 

Thanks for all the help!

image.png

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...