Fossil SCM
Add --limit as alias to --count in "fossil timeline" for consistancy with other commands. Add many short options, like "-a" for "--all" and "-c" for "--closed" (The JSON part already had those)
Commit
8b17c2360a5bc767a40b950bfdfa72db74eba6da
Parent
d38f204d3b02815…
8 files changed
+4
-4
+7
-6
+13
-13
+5
-5
+8
-8
+8
-8
+13
-12
+23
-22
+4
-4
| --- src/bisect.c | ||
| +++ src/bisect.c | ||
| @@ -202,11 +202,11 @@ | ||
| 202 | 202 | ** fossil bisect reset |
| 203 | 203 | ** |
| 204 | 204 | ** Reinitialize a bisect session. This cancels prior bisect history |
| 205 | 205 | ** and allows a bisect session to start over from the beginning. |
| 206 | 206 | ** |
| 207 | -** fossil bisect vlist|ls|status ?--all? | |
| 207 | +** fossil bisect vlist|ls|status ?-a|--all? | |
| 208 | 208 | ** |
| 209 | 209 | ** List the versions in between "bad" and "good". |
| 210 | 210 | ** |
| 211 | 211 | ** fossil bisect undo |
| 212 | 212 | ** |
| @@ -296,11 +296,11 @@ | ||
| 296 | 296 | if( ridBad && ridGood ){ |
| 297 | 297 | zCmd = "next"; |
| 298 | 298 | n = 4; |
| 299 | 299 | } |
| 300 | 300 | } |
| 301 | - /* No else here so that the above commands can morph themselves into | |
| 301 | + /* No else here so that the above commands can morph themselves into | |
| 302 | 302 | ** a "next" command */ |
| 303 | 303 | if( memcmp(zCmd, "next", n)==0 ){ |
| 304 | 304 | PathNode *pMid; |
| 305 | 305 | bisect_path(); |
| 306 | 306 | pMid = path_midpoint(); |
| @@ -369,14 +369,14 @@ | ||
| 369 | 369 | db_multi_exec( |
| 370 | 370 | "DELETE FROM vvar WHERE name IN " |
| 371 | 371 | " ('bisect-good', 'bisect-bad', 'bisect-log')" |
| 372 | 372 | ); |
| 373 | 373 | }else if( memcmp(zCmd, "vlist", n)==0 |
| 374 | - || memcmp(zCmd, "ls", n)==0 | |
| 374 | + || memcmp(zCmd, "ls", n)==0 | |
| 375 | 375 | || memcmp(zCmd, "status", n)==0 |
| 376 | 376 | ){ |
| 377 | - int fAll = find_option("all", 0, 0)!=0; | |
| 377 | + int fAll = find_option("all", "a", 0)!=0; | |
| 378 | 378 | bisect_list(!fAll); |
| 379 | 379 | }else if( !foundCmd ){ |
| 380 | 380 | usage("bad|good|log|next|options|reset|status|undo"); |
| 381 | 381 | } |
| 382 | 382 | } |
| 383 | 383 |
| --- src/bisect.c | |
| +++ src/bisect.c | |
| @@ -202,11 +202,11 @@ | |
| 202 | ** fossil bisect reset |
| 203 | ** |
| 204 | ** Reinitialize a bisect session. This cancels prior bisect history |
| 205 | ** and allows a bisect session to start over from the beginning. |
| 206 | ** |
| 207 | ** fossil bisect vlist|ls|status ?--all? |
| 208 | ** |
| 209 | ** List the versions in between "bad" and "good". |
| 210 | ** |
| 211 | ** fossil bisect undo |
| 212 | ** |
| @@ -296,11 +296,11 @@ | |
| 296 | if( ridBad && ridGood ){ |
| 297 | zCmd = "next"; |
| 298 | n = 4; |
| 299 | } |
| 300 | } |
| 301 | /* No else here so that the above commands can morph themselves into |
| 302 | ** a "next" command */ |
| 303 | if( memcmp(zCmd, "next", n)==0 ){ |
| 304 | PathNode *pMid; |
| 305 | bisect_path(); |
| 306 | pMid = path_midpoint(); |
| @@ -369,14 +369,14 @@ | |
| 369 | db_multi_exec( |
| 370 | "DELETE FROM vvar WHERE name IN " |
| 371 | " ('bisect-good', 'bisect-bad', 'bisect-log')" |
| 372 | ); |
| 373 | }else if( memcmp(zCmd, "vlist", n)==0 |
| 374 | || memcmp(zCmd, "ls", n)==0 |
| 375 | || memcmp(zCmd, "status", n)==0 |
| 376 | ){ |
| 377 | int fAll = find_option("all", 0, 0)!=0; |
| 378 | bisect_list(!fAll); |
| 379 | }else if( !foundCmd ){ |
| 380 | usage("bad|good|log|next|options|reset|status|undo"); |
| 381 | } |
| 382 | } |
| 383 |
| --- src/bisect.c | |
| +++ src/bisect.c | |
| @@ -202,11 +202,11 @@ | |
| 202 | ** fossil bisect reset |
| 203 | ** |
| 204 | ** Reinitialize a bisect session. This cancels prior bisect history |
| 205 | ** and allows a bisect session to start over from the beginning. |
| 206 | ** |
| 207 | ** fossil bisect vlist|ls|status ?-a|--all? |
| 208 | ** |
| 209 | ** List the versions in between "bad" and "good". |
| 210 | ** |
| 211 | ** fossil bisect undo |
| 212 | ** |
| @@ -296,11 +296,11 @@ | |
| 296 | if( ridBad && ridGood ){ |
| 297 | zCmd = "next"; |
| 298 | n = 4; |
| 299 | } |
| 300 | } |
| 301 | /* No else here so that the above commands can morph themselves into |
| 302 | ** a "next" command */ |
| 303 | if( memcmp(zCmd, "next", n)==0 ){ |
| 304 | PathNode *pMid; |
| 305 | bisect_path(); |
| 306 | pMid = path_midpoint(); |
| @@ -369,14 +369,14 @@ | |
| 369 | db_multi_exec( |
| 370 | "DELETE FROM vvar WHERE name IN " |
| 371 | " ('bisect-good', 'bisect-bad', 'bisect-log')" |
| 372 | ); |
| 373 | }else if( memcmp(zCmd, "vlist", n)==0 |
| 374 | || memcmp(zCmd, "ls", n)==0 |
| 375 | || memcmp(zCmd, "status", n)==0 |
| 376 | ){ |
| 377 | int fAll = find_option("all", "a", 0)!=0; |
| 378 | bisect_list(!fAll); |
| 379 | }else if( !foundCmd ){ |
| 380 | usage("bad|good|log|next|options|reset|status|undo"); |
| 381 | } |
| 382 | } |
| 383 |
+7
-6
| --- src/branch.c | ||
| +++ src/branch.c | ||
| @@ -238,15 +238,16 @@ | ||
| 238 | 238 | ** --bgcolor COLOR use COLOR instead of automatic background |
| 239 | 239 | ** --nosign do not sign contents on this branch |
| 240 | 240 | ** --date-override DATE DATE to use instead of 'now' |
| 241 | 241 | ** --user-override USER USER to use instead of the current default |
| 242 | 242 | ** |
| 243 | -** %fossil branch list ?--all | --closed? | |
| 244 | -** %fossil branch ls ?--all | --closed? | |
| 243 | +** %fossil branch list ?-a|--all|-c|--closed? | |
| 244 | +** %fossil branch ls ?-a|--all|-c|--closed? | |
| 245 | 245 | ** |
| 246 | -** List all branches. Use --all or --closed to list all branches | |
| 247 | -** or closed branches. The default is to show only open branches. | |
| 246 | +** List all branches. Use -a or --all to list all branches and | |
| 247 | +** -c or --closed to list all closed branches. The default is to | |
| 248 | +** show only open branches. | |
| 248 | 249 | ** |
| 249 | 250 | ** Options: |
| 250 | 251 | ** -R|--repository FILE Run commands on repository FILE |
| 251 | 252 | */ |
| 252 | 253 | void branch_cmd(void){ |
| @@ -262,12 +263,12 @@ | ||
| 262 | 263 | branch_new(); |
| 263 | 264 | }else if( (strncmp(zCmd,"list",n)==0)||(strncmp(zCmd, "ls", n)==0) ){ |
| 264 | 265 | Stmt q; |
| 265 | 266 | int vid; |
| 266 | 267 | char *zCurrent = 0; |
| 267 | - int showAll = find_option("all",0,0)!=0; | |
| 268 | - int showClosed = find_option("closed",0,0)!=0; | |
| 268 | + int showAll = find_option("all","a",0)!=0; | |
| 269 | + int showClosed = find_option("closed","c",0)!=0; | |
| 269 | 270 | |
| 270 | 271 | if( g.localOpen ){ |
| 271 | 272 | vid = db_lget_int("checkout", 0); |
| 272 | 273 | zCurrent = db_text(0, "SELECT value FROM tagxref" |
| 273 | 274 | " WHERE rid=%d AND tagid=%d", vid, TAG_BRANCH); |
| 274 | 275 |
| --- src/branch.c | |
| +++ src/branch.c | |
| @@ -238,15 +238,16 @@ | |
| 238 | ** --bgcolor COLOR use COLOR instead of automatic background |
| 239 | ** --nosign do not sign contents on this branch |
| 240 | ** --date-override DATE DATE to use instead of 'now' |
| 241 | ** --user-override USER USER to use instead of the current default |
| 242 | ** |
| 243 | ** %fossil branch list ?--all | --closed? |
| 244 | ** %fossil branch ls ?--all | --closed? |
| 245 | ** |
| 246 | ** List all branches. Use --all or --closed to list all branches |
| 247 | ** or closed branches. The default is to show only open branches. |
| 248 | ** |
| 249 | ** Options: |
| 250 | ** -R|--repository FILE Run commands on repository FILE |
| 251 | */ |
| 252 | void branch_cmd(void){ |
| @@ -262,12 +263,12 @@ | |
| 262 | branch_new(); |
| 263 | }else if( (strncmp(zCmd,"list",n)==0)||(strncmp(zCmd, "ls", n)==0) ){ |
| 264 | Stmt q; |
| 265 | int vid; |
| 266 | char *zCurrent = 0; |
| 267 | int showAll = find_option("all",0,0)!=0; |
| 268 | int showClosed = find_option("closed",0,0)!=0; |
| 269 | |
| 270 | if( g.localOpen ){ |
| 271 | vid = db_lget_int("checkout", 0); |
| 272 | zCurrent = db_text(0, "SELECT value FROM tagxref" |
| 273 | " WHERE rid=%d AND tagid=%d", vid, TAG_BRANCH); |
| 274 |
| --- src/branch.c | |
| +++ src/branch.c | |
| @@ -238,15 +238,16 @@ | |
| 238 | ** --bgcolor COLOR use COLOR instead of automatic background |
| 239 | ** --nosign do not sign contents on this branch |
| 240 | ** --date-override DATE DATE to use instead of 'now' |
| 241 | ** --user-override USER USER to use instead of the current default |
| 242 | ** |
| 243 | ** %fossil branch list ?-a|--all|-c|--closed? |
| 244 | ** %fossil branch ls ?-a|--all|-c|--closed? |
| 245 | ** |
| 246 | ** List all branches. Use -a or --all to list all branches and |
| 247 | ** -c or --closed to list all closed branches. The default is to |
| 248 | ** show only open branches. |
| 249 | ** |
| 250 | ** Options: |
| 251 | ** -R|--repository FILE Run commands on repository FILE |
| 252 | */ |
| 253 | void branch_cmd(void){ |
| @@ -262,12 +263,12 @@ | |
| 263 | branch_new(); |
| 264 | }else if( (strncmp(zCmd,"list",n)==0)||(strncmp(zCmd, "ls", n)==0) ){ |
| 265 | Stmt q; |
| 266 | int vid; |
| 267 | char *zCurrent = 0; |
| 268 | int showAll = find_option("all","a",0)!=0; |
| 269 | int showClosed = find_option("closed","c",0)!=0; |
| 270 | |
| 271 | if( g.localOpen ){ |
| 272 | vid = db_lget_int("checkout", 0); |
| 273 | zCurrent = db_text(0, "SELECT value FROM tagxref" |
| 274 | " WHERE rid=%d AND tagid=%d", vid, TAG_BRANCH); |
| 275 |
+13
-13
| --- src/descendants.c | ||
| +++ src/descendants.c | ||
| @@ -71,11 +71,11 @@ | ||
| 71 | 71 | bag_init(&pending); |
| 72 | 72 | bag_insert(&pending, iBase); |
| 73 | 73 | |
| 74 | 74 | /* This query returns all non-branch-merge children of check-in :rid. |
| 75 | 75 | ** |
| 76 | - ** If a child is a merge of a fork within the same branch, it is | |
| 76 | + ** If a child is a merge of a fork within the same branch, it is | |
| 77 | 77 | ** returned. Only merge children in different branches are excluded. |
| 78 | 78 | */ |
| 79 | 79 | db_prepare(&q1, |
| 80 | 80 | "SELECT cid FROM plink" |
| 81 | 81 | " WHERE pid=:rid" |
| @@ -84,25 +84,25 @@ | ||
| 84 | 84 | " WHERE tagid=%d AND rid=plink.pid), 'trunk')" |
| 85 | 85 | "=coalesce((SELECT value FROM tagxref" |
| 86 | 86 | " WHERE tagid=%d AND rid=plink.cid), 'trunk'))", |
| 87 | 87 | TAG_BRANCH, TAG_BRANCH |
| 88 | 88 | ); |
| 89 | - | |
| 89 | + | |
| 90 | 90 | /* This query returns a single row if check-in :rid is the first |
| 91 | 91 | ** check-in of a new branch. |
| 92 | 92 | */ |
| 93 | - db_prepare(&isBr, | |
| 93 | + db_prepare(&isBr, | |
| 94 | 94 | "SELECT 1 FROM tagxref" |
| 95 | 95 | " WHERE rid=:rid AND tagid=%d AND tagtype=2" |
| 96 | 96 | " AND srcid>0", |
| 97 | 97 | TAG_BRANCH |
| 98 | 98 | ); |
| 99 | - | |
| 99 | + | |
| 100 | 100 | /* This statement inserts check-in :rid into the LEAVES table. |
| 101 | 101 | */ |
| 102 | 102 | db_prepare(&ins, "INSERT OR IGNORE INTO leaves VALUES(:rid)"); |
| 103 | - | |
| 103 | + | |
| 104 | 104 | while( bag_count(&pending) ){ |
| 105 | 105 | int rid = bag_first(&pending); |
| 106 | 106 | int cnt = 0; |
| 107 | 107 | bag_remove(&pending, rid); |
| 108 | 108 | db_bind_int(&q1, ":rid", rid); |
| @@ -209,11 +209,11 @@ | ||
| 209 | 209 | " generation INTEGER PRIMARY KEY);" |
| 210 | 210 | "DELETE FROM ancestor;" |
| 211 | 211 | "INSERT INTO ancestor VALUES(%d, 0);", rid |
| 212 | 212 | ); |
| 213 | 213 | db_prepare(&ins, "INSERT INTO ancestor VALUES(:rid, :gen)"); |
| 214 | - db_prepare(&q, | |
| 214 | + db_prepare(&q, | |
| 215 | 215 | "SELECT pid FROM plink" |
| 216 | 216 | " WHERE cid=:rid AND isprim" |
| 217 | 217 | ); |
| 218 | 218 | while( (N--)>0 ){ |
| 219 | 219 | db_bind_int(&q, ":rid", rid); |
| @@ -339,29 +339,29 @@ | ||
| 339 | 339 | ** COMMAND: leaves* |
| 340 | 340 | ** |
| 341 | 341 | ** Usage: %fossil leaves ?OPTIONS? |
| 342 | 342 | ** |
| 343 | 343 | ** Find leaves of all branches. By default show only open leaves. |
| 344 | -** The --all flag causes all leaves (closed and open) to be shown. | |
| 345 | -** The --closed flag shows only closed leaves. | |
| 344 | +** The -a|--all flag causes all leaves (closed and open) to be shown. | |
| 345 | +** The -c|--closed flag shows only closed leaves. | |
| 346 | 346 | ** |
| 347 | 347 | ** The --recompute flag causes the content of the "leaf" table in the |
| 348 | 348 | ** repository database to be recomputed. |
| 349 | 349 | ** |
| 350 | 350 | ** Options: |
| 351 | -** --all show ALL leaves | |
| 352 | -** --closed show only closed leaves | |
| 351 | +** -a|--all show ALL leaves | |
| 352 | +** -c|--closed show only closed leaves | |
| 353 | 353 | ** --bybranch order output by branch name |
| 354 | 354 | ** --recompute recompute the "leaf" table in the repository DB |
| 355 | 355 | ** |
| 356 | 356 | ** See also: descendants, finfo, info, branch |
| 357 | 357 | */ |
| 358 | 358 | void leaves_cmd(void){ |
| 359 | 359 | Stmt q; |
| 360 | 360 | Blob sql; |
| 361 | - int showAll = find_option("all", 0, 0)!=0; | |
| 362 | - int showClosed = find_option("closed", 0, 0)!=0; | |
| 361 | + int showAll = find_option("all", "a", 0)!=0; | |
| 362 | + int showClosed = find_option("closed", "c", 0)!=0; | |
| 363 | 363 | int recomputeFlag = find_option("recompute",0,0)!=0; |
| 364 | 364 | int byBranch = find_option("bybranch",0,0)!=0; |
| 365 | 365 | char *zLastBr = 0; |
| 366 | 366 | int n; |
| 367 | 367 | char zLineNo[10]; |
| @@ -504,11 +504,11 @@ | ||
| 504 | 504 | db_bind_int(&ins, ":rid", mid); |
| 505 | 505 | db_step(&ins); |
| 506 | 506 | db_reset(&ins); |
| 507 | 507 | } |
| 508 | 508 | db_finalize(&q); |
| 509 | - | |
| 509 | + | |
| 510 | 510 | db_prepare(&q, "SELECT mid FROM mlink WHERE pid=%d", fid); |
| 511 | 511 | while( db_step(&q)==SQLITE_ROW ){ |
| 512 | 512 | int mid = db_column_int(&q, 0); |
| 513 | 513 | bag_insert(&seen, mid); |
| 514 | 514 | if( usesFlags & USESFILE_DELETE ){ |
| 515 | 515 |
| --- src/descendants.c | |
| +++ src/descendants.c | |
| @@ -71,11 +71,11 @@ | |
| 71 | bag_init(&pending); |
| 72 | bag_insert(&pending, iBase); |
| 73 | |
| 74 | /* This query returns all non-branch-merge children of check-in :rid. |
| 75 | ** |
| 76 | ** If a child is a merge of a fork within the same branch, it is |
| 77 | ** returned. Only merge children in different branches are excluded. |
| 78 | */ |
| 79 | db_prepare(&q1, |
| 80 | "SELECT cid FROM plink" |
| 81 | " WHERE pid=:rid" |
| @@ -84,25 +84,25 @@ | |
| 84 | " WHERE tagid=%d AND rid=plink.pid), 'trunk')" |
| 85 | "=coalesce((SELECT value FROM tagxref" |
| 86 | " WHERE tagid=%d AND rid=plink.cid), 'trunk'))", |
| 87 | TAG_BRANCH, TAG_BRANCH |
| 88 | ); |
| 89 | |
| 90 | /* This query returns a single row if check-in :rid is the first |
| 91 | ** check-in of a new branch. |
| 92 | */ |
| 93 | db_prepare(&isBr, |
| 94 | "SELECT 1 FROM tagxref" |
| 95 | " WHERE rid=:rid AND tagid=%d AND tagtype=2" |
| 96 | " AND srcid>0", |
| 97 | TAG_BRANCH |
| 98 | ); |
| 99 | |
| 100 | /* This statement inserts check-in :rid into the LEAVES table. |
| 101 | */ |
| 102 | db_prepare(&ins, "INSERT OR IGNORE INTO leaves VALUES(:rid)"); |
| 103 | |
| 104 | while( bag_count(&pending) ){ |
| 105 | int rid = bag_first(&pending); |
| 106 | int cnt = 0; |
| 107 | bag_remove(&pending, rid); |
| 108 | db_bind_int(&q1, ":rid", rid); |
| @@ -209,11 +209,11 @@ | |
| 209 | " generation INTEGER PRIMARY KEY);" |
| 210 | "DELETE FROM ancestor;" |
| 211 | "INSERT INTO ancestor VALUES(%d, 0);", rid |
| 212 | ); |
| 213 | db_prepare(&ins, "INSERT INTO ancestor VALUES(:rid, :gen)"); |
| 214 | db_prepare(&q, |
| 215 | "SELECT pid FROM plink" |
| 216 | " WHERE cid=:rid AND isprim" |
| 217 | ); |
| 218 | while( (N--)>0 ){ |
| 219 | db_bind_int(&q, ":rid", rid); |
| @@ -339,29 +339,29 @@ | |
| 339 | ** COMMAND: leaves* |
| 340 | ** |
| 341 | ** Usage: %fossil leaves ?OPTIONS? |
| 342 | ** |
| 343 | ** Find leaves of all branches. By default show only open leaves. |
| 344 | ** The --all flag causes all leaves (closed and open) to be shown. |
| 345 | ** The --closed flag shows only closed leaves. |
| 346 | ** |
| 347 | ** The --recompute flag causes the content of the "leaf" table in the |
| 348 | ** repository database to be recomputed. |
| 349 | ** |
| 350 | ** Options: |
| 351 | ** --all show ALL leaves |
| 352 | ** --closed show only closed leaves |
| 353 | ** --bybranch order output by branch name |
| 354 | ** --recompute recompute the "leaf" table in the repository DB |
| 355 | ** |
| 356 | ** See also: descendants, finfo, info, branch |
| 357 | */ |
| 358 | void leaves_cmd(void){ |
| 359 | Stmt q; |
| 360 | Blob sql; |
| 361 | int showAll = find_option("all", 0, 0)!=0; |
| 362 | int showClosed = find_option("closed", 0, 0)!=0; |
| 363 | int recomputeFlag = find_option("recompute",0,0)!=0; |
| 364 | int byBranch = find_option("bybranch",0,0)!=0; |
| 365 | char *zLastBr = 0; |
| 366 | int n; |
| 367 | char zLineNo[10]; |
| @@ -504,11 +504,11 @@ | |
| 504 | db_bind_int(&ins, ":rid", mid); |
| 505 | db_step(&ins); |
| 506 | db_reset(&ins); |
| 507 | } |
| 508 | db_finalize(&q); |
| 509 | |
| 510 | db_prepare(&q, "SELECT mid FROM mlink WHERE pid=%d", fid); |
| 511 | while( db_step(&q)==SQLITE_ROW ){ |
| 512 | int mid = db_column_int(&q, 0); |
| 513 | bag_insert(&seen, mid); |
| 514 | if( usesFlags & USESFILE_DELETE ){ |
| 515 |
| --- src/descendants.c | |
| +++ src/descendants.c | |
| @@ -71,11 +71,11 @@ | |
| 71 | bag_init(&pending); |
| 72 | bag_insert(&pending, iBase); |
| 73 | |
| 74 | /* This query returns all non-branch-merge children of check-in :rid. |
| 75 | ** |
| 76 | ** If a child is a merge of a fork within the same branch, it is |
| 77 | ** returned. Only merge children in different branches are excluded. |
| 78 | */ |
| 79 | db_prepare(&q1, |
| 80 | "SELECT cid FROM plink" |
| 81 | " WHERE pid=:rid" |
| @@ -84,25 +84,25 @@ | |
| 84 | " WHERE tagid=%d AND rid=plink.pid), 'trunk')" |
| 85 | "=coalesce((SELECT value FROM tagxref" |
| 86 | " WHERE tagid=%d AND rid=plink.cid), 'trunk'))", |
| 87 | TAG_BRANCH, TAG_BRANCH |
| 88 | ); |
| 89 | |
| 90 | /* This query returns a single row if check-in :rid is the first |
| 91 | ** check-in of a new branch. |
| 92 | */ |
| 93 | db_prepare(&isBr, |
| 94 | "SELECT 1 FROM tagxref" |
| 95 | " WHERE rid=:rid AND tagid=%d AND tagtype=2" |
| 96 | " AND srcid>0", |
| 97 | TAG_BRANCH |
| 98 | ); |
| 99 | |
| 100 | /* This statement inserts check-in :rid into the LEAVES table. |
| 101 | */ |
| 102 | db_prepare(&ins, "INSERT OR IGNORE INTO leaves VALUES(:rid)"); |
| 103 | |
| 104 | while( bag_count(&pending) ){ |
| 105 | int rid = bag_first(&pending); |
| 106 | int cnt = 0; |
| 107 | bag_remove(&pending, rid); |
| 108 | db_bind_int(&q1, ":rid", rid); |
| @@ -209,11 +209,11 @@ | |
| 209 | " generation INTEGER PRIMARY KEY);" |
| 210 | "DELETE FROM ancestor;" |
| 211 | "INSERT INTO ancestor VALUES(%d, 0);", rid |
| 212 | ); |
| 213 | db_prepare(&ins, "INSERT INTO ancestor VALUES(:rid, :gen)"); |
| 214 | db_prepare(&q, |
| 215 | "SELECT pid FROM plink" |
| 216 | " WHERE cid=:rid AND isprim" |
| 217 | ); |
| 218 | while( (N--)>0 ){ |
| 219 | db_bind_int(&q, ":rid", rid); |
| @@ -339,29 +339,29 @@ | |
| 339 | ** COMMAND: leaves* |
| 340 | ** |
| 341 | ** Usage: %fossil leaves ?OPTIONS? |
| 342 | ** |
| 343 | ** Find leaves of all branches. By default show only open leaves. |
| 344 | ** The -a|--all flag causes all leaves (closed and open) to be shown. |
| 345 | ** The -c|--closed flag shows only closed leaves. |
| 346 | ** |
| 347 | ** The --recompute flag causes the content of the "leaf" table in the |
| 348 | ** repository database to be recomputed. |
| 349 | ** |
| 350 | ** Options: |
| 351 | ** -a|--all show ALL leaves |
| 352 | ** -c|--closed show only closed leaves |
| 353 | ** --bybranch order output by branch name |
| 354 | ** --recompute recompute the "leaf" table in the repository DB |
| 355 | ** |
| 356 | ** See also: descendants, finfo, info, branch |
| 357 | */ |
| 358 | void leaves_cmd(void){ |
| 359 | Stmt q; |
| 360 | Blob sql; |
| 361 | int showAll = find_option("all", "a", 0)!=0; |
| 362 | int showClosed = find_option("closed", "c", 0)!=0; |
| 363 | int recomputeFlag = find_option("recompute",0,0)!=0; |
| 364 | int byBranch = find_option("bybranch",0,0)!=0; |
| 365 | char *zLastBr = 0; |
| 366 | int n; |
| 367 | char zLineNo[10]; |
| @@ -504,11 +504,11 @@ | |
| 504 | db_bind_int(&ins, ":rid", mid); |
| 505 | db_step(&ins); |
| 506 | db_reset(&ins); |
| 507 | } |
| 508 | db_finalize(&q); |
| 509 | |
| 510 | db_prepare(&q, "SELECT mid FROM mlink WHERE pid=%d", fid); |
| 511 | while( db_step(&q)==SQLITE_ROW ){ |
| 512 | int mid = db_column_int(&q, 0); |
| 513 | bag_insert(&seen, mid); |
| 514 | if( usesFlags & USESFILE_DELETE ){ |
| 515 |
+5
-5
| --- src/diff.c | ||
| +++ src/diff.c | ||
| @@ -2459,13 +2459,13 @@ | ||
| 2459 | 2459 | ** |
| 2460 | 2460 | ** Output the text of a file with markings to show when each line of |
| 2461 | 2461 | ** the file was last modified. |
| 2462 | 2462 | ** |
| 2463 | 2463 | ** Options: |
| 2464 | -** --limit N Only look backwards in time by N versions | |
| 2465 | -** --log List all versions analyzed | |
| 2466 | 2464 | ** --filevers Show file version numbers rather than check-in versions |
| 2465 | +** -l|--log List all versions analyzed | |
| 2466 | +** -n|--limit N Only look backwards in time by N versions | |
| 2467 | 2467 | ** |
| 2468 | 2468 | ** See also: info, finfo, timeline |
| 2469 | 2469 | */ |
| 2470 | 2470 | void annotate_cmd(void){ |
| 2471 | 2471 | int fnid; /* Filename ID */ |
| @@ -2474,20 +2474,20 @@ | ||
| 2474 | 2474 | int cid; /* Checkout ID */ |
| 2475 | 2475 | Blob treename; /* FILENAME translated to canonical form */ |
| 2476 | 2476 | char *zFilename; /* Canonical filename */ |
| 2477 | 2477 | Annotator ann; /* The annotation of the file */ |
| 2478 | 2478 | int i; /* Loop counter */ |
| 2479 | - const char *zLimit; /* The value to the --limit option */ | |
| 2479 | + const char *zLimit; /* The value to the -n|--limit option */ | |
| 2480 | 2480 | int iLimit; /* How far back in time to look */ |
| 2481 | 2481 | int showLog; /* True to show the log */ |
| 2482 | 2482 | int fileVers; /* Show file version instead of check-in versions */ |
| 2483 | 2483 | int annFlags = 0; /* Flags to control annotation properties */ |
| 2484 | 2484 | |
| 2485 | - zLimit = find_option("limit",0,1); | |
| 2485 | + zLimit = find_option("limit","n",1); | |
| 2486 | 2486 | if( zLimit==0 || zLimit[0]==0 ) zLimit = "-1"; |
| 2487 | 2487 | iLimit = atoi(zLimit); |
| 2488 | - showLog = find_option("log",0,0)!=0; | |
| 2488 | + showLog = find_option("log","l",0)!=0; | |
| 2489 | 2489 | fileVers = find_option("filevers",0,0)!=0; |
| 2490 | 2490 | db_must_be_within_tree(); |
| 2491 | 2491 | if( g.argc<3 ) { |
| 2492 | 2492 | usage("FILENAME"); |
| 2493 | 2493 | } |
| 2494 | 2494 |
| --- src/diff.c | |
| +++ src/diff.c | |
| @@ -2459,13 +2459,13 @@ | |
| 2459 | ** |
| 2460 | ** Output the text of a file with markings to show when each line of |
| 2461 | ** the file was last modified. |
| 2462 | ** |
| 2463 | ** Options: |
| 2464 | ** --limit N Only look backwards in time by N versions |
| 2465 | ** --log List all versions analyzed |
| 2466 | ** --filevers Show file version numbers rather than check-in versions |
| 2467 | ** |
| 2468 | ** See also: info, finfo, timeline |
| 2469 | */ |
| 2470 | void annotate_cmd(void){ |
| 2471 | int fnid; /* Filename ID */ |
| @@ -2474,20 +2474,20 @@ | |
| 2474 | int cid; /* Checkout ID */ |
| 2475 | Blob treename; /* FILENAME translated to canonical form */ |
| 2476 | char *zFilename; /* Canonical filename */ |
| 2477 | Annotator ann; /* The annotation of the file */ |
| 2478 | int i; /* Loop counter */ |
| 2479 | const char *zLimit; /* The value to the --limit option */ |
| 2480 | int iLimit; /* How far back in time to look */ |
| 2481 | int showLog; /* True to show the log */ |
| 2482 | int fileVers; /* Show file version instead of check-in versions */ |
| 2483 | int annFlags = 0; /* Flags to control annotation properties */ |
| 2484 | |
| 2485 | zLimit = find_option("limit",0,1); |
| 2486 | if( zLimit==0 || zLimit[0]==0 ) zLimit = "-1"; |
| 2487 | iLimit = atoi(zLimit); |
| 2488 | showLog = find_option("log",0,0)!=0; |
| 2489 | fileVers = find_option("filevers",0,0)!=0; |
| 2490 | db_must_be_within_tree(); |
| 2491 | if( g.argc<3 ) { |
| 2492 | usage("FILENAME"); |
| 2493 | } |
| 2494 |
| --- src/diff.c | |
| +++ src/diff.c | |
| @@ -2459,13 +2459,13 @@ | |
| 2459 | ** |
| 2460 | ** Output the text of a file with markings to show when each line of |
| 2461 | ** the file was last modified. |
| 2462 | ** |
| 2463 | ** Options: |
| 2464 | ** --filevers Show file version numbers rather than check-in versions |
| 2465 | ** -l|--log List all versions analyzed |
| 2466 | ** -n|--limit N Only look backwards in time by N versions |
| 2467 | ** |
| 2468 | ** See also: info, finfo, timeline |
| 2469 | */ |
| 2470 | void annotate_cmd(void){ |
| 2471 | int fnid; /* Filename ID */ |
| @@ -2474,20 +2474,20 @@ | |
| 2474 | int cid; /* Checkout ID */ |
| 2475 | Blob treename; /* FILENAME translated to canonical form */ |
| 2476 | char *zFilename; /* Canonical filename */ |
| 2477 | Annotator ann; /* The annotation of the file */ |
| 2478 | int i; /* Loop counter */ |
| 2479 | const char *zLimit; /* The value to the -n|--limit option */ |
| 2480 | int iLimit; /* How far back in time to look */ |
| 2481 | int showLog; /* True to show the log */ |
| 2482 | int fileVers; /* Show file version instead of check-in versions */ |
| 2483 | int annFlags = 0; /* Flags to control annotation properties */ |
| 2484 | |
| 2485 | zLimit = find_option("limit","n",1); |
| 2486 | if( zLimit==0 || zLimit[0]==0 ) zLimit = "-1"; |
| 2487 | iLimit = atoi(zLimit); |
| 2488 | showLog = find_option("log","l",0)!=0; |
| 2489 | fileVers = find_option("filevers",0,0)!=0; |
| 2490 | db_must_be_within_tree(); |
| 2491 | if( g.argc<3 ) { |
| 2492 | usage("FILENAME"); |
| 2493 | } |
| 2494 |
+8
-8
| --- src/finfo.c | ||
| +++ src/finfo.c | ||
| @@ -27,11 +27,11 @@ | ||
| 27 | 27 | ** |
| 28 | 28 | ** Print the complete change history for a single file going backwards |
| 29 | 29 | ** in time. The default mode is -l. |
| 30 | 30 | ** |
| 31 | 31 | ** For the -l|--log mode: If "-b|--brief" is specified one line per revision |
| 32 | -** is printed, otherwise the full comment is printed. The "--limit N" | |
| 32 | +** is printed, otherwise the full comment is printed. The "-n|--limit N" | |
| 33 | 33 | ** and "--offset P" options limits the output to the first N changes |
| 34 | 34 | ** after skipping P changes. |
| 35 | 35 | ** |
| 36 | 36 | ** In the -s mode prints the status as <status> <revision>. This is |
| 37 | 37 | ** a quick status and does not check for up-to-date-ness of the file. |
| @@ -39,20 +39,20 @@ | ||
| 39 | 39 | ** In the -p mode, there's an optional flag "-r|--revision REVISION". |
| 40 | 40 | ** The specified version (or the latest checked out version) is printed |
| 41 | 41 | ** to stdout. The -p mode is another form of the "cat" command. |
| 42 | 42 | ** |
| 43 | 43 | ** Options: |
| 44 | -** --brief|-b display a brief (one line / revision) summary | |
| 44 | +** -b|--brief display a brief (one line / revision) summary | |
| 45 | 45 | ** --case-sensitive B Enable or disable case-sensitive filenames. B is a |
| 46 | 46 | ** boolean: "yes", "no", "true", "false", etc. |
| 47 | -** --limit N display the first N changes | |
| 48 | -** --log|-l select log mode (the default) | |
| 47 | +** -l|--log select log mode (the default) | |
| 48 | +** -n|--limit N display the first N changes | |
| 49 | 49 | ** --offset P skip P changes |
| 50 | -** --print|-p select print mode | |
| 51 | -** --revision|-r R print the given revision (or ckout, if none is given) | |
| 50 | +** -p|--print select print mode | |
| 51 | +** -r|--revision R print the given revision (or ckout, if none is given) | |
| 52 | 52 | ** to stdout (only in print mode) |
| 53 | -** --status|-s select status mode (print a status indicator for FILE) | |
| 53 | +** -s|--status select status mode (print a status indicator for FILE) | |
| 54 | 54 | ** |
| 55 | 55 | ** See also: artifact, cat, descendants, info, leaves |
| 56 | 56 | */ |
| 57 | 57 | void finfo_cmd(void){ |
| 58 | 58 | capture_case_sensitive_option(); |
| @@ -140,11 +140,11 @@ | ||
| 140 | 140 | int iLimit, iOffset, iBrief; |
| 141 | 141 | |
| 142 | 142 | if( find_option("log","l",0) ){ |
| 143 | 143 | /* this is the default, no-op */ |
| 144 | 144 | } |
| 145 | - zLimit = find_option("limit",0,1); | |
| 145 | + zLimit = find_option("limit","n",1); | |
| 146 | 146 | iLimit = zLimit ? atoi(zLimit) : -1; |
| 147 | 147 | zOffset = find_option("offset",0,1); |
| 148 | 148 | iOffset = zOffset ? atoi(zOffset) : 0; |
| 149 | 149 | iBrief = (find_option("brief","b",0) == 0); |
| 150 | 150 | if( g.argc!=3 ){ |
| 151 | 151 |
| --- src/finfo.c | |
| +++ src/finfo.c | |
| @@ -27,11 +27,11 @@ | |
| 27 | ** |
| 28 | ** Print the complete change history for a single file going backwards |
| 29 | ** in time. The default mode is -l. |
| 30 | ** |
| 31 | ** For the -l|--log mode: If "-b|--brief" is specified one line per revision |
| 32 | ** is printed, otherwise the full comment is printed. The "--limit N" |
| 33 | ** and "--offset P" options limits the output to the first N changes |
| 34 | ** after skipping P changes. |
| 35 | ** |
| 36 | ** In the -s mode prints the status as <status> <revision>. This is |
| 37 | ** a quick status and does not check for up-to-date-ness of the file. |
| @@ -39,20 +39,20 @@ | |
| 39 | ** In the -p mode, there's an optional flag "-r|--revision REVISION". |
| 40 | ** The specified version (or the latest checked out version) is printed |
| 41 | ** to stdout. The -p mode is another form of the "cat" command. |
| 42 | ** |
| 43 | ** Options: |
| 44 | ** --brief|-b display a brief (one line / revision) summary |
| 45 | ** --case-sensitive B Enable or disable case-sensitive filenames. B is a |
| 46 | ** boolean: "yes", "no", "true", "false", etc. |
| 47 | ** --limit N display the first N changes |
| 48 | ** --log|-l select log mode (the default) |
| 49 | ** --offset P skip P changes |
| 50 | ** --print|-p select print mode |
| 51 | ** --revision|-r R print the given revision (or ckout, if none is given) |
| 52 | ** to stdout (only in print mode) |
| 53 | ** --status|-s select status mode (print a status indicator for FILE) |
| 54 | ** |
| 55 | ** See also: artifact, cat, descendants, info, leaves |
| 56 | */ |
| 57 | void finfo_cmd(void){ |
| 58 | capture_case_sensitive_option(); |
| @@ -140,11 +140,11 @@ | |
| 140 | int iLimit, iOffset, iBrief; |
| 141 | |
| 142 | if( find_option("log","l",0) ){ |
| 143 | /* this is the default, no-op */ |
| 144 | } |
| 145 | zLimit = find_option("limit",0,1); |
| 146 | iLimit = zLimit ? atoi(zLimit) : -1; |
| 147 | zOffset = find_option("offset",0,1); |
| 148 | iOffset = zOffset ? atoi(zOffset) : 0; |
| 149 | iBrief = (find_option("brief","b",0) == 0); |
| 150 | if( g.argc!=3 ){ |
| 151 |
| --- src/finfo.c | |
| +++ src/finfo.c | |
| @@ -27,11 +27,11 @@ | |
| 27 | ** |
| 28 | ** Print the complete change history for a single file going backwards |
| 29 | ** in time. The default mode is -l. |
| 30 | ** |
| 31 | ** For the -l|--log mode: If "-b|--brief" is specified one line per revision |
| 32 | ** is printed, otherwise the full comment is printed. The "-n|--limit N" |
| 33 | ** and "--offset P" options limits the output to the first N changes |
| 34 | ** after skipping P changes. |
| 35 | ** |
| 36 | ** In the -s mode prints the status as <status> <revision>. This is |
| 37 | ** a quick status and does not check for up-to-date-ness of the file. |
| @@ -39,20 +39,20 @@ | |
| 39 | ** In the -p mode, there's an optional flag "-r|--revision REVISION". |
| 40 | ** The specified version (or the latest checked out version) is printed |
| 41 | ** to stdout. The -p mode is another form of the "cat" command. |
| 42 | ** |
| 43 | ** Options: |
| 44 | ** -b|--brief display a brief (one line / revision) summary |
| 45 | ** --case-sensitive B Enable or disable case-sensitive filenames. B is a |
| 46 | ** boolean: "yes", "no", "true", "false", etc. |
| 47 | ** -l|--log select log mode (the default) |
| 48 | ** -n|--limit N display the first N changes |
| 49 | ** --offset P skip P changes |
| 50 | ** -p|--print select print mode |
| 51 | ** -r|--revision R print the given revision (or ckout, if none is given) |
| 52 | ** to stdout (only in print mode) |
| 53 | ** -s|--status select status mode (print a status indicator for FILE) |
| 54 | ** |
| 55 | ** See also: artifact, cat, descendants, info, leaves |
| 56 | */ |
| 57 | void finfo_cmd(void){ |
| 58 | capture_case_sensitive_option(); |
| @@ -140,11 +140,11 @@ | |
| 140 | int iLimit, iOffset, iBrief; |
| 141 | |
| 142 | if( find_option("log","l",0) ){ |
| 143 | /* this is the default, no-op */ |
| 144 | } |
| 145 | zLimit = find_option("limit","n",1); |
| 146 | iLimit = zLimit ? atoi(zLimit) : -1; |
| 147 | zOffset = find_option("offset",0,1); |
| 148 | iOffset = zOffset ? atoi(zOffset) : 0; |
| 149 | iBrief = (find_option("brief","b",0) == 0); |
| 150 | if( g.argc!=3 ){ |
| 151 |
+8
-8
| --- src/main.c | ||
| +++ src/main.c | ||
| @@ -797,14 +797,14 @@ | ||
| 797 | 797 | ** |
| 798 | 798 | ** Display information on how to use COMMAND. To display a list of |
| 799 | 799 | ** available commands one of: |
| 800 | 800 | ** |
| 801 | 801 | ** %fossil help Show common commands |
| 802 | -** %fossil help --all Show both common and auxiliary commands | |
| 803 | -** %fossil help --test Show test commands only | |
| 804 | -** %fossil help --aux Show auxiliary commands only | |
| 805 | -** %fossil help --www Show list of WWW pages | |
| 802 | +** %fossil help --a|-all Show both common and auxiliary commands | |
| 803 | +** %fossil help --t|-test Show test commands only | |
| 804 | +** %fossil help --x|-aux Show auxiliary commands only | |
| 805 | +** %fossil help --w|-www Show list of WWW pages | |
| 806 | 806 | */ |
| 807 | 807 | void help_cmd(void){ |
| 808 | 808 | int rc, idx, isPage = 0; |
| 809 | 809 | const char *z; |
| 810 | 810 | char const * zCmdOrPage; |
| @@ -817,23 +817,23 @@ | ||
| 817 | 817 | z, z); |
| 818 | 818 | command_list(0, CMDFLAG_1ST_TIER); |
| 819 | 819 | version_cmd(); |
| 820 | 820 | return; |
| 821 | 821 | } |
| 822 | - if( find_option("all",0,0) ){ | |
| 822 | + if( find_option("all","a",0) ){ | |
| 823 | 823 | command_list(0, CMDFLAG_1ST_TIER | CMDFLAG_2ND_TIER); |
| 824 | 824 | return; |
| 825 | 825 | } |
| 826 | - else if( find_option("www",0,0) ){ | |
| 826 | + else if( find_option("www","w",0) ){ | |
| 827 | 827 | command_list(0, CMDFLAG_WEBPAGE); |
| 828 | 828 | return; |
| 829 | 829 | } |
| 830 | - else if( find_option("aux",0,0) ){ | |
| 830 | + else if( find_option("aux","x",0) ){ | |
| 831 | 831 | command_list(0, CMDFLAG_2ND_TIER); |
| 832 | 832 | return; |
| 833 | 833 | } |
| 834 | - else if( find_option("test",0,0) ){ | |
| 834 | + else if( find_option("test","t",0) ){ | |
| 835 | 835 | command_list(0, CMDFLAG_TEST); |
| 836 | 836 | return; |
| 837 | 837 | } |
| 838 | 838 | isPage = ('/' == *g.argv[2]) ? 1 : 0; |
| 839 | 839 | if(isPage){ |
| 840 | 840 |
| --- src/main.c | |
| +++ src/main.c | |
| @@ -797,14 +797,14 @@ | |
| 797 | ** |
| 798 | ** Display information on how to use COMMAND. To display a list of |
| 799 | ** available commands one of: |
| 800 | ** |
| 801 | ** %fossil help Show common commands |
| 802 | ** %fossil help --all Show both common and auxiliary commands |
| 803 | ** %fossil help --test Show test commands only |
| 804 | ** %fossil help --aux Show auxiliary commands only |
| 805 | ** %fossil help --www Show list of WWW pages |
| 806 | */ |
| 807 | void help_cmd(void){ |
| 808 | int rc, idx, isPage = 0; |
| 809 | const char *z; |
| 810 | char const * zCmdOrPage; |
| @@ -817,23 +817,23 @@ | |
| 817 | z, z); |
| 818 | command_list(0, CMDFLAG_1ST_TIER); |
| 819 | version_cmd(); |
| 820 | return; |
| 821 | } |
| 822 | if( find_option("all",0,0) ){ |
| 823 | command_list(0, CMDFLAG_1ST_TIER | CMDFLAG_2ND_TIER); |
| 824 | return; |
| 825 | } |
| 826 | else if( find_option("www",0,0) ){ |
| 827 | command_list(0, CMDFLAG_WEBPAGE); |
| 828 | return; |
| 829 | } |
| 830 | else if( find_option("aux",0,0) ){ |
| 831 | command_list(0, CMDFLAG_2ND_TIER); |
| 832 | return; |
| 833 | } |
| 834 | else if( find_option("test",0,0) ){ |
| 835 | command_list(0, CMDFLAG_TEST); |
| 836 | return; |
| 837 | } |
| 838 | isPage = ('/' == *g.argv[2]) ? 1 : 0; |
| 839 | if(isPage){ |
| 840 |
| --- src/main.c | |
| +++ src/main.c | |
| @@ -797,14 +797,14 @@ | |
| 797 | ** |
| 798 | ** Display information on how to use COMMAND. To display a list of |
| 799 | ** available commands one of: |
| 800 | ** |
| 801 | ** %fossil help Show common commands |
| 802 | ** %fossil help --a|-all Show both common and auxiliary commands |
| 803 | ** %fossil help --t|-test Show test commands only |
| 804 | ** %fossil help --x|-aux Show auxiliary commands only |
| 805 | ** %fossil help --w|-www Show list of WWW pages |
| 806 | */ |
| 807 | void help_cmd(void){ |
| 808 | int rc, idx, isPage = 0; |
| 809 | const char *z; |
| 810 | char const * zCmdOrPage; |
| @@ -817,23 +817,23 @@ | |
| 817 | z, z); |
| 818 | command_list(0, CMDFLAG_1ST_TIER); |
| 819 | version_cmd(); |
| 820 | return; |
| 821 | } |
| 822 | if( find_option("all","a",0) ){ |
| 823 | command_list(0, CMDFLAG_1ST_TIER | CMDFLAG_2ND_TIER); |
| 824 | return; |
| 825 | } |
| 826 | else if( find_option("www","w",0) ){ |
| 827 | command_list(0, CMDFLAG_WEBPAGE); |
| 828 | return; |
| 829 | } |
| 830 | else if( find_option("aux","x",0) ){ |
| 831 | command_list(0, CMDFLAG_2ND_TIER); |
| 832 | return; |
| 833 | } |
| 834 | else if( find_option("test","t",0) ){ |
| 835 | command_list(0, CMDFLAG_TEST); |
| 836 | return; |
| 837 | } |
| 838 | isPage = ('/' == *g.argv[2]) ? 1 : 0; |
| 839 | if(isPage){ |
| 840 |
+13
-12
| --- src/stash.c | ||
| +++ src/stash.c | ||
| @@ -406,22 +406,22 @@ | ||
| 406 | 406 | ** COMMAND: stash |
| 407 | 407 | ** |
| 408 | 408 | ** Usage: %fossil stash SUBCOMMAND ARGS... |
| 409 | 409 | ** |
| 410 | 410 | ** fossil stash |
| 411 | -** fossil stash save ?-m COMMENT? ?FILES...? | |
| 412 | -** fossil stash snapshot ?-m COMMENT? ?FILES...? | |
| 411 | +** fossil stash save ?-m|--comment COMMENT? ?FILES...? | |
| 412 | +** fossil stash snapshot ?-m|--comment COMMENT? ?FILES...? | |
| 413 | 413 | ** |
| 414 | 414 | ** Save the current changes in the working tree as a new stash. |
| 415 | 415 | ** Then revert the changes back to the last check-in. If FILES |
| 416 | 416 | ** are listed, then only stash and revert the named files. The |
| 417 | 417 | ** "save" verb can be omitted if and only if there are no other |
| 418 | 418 | ** arguments. The "snapshot" verb works the same as "save" but |
| 419 | 419 | ** omits the revert, keeping the check-out unchanged. |
| 420 | 420 | ** |
| 421 | -** fossil stash list ?--detail? | |
| 422 | -** fossil stash ls ?-l? | |
| 421 | +** fossil stash list ?-l|--detail? | |
| 422 | +** fossil stash ls ?-l|--detail? | |
| 423 | 423 | ** |
| 424 | 424 | ** List all changes sets currently stashed. Show information about |
| 425 | 425 | ** individual files in each changeset if --detail or -l is used. |
| 426 | 426 | ** |
| 427 | 427 | ** fossil stash show ?STASHID? ?DIFF-FLAGS? |
| @@ -440,32 +440,33 @@ | ||
| 440 | 440 | ** |
| 441 | 441 | ** Update to the baseline checkout for STASHID then apply the |
| 442 | 442 | ** changes of STASHID. Keep STASHID so that it can be reused |
| 443 | 443 | ** This command is undoable. |
| 444 | 444 | ** |
| 445 | -** fossil stash drop ?STASHID? ?--all? | |
| 446 | -** fossil stash rm ?STASHID? ?--all? | |
| 445 | +** fossil stash drop ?STASHID? ?-a|--all? | |
| 446 | +** fossil stash rm ?STASHID? ?-a|--all? | |
| 447 | 447 | ** |
| 448 | 448 | ** Forget everything about STASHID. Forget the whole stash if the |
| 449 | -** --all flag is used. Individual drops are undoable but --all is not. | |
| 449 | +** -a|--all flag is used. Individual drops are undoable but -a|--all | |
| 450 | +** is not. | |
| 450 | 451 | ** |
| 451 | 452 | ** fossil stash diff ?STASHID? |
| 452 | 453 | ** fossil stash gdiff ?STASHID? |
| 453 | 454 | ** |
| 454 | 455 | ** Show diffs of the current working directory and what that |
| 455 | 456 | ** directory would be if STASHID were applied. |
| 456 | 457 | ** |
| 457 | 458 | ** SUMMARY: |
| 458 | 459 | ** fossil stash |
| 459 | -** fossil stash save ?-m COMMENT? ?FILES...? | |
| 460 | -** fossil stash snapshot ?-m COMMENT? ?FILES...? | |
| 461 | -** fossil stash list|ls ?-l? ?--detail? | |
| 460 | +** fossil stash save ?-m|--comment COMMENT? ?FILES...? | |
| 461 | +** fossil stash snapshot ?-m|--comment COMMENT? ?FILES...? | |
| 462 | +** fossil stash list|ls ?-l|--detail? | |
| 462 | 463 | ** fossil stash show ?STASHID? ?DIFF-OPTIONS? |
| 463 | 464 | ** fossil stash pop |
| 464 | 465 | ** fossil stash apply ?STASHID? |
| 465 | 466 | ** fossil stash goto ?STASHID? |
| 466 | -** fossil stash rm|drop ?STASHID? ?--all? | |
| 467 | +** fossil stash rm|drop ?STASHID? ?-a|--all? | |
| 467 | 468 | ** fossil stash [g]diff ?STASHID? ?DIFF-OPTIONS? |
| 468 | 469 | */ |
| 469 | 470 | void stash_cmd(void){ |
| 470 | 471 | const char *zDb; |
| 471 | 472 | const char *zCmd; |
| @@ -560,11 +561,11 @@ | ||
| 560 | 561 | db_finalize(&q); |
| 561 | 562 | if( fDetail ) db_finalize(&q2); |
| 562 | 563 | if( n==0 ) fossil_print("empty stash\n"); |
| 563 | 564 | }else |
| 564 | 565 | if( memcmp(zCmd, "drop", nCmd)==0 || memcmp(zCmd, "rm", nCmd)==0 ){ |
| 565 | - int allFlag = find_option("all", 0, 0)!=0; | |
| 566 | + int allFlag = find_option("all", "a", 0)!=0; | |
| 566 | 567 | if( allFlag ){ |
| 567 | 568 | Blob ans; |
| 568 | 569 | char cReply; |
| 569 | 570 | blob_zero(&ans); |
| 570 | 571 | prompt_user("This action is not undoable. Continue (y/N)? ", &ans); |
| 571 | 572 |
| --- src/stash.c | |
| +++ src/stash.c | |
| @@ -406,22 +406,22 @@ | |
| 406 | ** COMMAND: stash |
| 407 | ** |
| 408 | ** Usage: %fossil stash SUBCOMMAND ARGS... |
| 409 | ** |
| 410 | ** fossil stash |
| 411 | ** fossil stash save ?-m COMMENT? ?FILES...? |
| 412 | ** fossil stash snapshot ?-m COMMENT? ?FILES...? |
| 413 | ** |
| 414 | ** Save the current changes in the working tree as a new stash. |
| 415 | ** Then revert the changes back to the last check-in. If FILES |
| 416 | ** are listed, then only stash and revert the named files. The |
| 417 | ** "save" verb can be omitted if and only if there are no other |
| 418 | ** arguments. The "snapshot" verb works the same as "save" but |
| 419 | ** omits the revert, keeping the check-out unchanged. |
| 420 | ** |
| 421 | ** fossil stash list ?--detail? |
| 422 | ** fossil stash ls ?-l? |
| 423 | ** |
| 424 | ** List all changes sets currently stashed. Show information about |
| 425 | ** individual files in each changeset if --detail or -l is used. |
| 426 | ** |
| 427 | ** fossil stash show ?STASHID? ?DIFF-FLAGS? |
| @@ -440,32 +440,33 @@ | |
| 440 | ** |
| 441 | ** Update to the baseline checkout for STASHID then apply the |
| 442 | ** changes of STASHID. Keep STASHID so that it can be reused |
| 443 | ** This command is undoable. |
| 444 | ** |
| 445 | ** fossil stash drop ?STASHID? ?--all? |
| 446 | ** fossil stash rm ?STASHID? ?--all? |
| 447 | ** |
| 448 | ** Forget everything about STASHID. Forget the whole stash if the |
| 449 | ** --all flag is used. Individual drops are undoable but --all is not. |
| 450 | ** |
| 451 | ** fossil stash diff ?STASHID? |
| 452 | ** fossil stash gdiff ?STASHID? |
| 453 | ** |
| 454 | ** Show diffs of the current working directory and what that |
| 455 | ** directory would be if STASHID were applied. |
| 456 | ** |
| 457 | ** SUMMARY: |
| 458 | ** fossil stash |
| 459 | ** fossil stash save ?-m COMMENT? ?FILES...? |
| 460 | ** fossil stash snapshot ?-m COMMENT? ?FILES...? |
| 461 | ** fossil stash list|ls ?-l? ?--detail? |
| 462 | ** fossil stash show ?STASHID? ?DIFF-OPTIONS? |
| 463 | ** fossil stash pop |
| 464 | ** fossil stash apply ?STASHID? |
| 465 | ** fossil stash goto ?STASHID? |
| 466 | ** fossil stash rm|drop ?STASHID? ?--all? |
| 467 | ** fossil stash [g]diff ?STASHID? ?DIFF-OPTIONS? |
| 468 | */ |
| 469 | void stash_cmd(void){ |
| 470 | const char *zDb; |
| 471 | const char *zCmd; |
| @@ -560,11 +561,11 @@ | |
| 560 | db_finalize(&q); |
| 561 | if( fDetail ) db_finalize(&q2); |
| 562 | if( n==0 ) fossil_print("empty stash\n"); |
| 563 | }else |
| 564 | if( memcmp(zCmd, "drop", nCmd)==0 || memcmp(zCmd, "rm", nCmd)==0 ){ |
| 565 | int allFlag = find_option("all", 0, 0)!=0; |
| 566 | if( allFlag ){ |
| 567 | Blob ans; |
| 568 | char cReply; |
| 569 | blob_zero(&ans); |
| 570 | prompt_user("This action is not undoable. Continue (y/N)? ", &ans); |
| 571 |
| --- src/stash.c | |
| +++ src/stash.c | |
| @@ -406,22 +406,22 @@ | |
| 406 | ** COMMAND: stash |
| 407 | ** |
| 408 | ** Usage: %fossil stash SUBCOMMAND ARGS... |
| 409 | ** |
| 410 | ** fossil stash |
| 411 | ** fossil stash save ?-m|--comment COMMENT? ?FILES...? |
| 412 | ** fossil stash snapshot ?-m|--comment COMMENT? ?FILES...? |
| 413 | ** |
| 414 | ** Save the current changes in the working tree as a new stash. |
| 415 | ** Then revert the changes back to the last check-in. If FILES |
| 416 | ** are listed, then only stash and revert the named files. The |
| 417 | ** "save" verb can be omitted if and only if there are no other |
| 418 | ** arguments. The "snapshot" verb works the same as "save" but |
| 419 | ** omits the revert, keeping the check-out unchanged. |
| 420 | ** |
| 421 | ** fossil stash list ?-l|--detail? |
| 422 | ** fossil stash ls ?-l|--detail? |
| 423 | ** |
| 424 | ** List all changes sets currently stashed. Show information about |
| 425 | ** individual files in each changeset if --detail or -l is used. |
| 426 | ** |
| 427 | ** fossil stash show ?STASHID? ?DIFF-FLAGS? |
| @@ -440,32 +440,33 @@ | |
| 440 | ** |
| 441 | ** Update to the baseline checkout for STASHID then apply the |
| 442 | ** changes of STASHID. Keep STASHID so that it can be reused |
| 443 | ** This command is undoable. |
| 444 | ** |
| 445 | ** fossil stash drop ?STASHID? ?-a|--all? |
| 446 | ** fossil stash rm ?STASHID? ?-a|--all? |
| 447 | ** |
| 448 | ** Forget everything about STASHID. Forget the whole stash if the |
| 449 | ** -a|--all flag is used. Individual drops are undoable but -a|--all |
| 450 | ** is not. |
| 451 | ** |
| 452 | ** fossil stash diff ?STASHID? |
| 453 | ** fossil stash gdiff ?STASHID? |
| 454 | ** |
| 455 | ** Show diffs of the current working directory and what that |
| 456 | ** directory would be if STASHID were applied. |
| 457 | ** |
| 458 | ** SUMMARY: |
| 459 | ** fossil stash |
| 460 | ** fossil stash save ?-m|--comment COMMENT? ?FILES...? |
| 461 | ** fossil stash snapshot ?-m|--comment COMMENT? ?FILES...? |
| 462 | ** fossil stash list|ls ?-l|--detail? |
| 463 | ** fossil stash show ?STASHID? ?DIFF-OPTIONS? |
| 464 | ** fossil stash pop |
| 465 | ** fossil stash apply ?STASHID? |
| 466 | ** fossil stash goto ?STASHID? |
| 467 | ** fossil stash rm|drop ?STASHID? ?-a|--all? |
| 468 | ** fossil stash [g]diff ?STASHID? ?DIFF-OPTIONS? |
| 469 | */ |
| 470 | void stash_cmd(void){ |
| 471 | const char *zDb; |
| 472 | const char *zCmd; |
| @@ -560,11 +561,11 @@ | |
| 561 | db_finalize(&q); |
| 562 | if( fDetail ) db_finalize(&q2); |
| 563 | if( n==0 ) fossil_print("empty stash\n"); |
| 564 | }else |
| 565 | if( memcmp(zCmd, "drop", nCmd)==0 || memcmp(zCmd, "rm", nCmd)==0 ){ |
| 566 | int allFlag = find_option("all", "a", 0)!=0; |
| 567 | if( allFlag ){ |
| 568 | Blob ans; |
| 569 | char cReply; |
| 570 | blob_zero(&ans); |
| 571 | prompt_user("This action is not undoable. Continue (y/N)? ", &ans); |
| 572 |
+23
-22
| --- src/timeline.c | ||
| +++ src/timeline.c | ||
| @@ -453,11 +453,11 @@ | ||
| 453 | 453 | if( (tmFlags & TIMELINE_FRENAMES)!=0 ){ |
| 454 | 454 | if( !isNew && !isDel && zOldName!=0 ){ |
| 455 | 455 | @ <li> %h(zOldName) → %h(zFilename) |
| 456 | 456 | } |
| 457 | 457 | continue; |
| 458 | - } | |
| 458 | + } | |
| 459 | 459 | if( isNew ){ |
| 460 | 460 | @ <li> %h(zFilename) (new file) |
| 461 | 461 | @ %z(xhref("target='diffwindow'","%R/artifact/%S",zNew)) |
| 462 | 462 | @ [view]</a></li> |
| 463 | 463 | }else if( isDel ){ |
| @@ -1533,11 +1533,11 @@ | ||
| 1533 | 1533 | @ event.mtime AS mtime, |
| 1534 | 1534 | @ tagxref.value AS branch |
| 1535 | 1535 | @ FROM tag CROSS JOIN event CROSS JOIN blob |
| 1536 | 1536 | @ LEFT JOIN tagxref ON tagxref.tagid=tag.tagid |
| 1537 | 1537 | @ AND tagxref.tagtype>0 |
| 1538 | - @ AND tagxref.rid=blob.rid | |
| 1538 | + @ AND tagxref.rid=blob.rid | |
| 1539 | 1539 | @ WHERE blob.rid=event.objid |
| 1540 | 1540 | @ AND tag.tagname='branch' |
| 1541 | 1541 | ; |
| 1542 | 1542 | return zBaseSql; |
| 1543 | 1543 | } |
| @@ -1555,17 +1555,16 @@ | ||
| 1555 | 1555 | } |
| 1556 | 1556 | |
| 1557 | 1557 | /* |
| 1558 | 1558 | ** COMMAND: timeline |
| 1559 | 1559 | ** |
| 1560 | -** Usage: %fossil timeline ?WHEN? ?BASELINE|DATETIME? ?-n|--count N? ?-t|--type TYPE? ?-showfiles? | |
| 1560 | +** Usage: %fossil timeline ?WHEN? ?BASELINE|DATETIME? ?OPTIONS? | |
| 1561 | 1561 | ** |
| 1562 | 1562 | ** Print a summary of activity going backwards in date and time |
| 1563 | 1563 | ** specified or from the current date and time if no arguments |
| 1564 | -** are given. Show as many as N (default 20) check-ins. The | |
| 1565 | -** WHEN argument can be any unique abbreviation of one of these | |
| 1566 | -** keywords: | |
| 1564 | +** are given. The WHEN argument can be any unique abbreviation | |
| 1565 | +** of one of these keywords: | |
| 1567 | 1566 | ** |
| 1568 | 1567 | ** before |
| 1569 | 1568 | ** after |
| 1570 | 1569 | ** descendants | children |
| 1571 | 1570 | ** ancestors | parents |
| @@ -1573,25 +1572,24 @@ | ||
| 1573 | 1572 | ** The BASELINE can be any unique prefix of 4 characters or more. |
| 1574 | 1573 | ** The DATETIME should be in the ISO8601 format. For |
| 1575 | 1574 | ** examples: "2007-08-18 07:21:21". You can also say "current" |
| 1576 | 1575 | ** for the current version or "now" for the current time. |
| 1577 | 1576 | ** |
| 1578 | -** The optional TYPE argument may any types supported by the /timeline | |
| 1579 | -** page. For example: | |
| 1580 | -** | |
| 1581 | -** w = wiki commits only | |
| 1582 | -** ci = file commits only | |
| 1583 | -** t = tickets only | |
| 1584 | -** | |
| 1585 | -** The optional showfiles argument, if specified, prints the list of | |
| 1586 | -** files changed in a checkin after the checkin comment. | |
| 1587 | -** | |
| 1577 | +** Options: | |
| 1578 | +** -f|--showfiles print the list of files changed in a checkin after | |
| 1579 | +** the checkin comment. | |
| 1580 | +** -n|--limit N display the first N changes (default 20) | |
| 1581 | +** -t|--type TYPE only display items from the give types, such as: | |
| 1582 | +** ci = file commits only | |
| 1583 | +** e = events only | |
| 1584 | +** t = tickets only | |
| 1585 | +** w = wiki commits only | |
| 1588 | 1586 | */ |
| 1589 | 1587 | void timeline_cmd(void){ |
| 1590 | 1588 | Stmt q; |
| 1591 | 1589 | int n, k; |
| 1592 | - const char *zCount; | |
| 1590 | + const char *zLimit; | |
| 1593 | 1591 | const char *zType; |
| 1594 | 1592 | char *zOrigin; |
| 1595 | 1593 | char *zDate; |
| 1596 | 1594 | Blob sql; |
| 1597 | 1595 | int objid = 0; |
| @@ -1598,14 +1596,17 @@ | ||
| 1598 | 1596 | Blob uuid; |
| 1599 | 1597 | int mode = 0 ; /* 0:none 1: before 2:after 3:children 4:parents */ |
| 1600 | 1598 | int showfilesFlag = 0 ; |
| 1601 | 1599 | showfilesFlag = find_option("showfiles","f", 0)!=0; |
| 1602 | 1600 | db_find_and_open_repository(0, 0); |
| 1603 | - zCount = find_option("count","n",1); | |
| 1601 | + zLimit = find_option("limit","n",1); | |
| 1604 | 1602 | zType = find_option("type","t",1); |
| 1605 | - if( zCount ){ | |
| 1606 | - n = atoi(zCount); | |
| 1603 | + if ( !zLimit ){ | |
| 1604 | + zLimit = find_option("count",0,1); | |
| 1605 | + } | |
| 1606 | + if( zLimit ){ | |
| 1607 | + n = atoi(zLimit); | |
| 1607 | 1608 | }else{ |
| 1608 | 1609 | n = 20; |
| 1609 | 1610 | } |
| 1610 | 1611 | if( g.argc>=4 ){ |
| 1611 | 1612 | k = strlen(g.argv[2]); |
| @@ -1619,12 +1620,12 @@ | ||
| 1619 | 1620 | mode = 3; |
| 1620 | 1621 | }else if( strncmp(g.argv[2],"ancestors",k)==0 && k>1 ){ |
| 1621 | 1622 | mode = 4; |
| 1622 | 1623 | }else if( strncmp(g.argv[2],"parents",k)==0 ){ |
| 1623 | 1624 | mode = 4; |
| 1624 | - }else if(!zType && !zCount){ | |
| 1625 | - usage("?WHEN? ?BASELINE|DATETIME? ?-n|--count N? ?-t|--type TYPE?"); | |
| 1625 | + }else if(!zType && !zLimit){ | |
| 1626 | + usage("?WHEN? ?BASELINE|DATETIME? ?-n|--limit N? ?-t|--type TYPE?"); | |
| 1626 | 1627 | } |
| 1627 | 1628 | if( '-' != *g.argv[3] ){ |
| 1628 | 1629 | zOrigin = g.argv[3]; |
| 1629 | 1630 | }else{ |
| 1630 | 1631 | zOrigin = "now"; |
| 1631 | 1632 |
| --- src/timeline.c | |
| +++ src/timeline.c | |
| @@ -453,11 +453,11 @@ | |
| 453 | if( (tmFlags & TIMELINE_FRENAMES)!=0 ){ |
| 454 | if( !isNew && !isDel && zOldName!=0 ){ |
| 455 | @ <li> %h(zOldName) → %h(zFilename) |
| 456 | } |
| 457 | continue; |
| 458 | } |
| 459 | if( isNew ){ |
| 460 | @ <li> %h(zFilename) (new file) |
| 461 | @ %z(xhref("target='diffwindow'","%R/artifact/%S",zNew)) |
| 462 | @ [view]</a></li> |
| 463 | }else if( isDel ){ |
| @@ -1533,11 +1533,11 @@ | |
| 1533 | @ event.mtime AS mtime, |
| 1534 | @ tagxref.value AS branch |
| 1535 | @ FROM tag CROSS JOIN event CROSS JOIN blob |
| 1536 | @ LEFT JOIN tagxref ON tagxref.tagid=tag.tagid |
| 1537 | @ AND tagxref.tagtype>0 |
| 1538 | @ AND tagxref.rid=blob.rid |
| 1539 | @ WHERE blob.rid=event.objid |
| 1540 | @ AND tag.tagname='branch' |
| 1541 | ; |
| 1542 | return zBaseSql; |
| 1543 | } |
| @@ -1555,17 +1555,16 @@ | |
| 1555 | } |
| 1556 | |
| 1557 | /* |
| 1558 | ** COMMAND: timeline |
| 1559 | ** |
| 1560 | ** Usage: %fossil timeline ?WHEN? ?BASELINE|DATETIME? ?-n|--count N? ?-t|--type TYPE? ?-showfiles? |
| 1561 | ** |
| 1562 | ** Print a summary of activity going backwards in date and time |
| 1563 | ** specified or from the current date and time if no arguments |
| 1564 | ** are given. Show as many as N (default 20) check-ins. The |
| 1565 | ** WHEN argument can be any unique abbreviation of one of these |
| 1566 | ** keywords: |
| 1567 | ** |
| 1568 | ** before |
| 1569 | ** after |
| 1570 | ** descendants | children |
| 1571 | ** ancestors | parents |
| @@ -1573,25 +1572,24 @@ | |
| 1573 | ** The BASELINE can be any unique prefix of 4 characters or more. |
| 1574 | ** The DATETIME should be in the ISO8601 format. For |
| 1575 | ** examples: "2007-08-18 07:21:21". You can also say "current" |
| 1576 | ** for the current version or "now" for the current time. |
| 1577 | ** |
| 1578 | ** The optional TYPE argument may any types supported by the /timeline |
| 1579 | ** page. For example: |
| 1580 | ** |
| 1581 | ** w = wiki commits only |
| 1582 | ** ci = file commits only |
| 1583 | ** t = tickets only |
| 1584 | ** |
| 1585 | ** The optional showfiles argument, if specified, prints the list of |
| 1586 | ** files changed in a checkin after the checkin comment. |
| 1587 | ** |
| 1588 | */ |
| 1589 | void timeline_cmd(void){ |
| 1590 | Stmt q; |
| 1591 | int n, k; |
| 1592 | const char *zCount; |
| 1593 | const char *zType; |
| 1594 | char *zOrigin; |
| 1595 | char *zDate; |
| 1596 | Blob sql; |
| 1597 | int objid = 0; |
| @@ -1598,14 +1596,17 @@ | |
| 1598 | Blob uuid; |
| 1599 | int mode = 0 ; /* 0:none 1: before 2:after 3:children 4:parents */ |
| 1600 | int showfilesFlag = 0 ; |
| 1601 | showfilesFlag = find_option("showfiles","f", 0)!=0; |
| 1602 | db_find_and_open_repository(0, 0); |
| 1603 | zCount = find_option("count","n",1); |
| 1604 | zType = find_option("type","t",1); |
| 1605 | if( zCount ){ |
| 1606 | n = atoi(zCount); |
| 1607 | }else{ |
| 1608 | n = 20; |
| 1609 | } |
| 1610 | if( g.argc>=4 ){ |
| 1611 | k = strlen(g.argv[2]); |
| @@ -1619,12 +1620,12 @@ | |
| 1619 | mode = 3; |
| 1620 | }else if( strncmp(g.argv[2],"ancestors",k)==0 && k>1 ){ |
| 1621 | mode = 4; |
| 1622 | }else if( strncmp(g.argv[2],"parents",k)==0 ){ |
| 1623 | mode = 4; |
| 1624 | }else if(!zType && !zCount){ |
| 1625 | usage("?WHEN? ?BASELINE|DATETIME? ?-n|--count N? ?-t|--type TYPE?"); |
| 1626 | } |
| 1627 | if( '-' != *g.argv[3] ){ |
| 1628 | zOrigin = g.argv[3]; |
| 1629 | }else{ |
| 1630 | zOrigin = "now"; |
| 1631 |
| --- src/timeline.c | |
| +++ src/timeline.c | |
| @@ -453,11 +453,11 @@ | |
| 453 | if( (tmFlags & TIMELINE_FRENAMES)!=0 ){ |
| 454 | if( !isNew && !isDel && zOldName!=0 ){ |
| 455 | @ <li> %h(zOldName) → %h(zFilename) |
| 456 | } |
| 457 | continue; |
| 458 | } |
| 459 | if( isNew ){ |
| 460 | @ <li> %h(zFilename) (new file) |
| 461 | @ %z(xhref("target='diffwindow'","%R/artifact/%S",zNew)) |
| 462 | @ [view]</a></li> |
| 463 | }else if( isDel ){ |
| @@ -1533,11 +1533,11 @@ | |
| 1533 | @ event.mtime AS mtime, |
| 1534 | @ tagxref.value AS branch |
| 1535 | @ FROM tag CROSS JOIN event CROSS JOIN blob |
| 1536 | @ LEFT JOIN tagxref ON tagxref.tagid=tag.tagid |
| 1537 | @ AND tagxref.tagtype>0 |
| 1538 | @ AND tagxref.rid=blob.rid |
| 1539 | @ WHERE blob.rid=event.objid |
| 1540 | @ AND tag.tagname='branch' |
| 1541 | ; |
| 1542 | return zBaseSql; |
| 1543 | } |
| @@ -1555,17 +1555,16 @@ | |
| 1555 | } |
| 1556 | |
| 1557 | /* |
| 1558 | ** COMMAND: timeline |
| 1559 | ** |
| 1560 | ** Usage: %fossil timeline ?WHEN? ?BASELINE|DATETIME? ?OPTIONS? |
| 1561 | ** |
| 1562 | ** Print a summary of activity going backwards in date and time |
| 1563 | ** specified or from the current date and time if no arguments |
| 1564 | ** are given. The WHEN argument can be any unique abbreviation |
| 1565 | ** of one of these keywords: |
| 1566 | ** |
| 1567 | ** before |
| 1568 | ** after |
| 1569 | ** descendants | children |
| 1570 | ** ancestors | parents |
| @@ -1573,25 +1572,24 @@ | |
| 1572 | ** The BASELINE can be any unique prefix of 4 characters or more. |
| 1573 | ** The DATETIME should be in the ISO8601 format. For |
| 1574 | ** examples: "2007-08-18 07:21:21". You can also say "current" |
| 1575 | ** for the current version or "now" for the current time. |
| 1576 | ** |
| 1577 | ** Options: |
| 1578 | ** -f|--showfiles print the list of files changed in a checkin after |
| 1579 | ** the checkin comment. |
| 1580 | ** -n|--limit N display the first N changes (default 20) |
| 1581 | ** -t|--type TYPE only display items from the give types, such as: |
| 1582 | ** ci = file commits only |
| 1583 | ** e = events only |
| 1584 | ** t = tickets only |
| 1585 | ** w = wiki commits only |
| 1586 | */ |
| 1587 | void timeline_cmd(void){ |
| 1588 | Stmt q; |
| 1589 | int n, k; |
| 1590 | const char *zLimit; |
| 1591 | const char *zType; |
| 1592 | char *zOrigin; |
| 1593 | char *zDate; |
| 1594 | Blob sql; |
| 1595 | int objid = 0; |
| @@ -1598,14 +1596,17 @@ | |
| 1596 | Blob uuid; |
| 1597 | int mode = 0 ; /* 0:none 1: before 2:after 3:children 4:parents */ |
| 1598 | int showfilesFlag = 0 ; |
| 1599 | showfilesFlag = find_option("showfiles","f", 0)!=0; |
| 1600 | db_find_and_open_repository(0, 0); |
| 1601 | zLimit = find_option("limit","n",1); |
| 1602 | zType = find_option("type","t",1); |
| 1603 | if ( !zLimit ){ |
| 1604 | zLimit = find_option("count",0,1); |
| 1605 | } |
| 1606 | if( zLimit ){ |
| 1607 | n = atoi(zLimit); |
| 1608 | }else{ |
| 1609 | n = 20; |
| 1610 | } |
| 1611 | if( g.argc>=4 ){ |
| 1612 | k = strlen(g.argv[2]); |
| @@ -1619,12 +1620,12 @@ | |
| 1620 | mode = 3; |
| 1621 | }else if( strncmp(g.argv[2],"ancestors",k)==0 && k>1 ){ |
| 1622 | mode = 4; |
| 1623 | }else if( strncmp(g.argv[2],"parents",k)==0 ){ |
| 1624 | mode = 4; |
| 1625 | }else if(!zType && !zLimit){ |
| 1626 | usage("?WHEN? ?BASELINE|DATETIME? ?-n|--limit N? ?-t|--type TYPE?"); |
| 1627 | } |
| 1628 | if( '-' != *g.argv[3] ){ |
| 1629 | zOrigin = g.argv[3]; |
| 1630 | }else{ |
| 1631 | zOrigin = "now"; |
| 1632 |