Fossil SCM
Reviewed all Usage: messages for consistency and fixed a few where the fossil command was named in the call to usage(), causing the displayed usage to show the command name twice. Affected commands are bisect options, test-fileage, test-set-mtime, whatis, remote-url, and tag list.
Commit
57f1eaecb80dcf27271d6bf380f71a03ebb780b8
Parent
314f194227c63e6…
6 files changed
+1
-1
+1
-1
+1
-1
+1
-1
+1
-1
+1
-1
+1
-1
| --- src/bisect.c | ||
| +++ src/bisect.c | ||
| @@ -431,11 +431,11 @@ | ||
| 431 | 431 | } |
| 432 | 432 | if( i>=sizeof(aBisectOption)/sizeof(aBisectOption[0]) ){ |
| 433 | 433 | fossil_fatal("no such bisect option: %s", g.argv[3]); |
| 434 | 434 | } |
| 435 | 435 | }else{ |
| 436 | - usage("bisect option ?NAME? ?VALUE?"); | |
| 436 | + usage("options ?NAME? ?VALUE?"); | |
| 437 | 437 | } |
| 438 | 438 | }else if( strncmp(zCmd, "reset", n)==0 ){ |
| 439 | 439 | db_multi_exec( |
| 440 | 440 | "DELETE FROM vvar WHERE name IN " |
| 441 | 441 | " ('bisect-good', 'bisect-bad', 'bisect-log')" |
| 442 | 442 |
| --- src/bisect.c | |
| +++ src/bisect.c | |
| @@ -431,11 +431,11 @@ | |
| 431 | } |
| 432 | if( i>=sizeof(aBisectOption)/sizeof(aBisectOption[0]) ){ |
| 433 | fossil_fatal("no such bisect option: %s", g.argv[3]); |
| 434 | } |
| 435 | }else{ |
| 436 | usage("bisect option ?NAME? ?VALUE?"); |
| 437 | } |
| 438 | }else if( strncmp(zCmd, "reset", n)==0 ){ |
| 439 | db_multi_exec( |
| 440 | "DELETE FROM vvar WHERE name IN " |
| 441 | " ('bisect-good', 'bisect-bad', 'bisect-log')" |
| 442 |
| --- src/bisect.c | |
| +++ src/bisect.c | |
| @@ -431,11 +431,11 @@ | |
| 431 | } |
| 432 | if( i>=sizeof(aBisectOption)/sizeof(aBisectOption[0]) ){ |
| 433 | fossil_fatal("no such bisect option: %s", g.argv[3]); |
| 434 | } |
| 435 | }else{ |
| 436 | usage("options ?NAME? ?VALUE?"); |
| 437 | } |
| 438 | }else if( strncmp(zCmd, "reset", n)==0 ){ |
| 439 | db_multi_exec( |
| 440 | "DELETE FROM vvar WHERE name IN " |
| 441 | " ('bisect-good', 'bisect-bad', 'bisect-log')" |
| 442 |
+1
-1
| --- src/browse.c | ||
| +++ src/browse.c | ||
| @@ -979,11 +979,11 @@ | ||
| 979 | 979 | int mid; |
| 980 | 980 | Stmt q; |
| 981 | 981 | const char *zGlob = find_option("glob",0,1); |
| 982 | 982 | db_find_and_open_repository(0,0); |
| 983 | 983 | verify_all_options(); |
| 984 | - if( g.argc!=3 ) usage("test-fileage CHECKIN"); | |
| 984 | + if( g.argc!=3 ) usage("CHECKIN"); | |
| 985 | 985 | mid = name_to_typed_rid(g.argv[2],"ci"); |
| 986 | 986 | compute_fileage(mid, zGlob); |
| 987 | 987 | db_prepare(&q, |
| 988 | 988 | "SELECT fid, mid, julianday('now') - mtime, pathname" |
| 989 | 989 | " FROM fileage" |
| 990 | 990 |
| --- src/browse.c | |
| +++ src/browse.c | |
| @@ -979,11 +979,11 @@ | |
| 979 | int mid; |
| 980 | Stmt q; |
| 981 | const char *zGlob = find_option("glob",0,1); |
| 982 | db_find_and_open_repository(0,0); |
| 983 | verify_all_options(); |
| 984 | if( g.argc!=3 ) usage("test-fileage CHECKIN"); |
| 985 | mid = name_to_typed_rid(g.argv[2],"ci"); |
| 986 | compute_fileage(mid, zGlob); |
| 987 | db_prepare(&q, |
| 988 | "SELECT fid, mid, julianday('now') - mtime, pathname" |
| 989 | " FROM fileage" |
| 990 |
| --- src/browse.c | |
| +++ src/browse.c | |
| @@ -979,11 +979,11 @@ | |
| 979 | int mid; |
| 980 | Stmt q; |
| 981 | const char *zGlob = find_option("glob",0,1); |
| 982 | db_find_and_open_repository(0,0); |
| 983 | verify_all_options(); |
| 984 | if( g.argc!=3 ) usage("CHECKIN"); |
| 985 | mid = name_to_typed_rid(g.argv[2],"ci"); |
| 986 | compute_fileage(mid, zGlob); |
| 987 | db_prepare(&q, |
| 988 | "SELECT fid, mid, julianday('now') - mtime, pathname" |
| 989 | " FROM fileage" |
| 990 |
+1
-1
| --- src/file.c | ||
| +++ src/file.c | ||
| @@ -519,11 +519,11 @@ | ||
| 519 | 519 | void test_set_mtime(void){ |
| 520 | 520 | const char *zFile; |
| 521 | 521 | char *zDate; |
| 522 | 522 | i64 iMTime; |
| 523 | 523 | if( g.argc!=4 ){ |
| 524 | - usage("test-set-mtime FILENAME DATE/TIME"); | |
| 524 | + usage("FILENAME DATE/TIME"); | |
| 525 | 525 | } |
| 526 | 526 | db_open_or_attach(":memory:", "mem", 0); |
| 527 | 527 | iMTime = db_int64(0, "SELECT strftime('%%s',%Q)", g.argv[3]); |
| 528 | 528 | zFile = g.argv[2]; |
| 529 | 529 | file_set_mtime(zFile, iMTime); |
| 530 | 530 |
| --- src/file.c | |
| +++ src/file.c | |
| @@ -519,11 +519,11 @@ | |
| 519 | void test_set_mtime(void){ |
| 520 | const char *zFile; |
| 521 | char *zDate; |
| 522 | i64 iMTime; |
| 523 | if( g.argc!=4 ){ |
| 524 | usage("test-set-mtime FILENAME DATE/TIME"); |
| 525 | } |
| 526 | db_open_or_attach(":memory:", "mem", 0); |
| 527 | iMTime = db_int64(0, "SELECT strftime('%%s',%Q)", g.argv[3]); |
| 528 | zFile = g.argv[2]; |
| 529 | file_set_mtime(zFile, iMTime); |
| 530 |
| --- src/file.c | |
| +++ src/file.c | |
| @@ -519,11 +519,11 @@ | |
| 519 | void test_set_mtime(void){ |
| 520 | const char *zFile; |
| 521 | char *zDate; |
| 522 | i64 iMTime; |
| 523 | if( g.argc!=4 ){ |
| 524 | usage("FILENAME DATE/TIME"); |
| 525 | } |
| 526 | db_open_or_attach(":memory:", "mem", 0); |
| 527 | iMTime = db_int64(0, "SELECT strftime('%%s',%Q)", g.argv[3]); |
| 528 | zFile = g.argv[2]; |
| 529 | file_set_mtime(zFile, iMTime); |
| 530 |
+1
-1
| --- src/name.c | ||
| +++ src/name.c | ||
| @@ -690,11 +690,11 @@ | ||
| 690 | 690 | zType = find_option("type",0,1); |
| 691 | 691 | |
| 692 | 692 | /* We should be done with options.. */ |
| 693 | 693 | verify_all_options(); |
| 694 | 694 | |
| 695 | - if( g.argc<3 ) usage("whatis NAME ..."); | |
| 695 | + if( g.argc<3 ) usage("NAME ..."); | |
| 696 | 696 | for(i=2; i<g.argc; i++){ |
| 697 | 697 | zName = g.argv[i]; |
| 698 | 698 | if( i>2 ) fossil_print("%.79c\n",'-'); |
| 699 | 699 | rid = symbolic_name_to_rid(zName, zType); |
| 700 | 700 | if( rid<0 ){ |
| 701 | 701 |
| --- src/name.c | |
| +++ src/name.c | |
| @@ -690,11 +690,11 @@ | |
| 690 | zType = find_option("type",0,1); |
| 691 | |
| 692 | /* We should be done with options.. */ |
| 693 | verify_all_options(); |
| 694 | |
| 695 | if( g.argc<3 ) usage("whatis NAME ..."); |
| 696 | for(i=2; i<g.argc; i++){ |
| 697 | zName = g.argv[i]; |
| 698 | if( i>2 ) fossil_print("%.79c\n",'-'); |
| 699 | rid = symbolic_name_to_rid(zName, zType); |
| 700 | if( rid<0 ){ |
| 701 |
| --- src/name.c | |
| +++ src/name.c | |
| @@ -690,11 +690,11 @@ | |
| 690 | zType = find_option("type",0,1); |
| 691 | |
| 692 | /* We should be done with options.. */ |
| 693 | verify_all_options(); |
| 694 | |
| 695 | if( g.argc<3 ) usage("NAME ..."); |
| 696 | for(i=2; i<g.argc; i++){ |
| 697 | zName = g.argv[i]; |
| 698 | if( i>2 ) fossil_print("%.79c\n",'-'); |
| 699 | rid = symbolic_name_to_rid(zName, zType); |
| 700 | if( rid<0 ){ |
| 701 |
+1
-1
| --- src/sync.c | ||
| +++ src/sync.c | ||
| @@ -316,11 +316,11 @@ | ||
| 316 | 316 | |
| 317 | 317 | /* We should be done with options.. */ |
| 318 | 318 | verify_all_options(); |
| 319 | 319 | |
| 320 | 320 | if( g.argc!=2 && g.argc!=3 ){ |
| 321 | - usage("remote-url ?URL|off?"); | |
| 321 | + usage("?URL|off?"); | |
| 322 | 322 | } |
| 323 | 323 | if( g.argc==3 ){ |
| 324 | 324 | db_unset("last-sync-url", 0); |
| 325 | 325 | db_unset("last-sync-pw", 0); |
| 326 | 326 | db_unset("http-auth", 0); |
| 327 | 327 |
| --- src/sync.c | |
| +++ src/sync.c | |
| @@ -316,11 +316,11 @@ | |
| 316 | |
| 317 | /* We should be done with options.. */ |
| 318 | verify_all_options(); |
| 319 | |
| 320 | if( g.argc!=2 && g.argc!=3 ){ |
| 321 | usage("remote-url ?URL|off?"); |
| 322 | } |
| 323 | if( g.argc==3 ){ |
| 324 | db_unset("last-sync-url", 0); |
| 325 | db_unset("last-sync-pw", 0); |
| 326 | db_unset("http-auth", 0); |
| 327 |
| --- src/sync.c | |
| +++ src/sync.c | |
| @@ -316,11 +316,11 @@ | |
| 316 | |
| 317 | /* We should be done with options.. */ |
| 318 | verify_all_options(); |
| 319 | |
| 320 | if( g.argc!=2 && g.argc!=3 ){ |
| 321 | usage("?URL|off?"); |
| 322 | } |
| 323 | if( g.argc==3 ){ |
| 324 | db_unset("last-sync-url", 0); |
| 325 | db_unset("last-sync-pw", 0); |
| 326 | db_unset("http-auth", 0); |
| 327 |
+1
-1
| --- src/tag.c | ||
| +++ src/tag.c | ||
| @@ -520,11 +520,11 @@ | ||
| 520 | 520 | fossil_print("%s\n", zName); |
| 521 | 521 | } |
| 522 | 522 | } |
| 523 | 523 | db_finalize(&q); |
| 524 | 524 | }else{ |
| 525 | - usage("tag list ?CHECK-IN?"); | |
| 525 | + usage("list ?CHECK-IN?"); | |
| 526 | 526 | } |
| 527 | 527 | }else |
| 528 | 528 | { |
| 529 | 529 | goto tag_cmd_usage; |
| 530 | 530 | } |
| 531 | 531 |
| --- src/tag.c | |
| +++ src/tag.c | |
| @@ -520,11 +520,11 @@ | |
| 520 | fossil_print("%s\n", zName); |
| 521 | } |
| 522 | } |
| 523 | db_finalize(&q); |
| 524 | }else{ |
| 525 | usage("tag list ?CHECK-IN?"); |
| 526 | } |
| 527 | }else |
| 528 | { |
| 529 | goto tag_cmd_usage; |
| 530 | } |
| 531 |
| --- src/tag.c | |
| +++ src/tag.c | |
| @@ -520,11 +520,11 @@ | |
| 520 | fossil_print("%s\n", zName); |
| 521 | } |
| 522 | } |
| 523 | db_finalize(&q); |
| 524 | }else{ |
| 525 | usage("list ?CHECK-IN?"); |
| 526 | } |
| 527 | }else |
| 528 | { |
| 529 | goto tag_cmd_usage; |
| 530 | } |
| 531 |