uml2 Posted September 22, 2012 Report Share Posted September 22, 2012 Hello, I want to check default branch (e.g. /main , /master or, branch /master-2012) How to find the default branch with command liine inteface (cm) or how to change the default branch (/master *)? Thank you. Link to comment Share on other sites More sharing options...
manu Posted September 24, 2012 Report Share Posted September 24, 2012 Hello uml2, in Plastic SCM there's no "default" branch. We don't have anything to identify a "default" branch since all the branches are created with the same status. You can have a first level branch (/main) or a third level branch (/main/FeatureA/task001) but they are the same for Plastic SCM. On the other hand, you can use the Plastic SCM attributes system and query Plastic about it. You can set a branch as the default and fetch it using the cm find command. For example: cm find branch where attribute = 'DEFAULT' and attrvalue = 'TRUE' Link to comment Share on other sites More sharing options...
uml2 Posted September 24, 2012 Author Report Share Posted September 24, 2012 Thanks a lot. Link to comment Share on other sites More sharing options...
manu Posted September 24, 2012 Report Share Posted September 24, 2012 You are welcome! Link to comment Share on other sites More sharing options...
uml2 Posted September 27, 2012 Author Report Share Posted September 27, 2012 Hello Please, getmainbranch informaition from cm command 1. getmainbranch no answer (is not work in 4.1?) 2. how to set as default branch with plastic $cm version 4.1.10.335 $cm getmainbranch $cm find branch where attribute = 'DEFAULT' and attrvalue = 'TRUE' Total: 0 Link to comment Share on other sites More sharing options...
uml2 Posted September 27, 2012 Author Report Share Posted September 27, 2012 When switching to some branch has some problems, my branch of home always changed '/main', '/main' is default branch ? Link to comment Share on other sites More sharing options...
uml2 Posted September 27, 2012 Author Report Share Posted September 27, 2012 When no change comment for main branch (default value), $cm find branch where comment='main branch' --format='{name}' --nototal '/main' Link to comment Share on other sites More sharing options...
uml2 Posted September 27, 2012 Author Report Share Posted September 27, 2012 #setup with Plastic GUI 1. create attribute DEFAULT 2. apply attribute ... DEFAULT to some branch (e.g. /main) (not exist cm command) $cm find branch where attribute = 'DEFAULT' and attrvalue = 'TRUE' --format='{name}' '/main' Total: 1 Link to comment Share on other sites More sharing options...
manu Posted September 27, 2012 Report Share Posted September 27, 2012 Hi uml2, the "getmainbranch" command is not operative in Plastic SCM 4. The attribute set-up you did is correct, you can use it. How do you know the existence of the "getmainbrtanch" command? Link to comment Share on other sites More sharing options...
uml2 Posted September 28, 2012 Author Report Share Posted September 28, 2012 from the below commands, I found cm getmainbranch (version 4.1.10.335) $cm showcommands $cm help apply attribute ... DEFAULT to some branch (e.g. /main) (not exist cm command) ==> cm command exist cm setattribute <att_spec> <object_spec> <attribute_value> Link to comment Share on other sites More sharing options...
manu Posted September 28, 2012 Report Share Posted September 28, 2012 Hi uml2, I'm so sorry, I thought that the command was deprecated, but it's not the case! It's working! You only need to specify the repository you want to know the main branch: C:\Users\Manuel>cm lrep 1 default localhost:8084 2 test3 localhost:8084 4 test4 localhost:8084 6 test5 localhost:8084 7 test6 localhost:8084 C:\Users\Manuel>cm getmainbranch test3 3 19/09/2012 18:31:30 /main UserB4 test3 T Link to comment Share on other sites More sharing options...
uml2 Posted October 8, 2012 Author Report Share Posted October 8, 2012 thanks for new info. about the getmainbranch command (cm setmainbranch not exist..., I wonder that how to change the main branch and limitations) beacuse Redmine-PlasticSCM require the default branch info. cm getmainbranch test3 Link to comment Share on other sites More sharing options...
manu Posted October 8, 2012 Report Share Posted October 8, 2012 I'm afraid that it's not possible. If you want to change which branch is the main branch, I do recommend you to use the attributes, I think it's very easy to use for your purpose. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.