Fossil SCM
removed 2 remaining debug lines. Cleaned up help text.
Commit
87a1a31d1d1d9c71db2e291c05c6a6b0557dba70
Parent
5fb1152dab8160e…
1 file changed
+15
-5
+15
-5
| --- src/wiki.c | ||
| +++ src/wiki.c | ||
| @@ -606,16 +606,28 @@ | ||
| 606 | 606 | } |
| 607 | 607 | |
| 608 | 608 | /* |
| 609 | 609 | ** COMMAND: wiki |
| 610 | 610 | ** |
| 611 | -** Usage: %fossil wiki (export|import) EntryName | |
| 611 | +** Usage: %fossil wiki (export|import|list) WikiName | |
| 612 | +** | |
| 613 | +** Run various subcommands to fetch wiki entries. | |
| 614 | +** | |
| 615 | +** %fossil wiki export WikiName | |
| 616 | +** | |
| 617 | +** Sends the latest version of the WikiName wiki | |
| 618 | +** entry to stdout. | |
| 619 | +** | |
| 620 | +** %fossil wiki list | |
| 621 | +** | |
| 622 | +** Lists all wiki entries, one per line. | |
| 612 | 623 | ** |
| 613 | 624 | ** |
| 614 | -** TODOS: | |
| 625 | +** TODOs: | |
| 615 | 626 | ** |
| 616 | -** export WikiName ?UUID? ?-f outfile? | |
| 627 | +** %fossil export WikiName ?UUID? ?-f outfile? | |
| 628 | +** %fossil import WikiName ?-f infile? | |
| 617 | 629 | */ |
| 618 | 630 | void wiki_cmd(void){ |
| 619 | 631 | int n; |
| 620 | 632 | db_find_and_open_repository(1); |
| 621 | 633 | if( g.argc<3 ){ |
| @@ -641,11 +653,10 @@ | ||
| 641 | 653 | |
| 642 | 654 | sql = mprintf("select x.rid from tag t, tagxref x " |
| 643 | 655 | "where x.tagid=t.tagid and t.tagname='wiki-%q' " |
| 644 | 656 | " order by x.mtime desc limit 1", |
| 645 | 657 | wname ); |
| 646 | - printf("SQL=%s\n",sql); | |
| 647 | 658 | db_prepare(&q, "%z", sql ); |
| 648 | 659 | while( db_step(&q) == SQLITE_ROW ){ |
| 649 | 660 | rid = db_column_int(&q,0); |
| 650 | 661 | break; |
| 651 | 662 | } |
| @@ -652,11 +663,10 @@ | ||
| 652 | 663 | db_finalize(&q); |
| 653 | 664 | if( -1 == rid ){ |
| 654 | 665 | fprintf(stderr,"export error: wiki entry [%s] not found.\n",wname); |
| 655 | 666 | exit(1); |
| 656 | 667 | } |
| 657 | - fprintf(stderr,"export rid==%d\n", rid ); | |
| 658 | 668 | if( ! content_get(rid,&buf) ){ |
| 659 | 669 | fprintf(stderr,"export error: content_get(%d) returned 0\n", rid ); |
| 660 | 670 | exit(1); |
| 661 | 671 | }else |
| 662 | 672 | { |
| 663 | 673 |
| --- src/wiki.c | |
| +++ src/wiki.c | |
| @@ -606,16 +606,28 @@ | |
| 606 | } |
| 607 | |
| 608 | /* |
| 609 | ** COMMAND: wiki |
| 610 | ** |
| 611 | ** Usage: %fossil wiki (export|import) EntryName |
| 612 | ** |
| 613 | ** |
| 614 | ** TODOS: |
| 615 | ** |
| 616 | ** export WikiName ?UUID? ?-f outfile? |
| 617 | */ |
| 618 | void wiki_cmd(void){ |
| 619 | int n; |
| 620 | db_find_and_open_repository(1); |
| 621 | if( g.argc<3 ){ |
| @@ -641,11 +653,10 @@ | |
| 641 | |
| 642 | sql = mprintf("select x.rid from tag t, tagxref x " |
| 643 | "where x.tagid=t.tagid and t.tagname='wiki-%q' " |
| 644 | " order by x.mtime desc limit 1", |
| 645 | wname ); |
| 646 | printf("SQL=%s\n",sql); |
| 647 | db_prepare(&q, "%z", sql ); |
| 648 | while( db_step(&q) == SQLITE_ROW ){ |
| 649 | rid = db_column_int(&q,0); |
| 650 | break; |
| 651 | } |
| @@ -652,11 +663,10 @@ | |
| 652 | db_finalize(&q); |
| 653 | if( -1 == rid ){ |
| 654 | fprintf(stderr,"export error: wiki entry [%s] not found.\n",wname); |
| 655 | exit(1); |
| 656 | } |
| 657 | fprintf(stderr,"export rid==%d\n", rid ); |
| 658 | if( ! content_get(rid,&buf) ){ |
| 659 | fprintf(stderr,"export error: content_get(%d) returned 0\n", rid ); |
| 660 | exit(1); |
| 661 | }else |
| 662 | { |
| 663 |
| --- src/wiki.c | |
| +++ src/wiki.c | |
| @@ -606,16 +606,28 @@ | |
| 606 | } |
| 607 | |
| 608 | /* |
| 609 | ** COMMAND: wiki |
| 610 | ** |
| 611 | ** Usage: %fossil wiki (export|import|list) WikiName |
| 612 | ** |
| 613 | ** Run various subcommands to fetch wiki entries. |
| 614 | ** |
| 615 | ** %fossil wiki export WikiName |
| 616 | ** |
| 617 | ** Sends the latest version of the WikiName wiki |
| 618 | ** entry to stdout. |
| 619 | ** |
| 620 | ** %fossil wiki list |
| 621 | ** |
| 622 | ** Lists all wiki entries, one per line. |
| 623 | ** |
| 624 | ** |
| 625 | ** TODOs: |
| 626 | ** |
| 627 | ** %fossil export WikiName ?UUID? ?-f outfile? |
| 628 | ** %fossil import WikiName ?-f infile? |
| 629 | */ |
| 630 | void wiki_cmd(void){ |
| 631 | int n; |
| 632 | db_find_and_open_repository(1); |
| 633 | if( g.argc<3 ){ |
| @@ -641,11 +653,10 @@ | |
| 653 | |
| 654 | sql = mprintf("select x.rid from tag t, tagxref x " |
| 655 | "where x.tagid=t.tagid and t.tagname='wiki-%q' " |
| 656 | " order by x.mtime desc limit 1", |
| 657 | wname ); |
| 658 | db_prepare(&q, "%z", sql ); |
| 659 | while( db_step(&q) == SQLITE_ROW ){ |
| 660 | rid = db_column_int(&q,0); |
| 661 | break; |
| 662 | } |
| @@ -652,11 +663,10 @@ | |
| 663 | db_finalize(&q); |
| 664 | if( -1 == rid ){ |
| 665 | fprintf(stderr,"export error: wiki entry [%s] not found.\n",wname); |
| 666 | exit(1); |
| 667 | } |
| 668 | if( ! content_get(rid,&buf) ){ |
| 669 | fprintf(stderr,"export error: content_get(%d) returned 0\n", rid ); |
| 670 | exit(1); |
| 671 | }else |
| 672 | { |
| 673 |