| | @@ -48,12 +48,12 @@ |
| 48 | 48 | Blob mcksum; /* Self-checksum on the manifest */ |
| 49 | 49 | |
| 50 | 50 | noSign = find_option("nosign","",0)!=0; |
| 51 | 51 | zColor = find_option("bgcolor","c",1); |
| 52 | 52 | verify_all_options(); |
| 53 | | - if( g.argc<3 ){ |
| 54 | | - usage("branch new BRANCH-NAME ?ROOT-CHECK-IN? ?-bgcolor COLOR?"); |
| 53 | + if( g.argc<5 ){ |
| 54 | + usage("branch new BRANCH-NAME BASE-CHECK-IN ?-bgcolor COLOR?"); |
| 55 | 55 | } |
| 56 | 56 | db_find_and_open_repository(1); |
| 57 | 57 | noSign = db_get_int("omitsign", 0)|noSign; |
| 58 | 58 | |
| 59 | 59 | /* fossil branch new name */ |
| | @@ -69,18 +69,11 @@ |
| 69 | 69 | fossil_fatal("branch \"%s\" already exists", zBranch); |
| 70 | 70 | } |
| 71 | 71 | |
| 72 | 72 | user_select(); |
| 73 | 73 | db_begin_transaction(); |
| 74 | | - if( g.argc<5 ){ |
| 75 | | - if( unsaved_changes() ){ |
| 76 | | - fossil_fatal("there are uncommitted changes. please commit first"); |
| 77 | | - } |
| 78 | | - rootid = db_lget_int("checkout", 0); |
| 79 | | - }else{ |
| 80 | | - rootid = name_to_rid(g.argv[4]); |
| 81 | | - } |
| 74 | + rootid = name_to_rid(g.argv[4]); |
| 82 | 75 | if( rootid==0 ){ |
| 83 | 76 | fossil_fatal("unable to locate check-in off of which to branch"); |
| 84 | 77 | } |
| 85 | 78 | |
| 86 | 79 | /* Create a manifest for the new branch */ |
| | @@ -184,14 +177,14 @@ |
| 184 | 177 | ** Usage: %fossil branch SUBCOMMAND ... ?-R|--repository FILE? |
| 185 | 178 | ** |
| 186 | 179 | ** Run various subcommands on the branches of the open repository or |
| 187 | 180 | ** of the repository identified by the -R or --repository option. |
| 188 | 181 | ** |
| 189 | | -** %fossil branch new BRANCH-NAME ?ROOT-CHECK-IN? ?-bgcolor COLOR? |
| 182 | +** %fossil branch new BRANCH-NAME BASIS ?-bgcolor COLOR? |
| 190 | 183 | ** |
| 191 | | -** Create a new branch BRANCH-NAME. You can optionally give |
| 192 | | -** a commit message and branch color. |
| 184 | +** Create a new branch BRANCH-NAME off of check-in BASIS. |
| 185 | +** You can optionally give the branch a default color. |
| 193 | 186 | ** |
| 194 | 187 | ** %fossil branch list |
| 195 | 188 | ** |
| 196 | 189 | ** List all branches |
| 197 | 190 | ** |
| 198 | 191 | |