Jump to content

Issue Syncing Repo with XLinks


TJClifton

Recommended Posts

Hi,

 

I've been having issues syncing a plastic repository with git since I added an XLink to the project. There is a similar post here where a user is encountering a similar issue although I wasn't able to resolve my issue through that post.

 

The issue is this. I have 2 plastic repositories, 1 called "LevelEditor" and another called "Core". These two repositories are both synced with two git repositories hosted on bitbucket. This syncing has worked just fine, but recently I created an XLink in the LevelEditor project, which points to the Core repository. Since that point I have been unable to sync LevelEditor with its git equivalent, receiving the error:

 

"The equivalent Git repository for 'CLIFTEK_CORE_REP@localhost:8087' has not been defined. The xlink cannot be pushed. Please, add the equivalence inside the submodules section in the configuration file 'C:\Users\Thomas\AppData\Local\plastic4\gitsync.conf'."

 

My understanding having read the thread I mentioned earlier and the documentation here is that I need to have the submodule information defined in this gitsync file. I did not actually have a gitsync file but I created one at the given path. I then proceeded to add the submodules information. This is what the file looks like:

 

[submodules]
https://bitbucket.org/cliftek/core/ -> CLIFTEK_CORE_REP@localhost:8087 writeable:true relativeserver:true
 
Unfortunately this has had no effect for me and I still receive the exact same error as before whenever I try to sync (I have restarted the plasticscm server and client a few times). I am sure that I have got the syntax wrong or something similar but can't get it to work. Could you provide me with some assistance to help rectify this issue please?
 
Thanks,
Tom
Link to comment
Share on other sites

Hi Manu,

 

haha I feel like a complete idiot now! Yep that did the trick. That's what happens when you try doing these things at the end of the day :)

 

Thanks for your help with that.

 

Really enjoying working with XLinks in Plastic by the way. Together with gitsync they're incredibly powerful and useful.

 

Keep up the god work!

 

Cheers

Tom

Link to comment
Share on other sites

  • 3 years later...

I'm running into the exact same symptoms.  I've synced two repositories to Git, successfully.  After XLinking in Plastic, I am unable to sync.  In my case, I wonder if it has to do with the fact that my repository name has a space in it?

I have tried all of the following (one at a time, with client GUI restarts in-between):

git@github.com:M-Pixel/MigraDoc_Fluent.git -> "MigraDoc Fluent@localhost:8087" writable:true relativeserver:true
git@github.com:M-Pixel/MigraDoc_Fluent.git -> 'MigraDoc Fluent@localhost:8087' writable:true relativeserver:true
git@github.com:M-Pixel/MigraDoc_Fluent.git -> MigraDoc Fluent@localhost:8087 writable:true relativeserver:true
git@github.com:M-Pixel/MigraDoc_Fluent.git -> "MigraDoc Fluent"@localhost:8087 writable:true relativeserver:true
git@github.com:M-Pixel/MigraDoc_Fluent.git -> 'MigraDoc Fluent'@localhost:8087 writable:true relativeserver:true

I have also tried some of those combinations without the writable & relative parts.

Whenever I try to sync it with Git, I get

The equivalent Git repository for 'MigraDoc Fluent@localhost:8087' has not been defined.  The xlink cannot be pushed.  Please add the equivalence inside the submodules section in the configuration file...

