Differences From:
File
src/branch.c
part of check-in
[b7f32a71ab]
- Add web-based branch color changer. Add the "branch list" command.
Simplifications to color propagation logic.
by
drh on
2009-01-20 22:21:24.
[view]
To:
File
src/branch.c
part of check-in
[4d39bbac10]
- Require that the "branch new" command specify a basis. Do not let it use
the current check-out. Otherwise it gets confusing to users.
by
drh on
2009-01-20 22:38:56.
[view]
@@ -49,10 +49,10 @@
noSign = find_option("nosign","",0)!=0;
zColor = find_option("bgcolor","c",1);
verify_all_options();
- if( g.argc<3 ){
- usage("branch new BRANCH-NAME ?ROOT-CHECK-IN? ?-bgcolor COLOR?");
+ if( g.argc<5 ){
+ usage("branch new BRANCH-NAME BASE-CHECK-IN ?-bgcolor COLOR?");
}
db_find_and_open_repository(1);
noSign = db_get_int("omitsign", 0)|noSign;
@@ -70,16 +70,9 @@
}
user_select();
db_begin_transaction();
- if( g.argc<5 ){
- if( unsaved_changes() ){
- fossil_fatal("there are uncommitted changes. please commit first");
- }
- rootid = db_lget_int("checkout", 0);
- }else{
- rootid = name_to_rid(g.argv[4]);
- }
+ rootid = name_to_rid(g.argv[4]);
if( rootid==0 ){
fossil_fatal("unable to locate check-in off of which to branch");
}
@@ -185,12 +178,12 @@
**
** Run various subcommands on the branches of the open repository or
** of the repository identified by the -R or --repository option.
**
-** %fossil branch new BRANCH-NAME ?ROOT-CHECK-IN? ?-bgcolor COLOR?
+** %fossil branch new BRANCH-NAME BASIS ?-bgcolor COLOR?
**
-** Create a new branch BRANCH-NAME. You can optionally give
-** a commit message and branch color.
+** Create a new branch BRANCH-NAME off of check-in BASIS.
+** You can optionally give the branch a default color.
**
** %fossil branch list
**
** List all branches