Occuros Posted January 26, 2021 Report Share Posted January 26, 2021 Are there CLI commands to define syncviews, similar to the Sync To cloud Tab? Like adding dest repo, deleting dst repo etc. Link to comment Share on other sites More sharing options...
calbzam Posted January 26, 2021 Report Share Posted January 26, 2021 Hi, I'm afraid the sync view is not available via CLI. But there are few options to keep two Plastic servers in sync via CLI: http://blog.plasticscm.com/2012/02/after-accidentally-cloning-sexy.html https://github.com/PlasticSCM/syncservertrigger Please let us know if it helps. Regards, Carlos. Link to comment Share on other sites More sharing options...
Occuros Posted January 26, 2021 Author Report Share Posted January 26, 2021 Hey @calbzam unfortunately these two possibilities don't help in my scenario. We have multiple times a year new students coming in. We already could setup all the repository and permission management throug cli which helped a lot with automation. The main thing we currently miss is to automate the sync view creation for the created repositories, if that could be achieved through CLI we have nearly everything automated. Link to comment Share on other sites More sharing options...
calbzam Posted January 26, 2021 Report Share Posted January 26, 2021 Hi, Even when there is not a full sync view via CLI, you could distribute the configuration files so the users don't need to manually create the sync view via GUI: C:\Users\xxx\AppData\Local\plastic4\syncviews.conf Regards, Carlos. Link to comment Share on other sites More sharing options...
Occuros Posted January 26, 2021 Author Report Share Posted January 26, 2021 We do the opposite actually. Each student gets his personal repository, and we setup sync views on our end to sync the master repo to their personal repos each week. So they don't need to worry about syncing their repositories themselves. Link to comment Share on other sites More sharing options...
Tinyfish Posted June 1, 2022 Report Share Posted June 1, 2022 I write my own PowerShell script to sync: function Push-PlasticRepo { param ( $repo, $sourceServer, $targetServer ) $branches = & cm find branches on repositories "'$repo@$sourceServer'" --format='"{name}"' --nototal foreach ($branch in $branches) { & cm push $branch@$repo@$sourceServer $repo@$targetServer } } foreach ($repo in @("RepoA", "RepoB", "RepoC")) { Push-PlasticRepo $repo "localhost:8087" "ssl://xxx.net:8088" } And add it to Task Scheduler to automatically sync every night: schtasks /create /f /tn "My\Sync Plastic Repos" /sc daily /st 04:00 /tr "powershell.exe -ex bypass 'xxx.ps1'" Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now