frederic.vauchelles Posted January 21, 2015 Report Share Posted January 21, 2015 Hi, I tried to make an automatic sync between my central PlasticSCM server and a BitBucket git repo. To do so, I tried to add a trigger on after-replicationwrite. Which seems the most appripriate trigger. But, whatever the script I add, there is an error: The sync process was unable to replicate the following branch: Branch: /main/trunk/fred/ld Operation: Push Source repository: com.fredericvauchelles.rwcc@localhost:8087 Destination repository: com.fredericvauchelles.rwcc@mycentralserver:8087 Error description: Key duplication when adding: PLASTIC_BRANCH I used this command to add the trigger: cm mktr after-replicationwrite "GitSync" /opt/plasticscm5/triggers/after-replicationwrite-1.sh Where the triggers folder is owned by plasticscm and has permission 755. Does anybody has an idea about this ? Link to comment Share on other sites More sharing options...
calbzam Posted January 21, 2015 Report Share Posted January 21, 2015 Hi, You use a "after-replicationwrite" trigger to perform a replica to a git repo after performing a replica between two Plastic servers, is it right? Could you post the trigger content to check if something is wrong? Yo are getting replica error when creating the trigger, but if you disable it, the replica is properly working? Regards, Carlos. Link to comment Share on other sites More sharing options...
frederic.vauchelles Posted January 21, 2015 Author Report Share Posted January 21, 2015 Hi, Exactly, if I remove the trigger, the push works perfectly. However, if there is any trigger, it shows the error. Here's the test script I used as a trigger: #!/bin/bash echo "$PLASTIC_BRANCH" > /opt/plasticscm5/triggers/branch.txt But, I tried also with: #!/bin/bash exit 0 Without any success. Link to comment Share on other sites More sharing options...
calbzam Posted January 21, 2015 Report Share Posted January 21, 2015 Ok, I understand your scenario now. The "after-replicationwrite" was designed for replica operations between Plastic repositories, but it seems that it´s not optimized for GitSync operations. Anyway, I will perform a test to check that the issue is easily reproducible. Regards, Carlos Link to comment Share on other sites More sharing options...
frederic.vauchelles Posted January 22, 2015 Author Report Share Posted January 22, 2015 Well, I think there is a misunderstanding and I will try to correct it with a detailed scenario: Intended behaviour: Local plastic server => (sync) => central plastic server => (after-replicationwrite trigger) => run script => gitsync between central plastic server and bitbucket On central plastic server after-replicationwrite (so, between two plastic servers), use the trigger to run a script that is intended to sync the central server with a git repo) Current behaviour: Local plastic server => (sync) => central plastic server (#failing, an error is shown due to an after-replicationwrite trigger error). So, I get an error before I run a command to gitsync. Regards, Fred Link to comment Share on other sites More sharing options...
calbzam Posted January 22, 2015 Report Share Posted January 22, 2015 Hi, Ok, thanks for clarifying I´ve tested a sample "after-replicationwrite" trigger and it seems to properly work. Is your trigger path a server path, right? Not client side. PD: I will perform the same sample on Linux using your same trigger to check if there´s something wrong. Regards, Carlos. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.