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.

rberteig 2016-03-24 18:23 trunk
Commit 57f1eaecb80dcf27271d6bf380f71a03ebb780b8
+1 -1
--- src/bisect.c
+++ src/bisect.c
@@ -431,11 +431,11 @@
431431
}
432432
if( i>=sizeof(aBisectOption)/sizeof(aBisectOption[0]) ){
433433
fossil_fatal("no such bisect option: %s", g.argv[3]);
434434
}
435435
}else{
436
- usage("bisect option ?NAME? ?VALUE?");
436
+ usage("options ?NAME? ?VALUE?");
437437
}
438438
}else if( strncmp(zCmd, "reset", n)==0 ){
439439
db_multi_exec(
440440
"DELETE FROM vvar WHERE name IN "
441441
" ('bisect-good', 'bisect-bad', 'bisect-log')"
442442
--- 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 @@
979979
int mid;
980980
Stmt q;
981981
const char *zGlob = find_option("glob",0,1);
982982
db_find_and_open_repository(0,0);
983983
verify_all_options();
984
- if( g.argc!=3 ) usage("test-fileage CHECKIN");
984
+ if( g.argc!=3 ) usage("CHECKIN");
985985
mid = name_to_typed_rid(g.argv[2],"ci");
986986
compute_fileage(mid, zGlob);
987987
db_prepare(&q,
988988
"SELECT fid, mid, julianday('now') - mtime, pathname"
989989
" FROM fileage"
990990
--- 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 @@
519519
void test_set_mtime(void){
520520
const char *zFile;
521521
char *zDate;
522522
i64 iMTime;
523523
if( g.argc!=4 ){
524
- usage("test-set-mtime FILENAME DATE/TIME");
524
+ usage("FILENAME DATE/TIME");
525525
}
526526
db_open_or_attach(":memory:", "mem", 0);
527527
iMTime = db_int64(0, "SELECT strftime('%%s',%Q)", g.argv[3]);
528528
zFile = g.argv[2];
529529
file_set_mtime(zFile, iMTime);
530530
--- 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 @@
690690
zType = find_option("type",0,1);
691691
692692
/* We should be done with options.. */
693693
verify_all_options();
694694
695
- if( g.argc<3 ) usage("whatis NAME ...");
695
+ if( g.argc<3 ) usage("NAME ...");
696696
for(i=2; i<g.argc; i++){
697697
zName = g.argv[i];
698698
if( i>2 ) fossil_print("%.79c\n",'-');
699699
rid = symbolic_name_to_rid(zName, zType);
700700
if( rid<0 ){
701701
--- 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 @@
316316
317317
/* We should be done with options.. */
318318
verify_all_options();
319319
320320
if( g.argc!=2 && g.argc!=3 ){
321
- usage("remote-url ?URL|off?");
321
+ usage("?URL|off?");
322322
}
323323
if( g.argc==3 ){
324324
db_unset("last-sync-url", 0);
325325
db_unset("last-sync-pw", 0);
326326
db_unset("http-auth", 0);
327327
--- 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 @@
520520
fossil_print("%s\n", zName);
521521
}
522522
}
523523
db_finalize(&q);
524524
}else{
525
- usage("tag list ?CHECK-IN?");
525
+ usage("list ?CHECK-IN?");
526526
}
527527
}else
528528
{
529529
goto tag_cmd_usage;
530530
}
531531
--- 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

Keyboard Shortcuts

Open search /
Next entry (timeline) j
Previous entry (timeline) k
Open focused entry Enter
Show this help ?
Toggle theme Top nav button