It would be really nice if the GUI just asked "there's a new submodule, which repo should it be linked to?" with a repo selector.  At least there should be some documentation on how to deal with spaces in repository specification (it's obvious on command line, but not for config files like this).

What is wrong with my syntax?

Link to comment
Share on other sites

- The documentation regarding this topic, can be found at:

https://www.plasticscm.com/documentation/gitsync/plastic-scm-version-control-gitsync-guide

- Could you attach your configuration file to review it all? Could you also attach the Plastic log?

C:\Users\xxx\AppData\Local\plastic4\logs

- I'm guessing about why the git repository cannot be found.  Is the "git@github.com:M-Pixel/MigraDoc_Fluent.git" repo actually reachable? Could you try the following way?

https://github.com/M-Pixel/MigraDoc_Fluent -> "MigraDoc Fluent@localhost:8087" writable:true relativeserver:true

Regards,

Carlos.

Link to comment
Share on other sites

I know about that documentation.  It doesn't mention anything about spaces in repo specs, which is the thing that I said I hoped could be documented.  It doesn't contain any examples of repo specs with spaces, either.

Plastic does not seem to know how to invoke the Git Credential Manager, and I have 2FA set up on my GitHub account, so it always fails when trying to sync using the HTTPS scheme.  I had multiple successful syncs before introducing the XLink using the SSH scheme, so I'm certain that isn't the problem.  Just now, I successfully sync'd MigraDoc Fluent using the exact "git@" address I provided above.  Anyways, it doesn't try to push until it has succeeded in pulling, and it doesn't show that error until it fails to push.  And it were a problem with finding the Git repository, I would expect to see an error message saying "could not be reached" instead of "has not been defined".

To be clear, the XLink is introduced on the Plastic side.  Perhaps that's the issue?  All of the documentation seems to talk about converting subrepos to xlinks, but not the other way around.  Is it supported?

This is the entire gitsync.conf file:

[email-mapping]
Max Pixel = git@m-pixel.com

[submodules]
git@github.com:M-Pixel/MigraDoc_Fluent.git -> "MigraDoc Fluent@localhost:8087" writable:true relativeserver:true

I'll send logs via a support ticket, so that they're not available to the general public.

Link to comment
Share on other sites

Is this a public repo so we can try to configure it in our labs? Could you invite me or allow me access so I can try? Spaces shouldn't be a problem using quotation marks (as you are doing) but you can try renaming the Plastic repo to check if it makes any difference.

Quote

To be clear, the XLink is introduced on the Plastic side.  Perhaps that's the issue?  All of the documentation seems to talk about converting subrepos to xlinks, but not the other way around.  Is it supported?

This is the error in the log:

2020-04-06 19:57:22,484 MAX-DESKTOP\Max ERROR sync - Error running sync: The equivalent Git repository for 'MigraDoc Fluent@localhost:8087' has not been defined. The xlink cannot be pushed. Please add the equivalence inside the submodules section in the configuration file 'C:\Users\Max\AppData\Local\plastic4\gitsync.conf'.. StackTrace:

- If you have created  a Plastic Xlink in a Plastic repo (MigraDoc Fluent), your git repo should also have defined a submodule . This rule is able to match the git submodule with the Plastic Xlink and push the contents between thyem.

- When editing "gitsync.conf" you need to restart the Plastic client. 
 

Regards,

Carlos.

Link to comment
Share on other sites

Yes, this is open-source so I can share it.  I've attached replication packages for the Plastic repos.  I could invite you to the GitHub ones if you let me know your GitHub usernames.

 

Quote

If you have created  a Plastic Xlink in a Plastic repo (MigraDoc Fluent), your git repo should also have defined a submodule

Perhaps this is the problem then.  Am I right that you're saying this is not supported?

  • Add commit to Plastic repo A that xlinks-in Plastic repo B
  • Configure gitsync.conf with matching Git repos
  • Run Git Sync

... and that only the following is supported?

  • Add commit to Git repo A that submodules-in Git repo B
  • Configure gitsync.conf with matching Plastic repos
  • Sync Plastic & Git repos

I created XLinks in Plastic before creating submodules in Git.  Given that I can create submodules in Git and they become XLinks in Plastic (with the correct configuration), I expect for this to also work the other way around, too.  If it's not supported, then is it now impossible for me to sync this with Git unless I start over, recreating all commits and making sure to only add submodules on the Git side first?

CrashSpace donation receipt generator.replicationpackage MigraDoc Fluent.replicationpackage

Link to comment
Share on other sites

Unfortunately, that's not the issue here.  I can confirm that the submodule is 100% successfully synced with Git, yet the "parent" repository still refuses to sync.  If that were the problem, I would hope that the error message would say so ("The equivalent commit for [changesetspec] does not exist in [gitspec]").

Were you unable to reproduce the error using the provided files?

Link to comment
Share on other sites

I'm able to reproduce it. It seems gitsync is not able to properly handle Xlinked repos with blanks on the repo name. I will share it with the team.

The only workaround I can guess at the moment is deleting the Xlink, rename the repo (removing the blank) and finally  re-create the Xlink with the new repo name.

But also in this case, you will need to use the following rule to ignore the previous history where the Xlinked repo name included a blank. I guess this is not a valid workaround for you, right?

[submodules]
ignore.xlinkRepository=MigraDoc Fluent

[submodules]
git@github.com:M-Pixel/MigraDoc_Fluent.git -> MigraDocFluent@localhost:8087 writable:true relativeserver:true

Regards,

Carlos.

Link to comment
Share on other sites

  • 3 weeks later...
  • 1 year later...

Hi,

Can you confirm that this issue is still present in the software?
I tried a lot of combinations (git/https, surrounding with double-quotes, ...).  In case it matters: our repo is on PlasticSCM cloud (so, having 2 '@'-signs).
Do you have a timeline when this could be resolved?

Thanks,
Best regards,
Wim

Link to comment
Share on other sites

  • 2 months later...
  • 5 months later...

Hi @calbzam,

I just retested this with the latest version (cm version => 11.0.16.7608), and the issue is still present. 

Our repo's are

- "Development Fellowship Shared"  (which is succesfully synced with Github using SSH)
- "Development Organimmo Cloud V2"   (which contains an xlink to the above repo, but fails)

The output/error we get is:

PS Z:\SCM\OrganimmoCloud> cm sync "Development Organimmo Cloud V2@Organimmo@cloud" git git@github.com:Organimmo/OXPortal.git
Receiving references... /
- /main: Local changes
... (branches removed for brevity)

- 0 changesets to pull
- 3392 changesets to push

Receiving references... OK
There are changes to push.
The equivalent Git repository for 'Development Fellowship Shared@Organimmo@cloud' has not been defined. The xlink cannot be pushed. Please add the equivalence inside the submodules section in the configuration file 'C:\Program Files\PlasticSCM5\client\gitsync.conf'.

gitsync.conf: 

[email-mapping]
person1 = person1@ourcompany.tld
person2 = person2@ourcompany.tld

[submodules]
#ignore.xlinkRepository=Development Fellowship Shared
#git://github.com/Organimmo/FellowshipShared.git -> Development Fellowship Shared@Organimmo@cloud writable:false relativeserver:true
#git://github.com/Organimmo/FellowshipShared.git -> Development%20Fellowship%20Shared@Organimmo@cloud writable:false relativeserver:true
#git://github.com/Organimmo/FellowshipShared.git -> 'Development Fellowship Shared@Organimmo@cloud' writable:false relativeserver:true
git://github.com/Organimmo/FellowshipShared.git -> "Development Fellowship Shared@Organimmo@cloud" writable:false relativeserver:true
#git://github.com/Organimmo/FellowshipShared.git -> "Development Fellowship Shared@Organimmo@cloud"

- this is the original file, but email-mapping anonymized
- all mappings shown above under submodules are failing, with the exact same error.
- the "workaround" with ignore.xlinkRepository is succeeding, but renders the xlink/submodules functionality useless.

So my question is:
- If the above syntax for specifying spaces is wrong, what do we need to use?
- If the above syntax for specifying spaces is correct, could you please fix this bug?
- If this is a bug, and you are short on resources to get this fixed, is it possible to open up the gitsync logic?

Thanks for helping us with this.  We are a "Plastic Cloud" customer, trying to open up (one-way) a "sample-part" of our code to specific customers using GIT.

Best regards,
Wim

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
×
×
  • Create New...