Fossil SCM
By default, do not show wikis associated with check-ins and branches in the output of 'fossil wiki ls'. This is the CLI pendant to [29a24941e].
Commit
4877e77a97878c9422191c976f15c720ff0b46bf3fa65ee3cf07193ee68d1304
Parent
dbcb446970c3028…
1 file changed
+10
-1
+10
-1
| --- src/wiki.c | ||
| +++ src/wiki.c | ||
| @@ -2189,19 +2189,22 @@ | ||
| 2189 | 2189 | ** |
| 2190 | 2190 | ** > fossil wiki list ?OPTIONS? |
| 2191 | 2191 | ** > fossil wiki ls ?OPTIONS? |
| 2192 | 2192 | ** |
| 2193 | 2193 | ** Lists all wiki entries, one per line, ordered |
| 2194 | -** case-insensitively by name. | |
| 2194 | +** case-insensitively by name. Wiki pages associated with | |
| 2195 | +** check-ins and branches are NOT shown, unless -a is given. | |
| 2195 | 2196 | ** |
| 2196 | 2197 | ** Options: |
| 2197 | 2198 | ** --all Include "deleted" pages in output. |
| 2198 | 2199 | ** By default deleted pages are elided. |
| 2199 | 2200 | ** -t|--technote Technotes will be listed instead of |
| 2200 | 2201 | ** pages. The technotes will be in order |
| 2201 | 2202 | ** of timestamp with the most recent |
| 2202 | 2203 | ** first. |
| 2204 | +** -a|--show-associated Show wiki pages associated with | |
| 2205 | +** check-ins and branches. | |
| 2203 | 2206 | ** -s|--show-technote-ids The id of the tech note will be listed |
| 2204 | 2207 | ** along side the timestamp. The tech note |
| 2205 | 2208 | ** id will be the first word on each line. |
| 2206 | 2209 | ** This option only applies if the |
| 2207 | 2210 | ** --technote option is also specified. |
| @@ -2431,10 +2434,11 @@ | ||
| 2431 | 2434 | }else if(( strncmp(g.argv[2],"list",n)==0 ) |
| 2432 | 2435 | || ( strncmp(g.argv[2],"ls",n)==0 )){ |
| 2433 | 2436 | Stmt q; |
| 2434 | 2437 | const int fTechnote = find_option("technote","t",0)!=0; |
| 2435 | 2438 | const int showIds = find_option("show-technote-ids","s",0)!=0; |
| 2439 | + const int showCkBr = find_option("show-associated","a",0)!=0; | |
| 2436 | 2440 | verify_all_options(); |
| 2437 | 2441 | if (fTechnote==0){ |
| 2438 | 2442 | db_prepare(&q, listAllWikiPages/*works-like:""*/); |
| 2439 | 2443 | }else{ |
| 2440 | 2444 | db_prepare(&q, |
| @@ -2449,10 +2453,15 @@ | ||
| 2449 | 2453 | while( db_step(&q)==SQLITE_ROW ){ |
| 2450 | 2454 | const char *zName = db_column_text(&q, 0); |
| 2451 | 2455 | const int wrid = db_column_int(&q, 2); |
| 2452 | 2456 | if(!showAll && !wrid){ |
| 2453 | 2457 | continue; |
| 2458 | + } | |
| 2459 | + if( !showCkBr && | |
| 2460 | + (sqlite3_strglob("checkin/*", zName)==0 || | |
| 2461 | + sqlite3_strglob("branch/*", zName)==0) ){ | |
| 2462 | + continue; | |
| 2454 | 2463 | } |
| 2455 | 2464 | if( showIds ){ |
| 2456 | 2465 | const char *zUuid = db_column_text(&q, 1); |
| 2457 | 2466 | fossil_print("%s ",zUuid); |
| 2458 | 2467 | } |
| 2459 | 2468 |
| --- src/wiki.c | |
| +++ src/wiki.c | |
| @@ -2189,19 +2189,22 @@ | |
| 2189 | ** |
| 2190 | ** > fossil wiki list ?OPTIONS? |
| 2191 | ** > fossil wiki ls ?OPTIONS? |
| 2192 | ** |
| 2193 | ** Lists all wiki entries, one per line, ordered |
| 2194 | ** case-insensitively by name. |
| 2195 | ** |
| 2196 | ** Options: |
| 2197 | ** --all Include "deleted" pages in output. |
| 2198 | ** By default deleted pages are elided. |
| 2199 | ** -t|--technote Technotes will be listed instead of |
| 2200 | ** pages. The technotes will be in order |
| 2201 | ** of timestamp with the most recent |
| 2202 | ** first. |
| 2203 | ** -s|--show-technote-ids The id of the tech note will be listed |
| 2204 | ** along side the timestamp. The tech note |
| 2205 | ** id will be the first word on each line. |
| 2206 | ** This option only applies if the |
| 2207 | ** --technote option is also specified. |
| @@ -2431,10 +2434,11 @@ | |
| 2431 | }else if(( strncmp(g.argv[2],"list",n)==0 ) |
| 2432 | || ( strncmp(g.argv[2],"ls",n)==0 )){ |
| 2433 | Stmt q; |
| 2434 | const int fTechnote = find_option("technote","t",0)!=0; |
| 2435 | const int showIds = find_option("show-technote-ids","s",0)!=0; |
| 2436 | verify_all_options(); |
| 2437 | if (fTechnote==0){ |
| 2438 | db_prepare(&q, listAllWikiPages/*works-like:""*/); |
| 2439 | }else{ |
| 2440 | db_prepare(&q, |
| @@ -2449,10 +2453,15 @@ | |
| 2449 | while( db_step(&q)==SQLITE_ROW ){ |
| 2450 | const char *zName = db_column_text(&q, 0); |
| 2451 | const int wrid = db_column_int(&q, 2); |
| 2452 | if(!showAll && !wrid){ |
| 2453 | continue; |
| 2454 | } |
| 2455 | if( showIds ){ |
| 2456 | const char *zUuid = db_column_text(&q, 1); |
| 2457 | fossil_print("%s ",zUuid); |
| 2458 | } |
| 2459 |
| --- src/wiki.c | |
| +++ src/wiki.c | |
| @@ -2189,19 +2189,22 @@ | |
| 2189 | ** |
| 2190 | ** > fossil wiki list ?OPTIONS? |
| 2191 | ** > fossil wiki ls ?OPTIONS? |
| 2192 | ** |
| 2193 | ** Lists all wiki entries, one per line, ordered |
| 2194 | ** case-insensitively by name. Wiki pages associated with |
| 2195 | ** check-ins and branches are NOT shown, unless -a is given. |
| 2196 | ** |
| 2197 | ** Options: |
| 2198 | ** --all Include "deleted" pages in output. |
| 2199 | ** By default deleted pages are elided. |
| 2200 | ** -t|--technote Technotes will be listed instead of |
| 2201 | ** pages. The technotes will be in order |
| 2202 | ** of timestamp with the most recent |
| 2203 | ** first. |
| 2204 | ** -a|--show-associated Show wiki pages associated with |
| 2205 | ** check-ins and branches. |
| 2206 | ** -s|--show-technote-ids The id of the tech note will be listed |
| 2207 | ** along side the timestamp. The tech note |
| 2208 | ** id will be the first word on each line. |
| 2209 | ** This option only applies if the |
| 2210 | ** --technote option is also specified. |
| @@ -2431,10 +2434,11 @@ | |
| 2434 | }else if(( strncmp(g.argv[2],"list",n)==0 ) |
| 2435 | || ( strncmp(g.argv[2],"ls",n)==0 )){ |
| 2436 | Stmt q; |
| 2437 | const int fTechnote = find_option("technote","t",0)!=0; |
| 2438 | const int showIds = find_option("show-technote-ids","s",0)!=0; |
| 2439 | const int showCkBr = find_option("show-associated","a",0)!=0; |
| 2440 | verify_all_options(); |
| 2441 | if (fTechnote==0){ |
| 2442 | db_prepare(&q, listAllWikiPages/*works-like:""*/); |
| 2443 | }else{ |
| 2444 | db_prepare(&q, |
| @@ -2449,10 +2453,15 @@ | |
| 2453 | while( db_step(&q)==SQLITE_ROW ){ |
| 2454 | const char *zName = db_column_text(&q, 0); |
| 2455 | const int wrid = db_column_int(&q, 2); |
| 2456 | if(!showAll && !wrid){ |
| 2457 | continue; |
| 2458 | } |
| 2459 | if( !showCkBr && |
| 2460 | (sqlite3_strglob("checkin/*", zName)==0 || |
| 2461 | sqlite3_strglob("branch/*", zName)==0) ){ |
| 2462 | continue; |
| 2463 | } |
| 2464 | if( showIds ){ |
| 2465 | const char *zUuid = db_column_text(&q, 1); |
| 2466 | fossil_print("%s ",zUuid); |
| 2467 | } |
| 2468 |