Jump to content

[cm] how to find default branch using (cm find ...) ?


uml2

Recommended Posts

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

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

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

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

  • 2 weeks later...

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

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...