Ofirk Posted February 4, 2021 Report Share Posted February 4, 2021 Hi, I'm trying to delete a branch using a script running by a trigger. I get the message "workspace ... is busy. Try later". I've noticed that this message is received once I'm running with root privileges. How can I delete a branch from script (running in a trigger context)? Ofir Link to comment Share on other sites More sharing options...
calbzam Posted February 4, 2021 Report Share Posted February 4, 2021 Hi, The command to delete a branch is: cm branch delete /main/scm21345 But note that you can only delete a branch if the branch is empty (no changesets inside). PD: http://blog.plasticscm.com/2018/08/why-we-dont-delete-branches-in-plastic.html Regards, Carlos. Link to comment Share on other sites More sharing options...
Ofirk Posted February 4, 2021 Author Report Share Posted February 4, 2021 Thanks Carols, I'm familiar with the command syntax. My problem is that if the user is not running with root permillages, the command is rejected. I can't figure out how to gain root privileges when running from trigger context. I guess the user running is 'plasticscm'. Ofir Link to comment Share on other sites More sharing options...
calbzam Posted February 4, 2021 Report Share Posted February 4, 2021 Hi, If you move the "client.conf" from the ".plastic4/client.conf" user folder to the client binaries folder "C:\Program Files\PlasticSCM5\client", all the machine users will be able to use the same Plastic client configuration. Regards, Carlos. Link to comment Share on other sites More sharing options...
Ofirk Posted February 4, 2021 Author Report Share Posted February 4, 2021 41 minutes ago, calbzam said: Hi, If you move the "client.conf" from the ".plastic4/client.conf" user folder to the client binaries folder "C:\Program Files\PlasticSCM5\client", all the machine users will be able to use the same Plastic client configuration. Regards, Carlos. Thanks Carlos. For the sake of Linux users (we are in Linux topic 😉 ) need to copy the client.conf to: /opt/plasticscm5/client/client.conf Ofir 1 Link to comment Share on other sites More sharing options...
Ofirk Posted February 4, 2021 Author Report Share Posted February 4, 2021 Hi, Finally I resolved the issue I've created a plastic workspace on the server that manage all trigger's scripts The problem was, that in the same folder the script run (and tried to do cm branch delete) there is the .plastic folder of the workspace, and it was not owned by plasticscm user, which run the scripts, thus the scripts kept failing. Once I changed the ownership of .plastic directory, script is working like a magic. .plastic is a hidden folder, so it took some time to figure that out. 1 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