BRANCH CREATE
Description
Creates a new branch.
Usage
cm branch | br [create | mk] <brspec> [--changeset=<csetspec> | --label=<lbspec>] [-c=<str_comment> | -commentsfile=<comments_file>]
Options
Option / Argument | Description |
---|---|
--changeset | Changeset used as starting point for the new branch. (Use 'cm help objectspec' to learn more about cset specs.) |
--label | Label used as starting point for the new branch. (Use 'cm help objectspec' to learn more about label specs.) |
-c | Fills in the comment field of the new branch with the specified text. |
-commentsfile | Fills in the comment field of the new branch with the contents of the specified file. |
brspec | The new branch name or spec. (Use 'cm help objectspec' to learn more about branch specs.) |
Help
Remarks
To create a top-level branch, specify the name without any hierarchy. For example:
cm br /dev
If no optional parameter '--changeset' is specified, the base of the new branch will be the last changeset on the parent branch. If the new branch is a top-level branch, the base changeset used will be cset 0.
You can specify a comment using either the '-c' or the '-m' switches
cm branch /main/task001 -c="This is the comment"
cm branch /main/task001 -m "This is the comment"
Set the PLASTICEDITOR environment variable to specify an editor for entering comments. If the PLASTICEDITOR environment variable is set, and the comment is empty, the editor will be automatically launched to allow you to specify the comment.
Examples
cm branch task001
cm branch create task001
cm branch mk task001
cm br mk task001
(All of the examples above, create a top-level 'task001' branch in the repository of the current workspace.)
cm branch br:/task001/task002@
(Creates 'task002' branch as child of 'task001'.)
cm br /main/task001@myrep@myserver:8084 -c="my comment"
(Creates 'task001' branch as child of 'main' in repository 'myrep@myserver:8084' with comment 'my comment'.)
cm branch br:/main/task001 --changeset=2837 -commentsfile=commenttask001.txt
(Creates the 'task001' branch as child of 'main' with base 'changeset=2837', and applies the comment in 'commenttask001.txt' file.)