Fossil SCM
Merge in new feature from trunk.
Commit
eab553c77ed059faaf6ace04bd649f642bc6752b
Parent
bc1e943fec5fa41…
12 files changed
+1
-1
+1
-1
+1
-1
+26
-21
+1
-1
+1
-1
+1
-1
+1
-1
+9
-2
+1
-1
+1
-1
+1
+1
-1
| --- src/allrepo.c | ||
| +++ src/allrepo.c | ||
| @@ -275,11 +275,11 @@ | ||
| 275 | 275 | useCheckouts = find_option("ckout","c",0)!=0; |
| 276 | 276 | verify_all_options(); |
| 277 | 277 | db_begin_transaction(); |
| 278 | 278 | for(j=3; j<g.argc; j++, blob_reset(&sql), blob_reset(&fn)){ |
| 279 | 279 | file_canonical_name(g.argv[j], &fn, 0); |
| 280 | - blob_append_sql(&sql, | |
| 280 | + blob_append_sql(&sql, | |
| 281 | 281 | "DELETE FROM global_config WHERE name GLOB '%s:%q'", |
| 282 | 282 | useCheckouts?"ckout":"repo", blob_str(&fn) |
| 283 | 283 | ); |
| 284 | 284 | if( dryRunFlag ){ |
| 285 | 285 | fossil_print("%s\n", blob_sql_text(&sql)); |
| 286 | 286 |
| --- src/allrepo.c | |
| +++ src/allrepo.c | |
| @@ -275,11 +275,11 @@ | |
| 275 | useCheckouts = find_option("ckout","c",0)!=0; |
| 276 | verify_all_options(); |
| 277 | db_begin_transaction(); |
| 278 | for(j=3; j<g.argc; j++, blob_reset(&sql), blob_reset(&fn)){ |
| 279 | file_canonical_name(g.argv[j], &fn, 0); |
| 280 | blob_append_sql(&sql, |
| 281 | "DELETE FROM global_config WHERE name GLOB '%s:%q'", |
| 282 | useCheckouts?"ckout":"repo", blob_str(&fn) |
| 283 | ); |
| 284 | if( dryRunFlag ){ |
| 285 | fossil_print("%s\n", blob_sql_text(&sql)); |
| 286 |
| --- src/allrepo.c | |
| +++ src/allrepo.c | |
| @@ -275,11 +275,11 @@ | |
| 275 | useCheckouts = find_option("ckout","c",0)!=0; |
| 276 | verify_all_options(); |
| 277 | db_begin_transaction(); |
| 278 | for(j=3; j<g.argc; j++, blob_reset(&sql), blob_reset(&fn)){ |
| 279 | file_canonical_name(g.argv[j], &fn, 0); |
| 280 | blob_append_sql(&sql, |
| 281 | "DELETE FROM global_config WHERE name GLOB '%s:%q'", |
| 282 | useCheckouts?"ckout":"repo", blob_str(&fn) |
| 283 | ); |
| 284 | if( dryRunFlag ){ |
| 285 | fossil_print("%s\n", blob_sql_text(&sql)); |
| 286 |
+1
-1
| --- src/clone.c | ||
| +++ src/clone.c | ||
| @@ -206,11 +206,11 @@ | ||
| 206 | 206 | rebuild_db(0, 1, 0); |
| 207 | 207 | fossil_print("Extra delta compression... "); fflush(stdout); |
| 208 | 208 | extra_deltification(); |
| 209 | 209 | db_end_transaction(0); |
| 210 | 210 | fossil_print("\nVacuuming the database... "); fflush(stdout); |
| 211 | - if( db_int(0, "PRAGMA page_count")>1000 | |
| 211 | + if( db_int(0, "PRAGMA page_count")>1000 | |
| 212 | 212 | && db_int(0, "PRAGMA page_size")<8192 ){ |
| 213 | 213 | db_multi_exec("PRAGMA page_size=8192;"); |
| 214 | 214 | } |
| 215 | 215 | db_multi_exec("VACUUM"); |
| 216 | 216 | fossil_print("\nproject-id: %s\n", db_get("project-code", 0)); |
| 217 | 217 |
| --- src/clone.c | |
| +++ src/clone.c | |
| @@ -206,11 +206,11 @@ | |
| 206 | rebuild_db(0, 1, 0); |
| 207 | fossil_print("Extra delta compression... "); fflush(stdout); |
| 208 | extra_deltification(); |
| 209 | db_end_transaction(0); |
| 210 | fossil_print("\nVacuuming the database... "); fflush(stdout); |
| 211 | if( db_int(0, "PRAGMA page_count")>1000 |
| 212 | && db_int(0, "PRAGMA page_size")<8192 ){ |
| 213 | db_multi_exec("PRAGMA page_size=8192;"); |
| 214 | } |
| 215 | db_multi_exec("VACUUM"); |
| 216 | fossil_print("\nproject-id: %s\n", db_get("project-code", 0)); |
| 217 |
| --- src/clone.c | |
| +++ src/clone.c | |
| @@ -206,11 +206,11 @@ | |
| 206 | rebuild_db(0, 1, 0); |
| 207 | fossil_print("Extra delta compression... "); fflush(stdout); |
| 208 | extra_deltification(); |
| 209 | db_end_transaction(0); |
| 210 | fossil_print("\nVacuuming the database... "); fflush(stdout); |
| 211 | if( db_int(0, "PRAGMA page_count")>1000 |
| 212 | && db_int(0, "PRAGMA page_size")<8192 ){ |
| 213 | db_multi_exec("PRAGMA page_size=8192;"); |
| 214 | } |
| 215 | db_multi_exec("VACUUM"); |
| 216 | fossil_print("\nproject-id: %s\n", db_get("project-code", 0)); |
| 217 |
M
src/db.c
+1
-1
| --- src/db.c | ||
| +++ src/db.c | ||
| @@ -1646,11 +1646,11 @@ | ||
| 1646 | 1646 | verify_all_options(); |
| 1647 | 1647 | |
| 1648 | 1648 | if( g.argc!=3 ){ |
| 1649 | 1649 | usage("REPOSITORY-NAME"); |
| 1650 | 1650 | } |
| 1651 | - | |
| 1651 | + | |
| 1652 | 1652 | if( -1 != file_size(g.argv[2]) ){ |
| 1653 | 1653 | fossil_fatal("file already exists: %s", g.argv[2]); |
| 1654 | 1654 | } |
| 1655 | 1655 | |
| 1656 | 1656 | db_create_repository(g.argv[2]); |
| 1657 | 1657 |
| --- src/db.c | |
| +++ src/db.c | |
| @@ -1646,11 +1646,11 @@ | |
| 1646 | verify_all_options(); |
| 1647 | |
| 1648 | if( g.argc!=3 ){ |
| 1649 | usage("REPOSITORY-NAME"); |
| 1650 | } |
| 1651 | |
| 1652 | if( -1 != file_size(g.argv[2]) ){ |
| 1653 | fossil_fatal("file already exists: %s", g.argv[2]); |
| 1654 | } |
| 1655 | |
| 1656 | db_create_repository(g.argv[2]); |
| 1657 |
| --- src/db.c | |
| +++ src/db.c | |
| @@ -1646,11 +1646,11 @@ | |
| 1646 | verify_all_options(); |
| 1647 | |
| 1648 | if( g.argc!=3 ){ |
| 1649 | usage("REPOSITORY-NAME"); |
| 1650 | } |
| 1651 | |
| 1652 | if( -1 != file_size(g.argv[2]) ){ |
| 1653 | fossil_fatal("file already exists: %s", g.argv[2]); |
| 1654 | } |
| 1655 | |
| 1656 | db_create_repository(g.argv[2]); |
| 1657 |
+26
-21
| --- src/descendants.c | ||
| +++ src/descendants.c | ||
| @@ -340,14 +340,15 @@ | ||
| 340 | 340 | db_finalize(&q); |
| 341 | 341 | } |
| 342 | 342 | |
| 343 | 343 | /* |
| 344 | 344 | ** COMMAND: leaves* |
| 345 | +** COMMAND: forks* | |
| 345 | 346 | ** |
| 346 | -** Usage: %fossil leaves ?OPTIONS? | |
| 347 | +** Usage: %fossil leaves|forks ?OPTIONS? | |
| 347 | 348 | ** |
| 348 | -** Find leaves of all branches. By default show only open leaves. | |
| 349 | +** Find leaves/forks of all branches. By default show only open leaves. | |
| 349 | 350 | ** The -a|--all flag causes all leaves (closed and open) to be shown. |
| 350 | 351 | ** The -c|--closed flag shows only closed leaves. |
| 351 | 352 | ** |
| 352 | 353 | ** The --recompute flag causes the content of the "leaf" table in the |
| 353 | 354 | ** repository database to be recomputed. |
| @@ -368,10 +369,11 @@ | ||
| 368 | 369 | Blob sql; |
| 369 | 370 | int showAll = find_option("all", "a", 0)!=0; |
| 370 | 371 | int showClosed = find_option("closed", "c", 0)!=0; |
| 371 | 372 | int recomputeFlag = find_option("recompute",0,0)!=0; |
| 372 | 373 | int byBranch = find_option("bybranch",0,0)!=0; |
| 374 | + int showForks = g.argv[1][0]=='f'; | |
| 373 | 375 | const char *zWidth = find_option("width","W",1); |
| 374 | 376 | char *zLastBr = 0; |
| 375 | 377 | int n, width; |
| 376 | 378 | char zLineNo[10]; |
| 377 | 379 | |
| @@ -382,21 +384,21 @@ | ||
| 382 | 384 | } |
| 383 | 385 | }else{ |
| 384 | 386 | width = -1; |
| 385 | 387 | } |
| 386 | 388 | db_find_and_open_repository(0,0); |
| 387 | - | |
| 389 | + | |
| 388 | 390 | /* We should be done with options.. */ |
| 389 | 391 | verify_all_options(); |
| 390 | 392 | |
| 391 | 393 | if( recomputeFlag ) leaf_rebuild(); |
| 392 | 394 | blob_zero(&sql); |
| 393 | 395 | blob_append(&sql, timeline_query_for_tty(), -1); |
| 394 | 396 | blob_append_sql(&sql, " AND blob.rid IN leaf"); |
| 395 | 397 | if( showClosed ){ |
| 396 | 398 | blob_append_sql(&sql," AND %z", leaf_is_closed_sql("blob.rid")); |
| 397 | - }else if( !showAll ){ | |
| 399 | + }else if( !showAll || showForks ){ | |
| 398 | 400 | blob_append_sql(&sql," AND NOT %z", leaf_is_closed_sql("blob.rid")); |
| 399 | 401 | } |
| 400 | 402 | if( byBranch ){ |
| 401 | 403 | db_prepare(&q, "%s ORDER BY nullif(branch,'trunk') COLLATE nocase," |
| 402 | 404 | " event.mtime DESC", |
| @@ -405,27 +407,30 @@ | ||
| 405 | 407 | db_prepare(&q, "%s ORDER BY event.mtime DESC", blob_sql_text(&sql)); |
| 406 | 408 | } |
| 407 | 409 | blob_reset(&sql); |
| 408 | 410 | n = 0; |
| 409 | 411 | while( db_step(&q)==SQLITE_ROW ){ |
| 410 | - const char *zId = db_column_text(&q, 1); | |
| 411 | - const char *zDate = db_column_text(&q, 2); | |
| 412 | - const char *zCom = db_column_text(&q, 3); | |
| 413 | - const char *zBr = db_column_text(&q, 7); | |
| 414 | - char *z; | |
| 415 | - | |
| 416 | - if( byBranch && fossil_strcmp(zBr, zLastBr)!=0 ){ | |
| 417 | - fossil_print("*** %s ***\n", zBr); | |
| 418 | - fossil_free(zLastBr); | |
| 419 | - zLastBr = fossil_strdup(zBr); | |
| 420 | - } | |
| 421 | - n++; | |
| 422 | - sqlite3_snprintf(sizeof(zLineNo), zLineNo, "(%d)", n); | |
| 423 | - fossil_print("%6s ", zLineNo); | |
| 424 | - z = mprintf("%s [%S] %s", zDate, zId, zCom); | |
| 425 | - comment_print(z, zCom, 7, width, g.comFmtFlags); | |
| 426 | - fossil_free(z); | |
| 412 | + if( !showForks || | |
| 413 | + fossil_find_nearest_fork(db_column_int(&q, 0), db_open_local(0)) ){ | |
| 414 | + const char *zId = db_column_text(&q, 1); | |
| 415 | + const char *zDate = db_column_text(&q, 2); | |
| 416 | + const char *zCom = db_column_text(&q, 3); | |
| 417 | + const char *zBr = db_column_text(&q, 7); | |
| 418 | + char *z; | |
| 419 | + | |
| 420 | + if( byBranch && fossil_strcmp(zBr, zLastBr)!=0 ){ | |
| 421 | + fossil_print("*** %s ***\n", zBr); | |
| 422 | + fossil_free(zLastBr); | |
| 423 | + zLastBr = fossil_strdup(zBr); | |
| 424 | + } | |
| 425 | + n++; | |
| 426 | + sqlite3_snprintf(sizeof(zLineNo), zLineNo, "(%d)", n); | |
| 427 | + fossil_print("%6s ", zLineNo); | |
| 428 | + z = mprintf("%s [%S] %s", zDate, zId, zCom); | |
| 429 | + comment_print(z, zCom, 7, width, g.comFmtFlags); | |
| 430 | + fossil_free(z); | |
| 431 | + } | |
| 427 | 432 | } |
| 428 | 433 | fossil_free(zLastBr); |
| 429 | 434 | db_finalize(&q); |
| 430 | 435 | } |
| 431 | 436 | |
| 432 | 437 |
| --- src/descendants.c | |
| +++ src/descendants.c | |
| @@ -340,14 +340,15 @@ | |
| 340 | db_finalize(&q); |
| 341 | } |
| 342 | |
| 343 | /* |
| 344 | ** COMMAND: leaves* |
| 345 | ** |
| 346 | ** Usage: %fossil leaves ?OPTIONS? |
| 347 | ** |
| 348 | ** Find leaves of all branches. By default show only open leaves. |
| 349 | ** The -a|--all flag causes all leaves (closed and open) to be shown. |
| 350 | ** The -c|--closed flag shows only closed leaves. |
| 351 | ** |
| 352 | ** The --recompute flag causes the content of the "leaf" table in the |
| 353 | ** repository database to be recomputed. |
| @@ -368,10 +369,11 @@ | |
| 368 | Blob sql; |
| 369 | int showAll = find_option("all", "a", 0)!=0; |
| 370 | int showClosed = find_option("closed", "c", 0)!=0; |
| 371 | int recomputeFlag = find_option("recompute",0,0)!=0; |
| 372 | int byBranch = find_option("bybranch",0,0)!=0; |
| 373 | const char *zWidth = find_option("width","W",1); |
| 374 | char *zLastBr = 0; |
| 375 | int n, width; |
| 376 | char zLineNo[10]; |
| 377 | |
| @@ -382,21 +384,21 @@ | |
| 382 | } |
| 383 | }else{ |
| 384 | width = -1; |
| 385 | } |
| 386 | db_find_and_open_repository(0,0); |
| 387 | |
| 388 | /* We should be done with options.. */ |
| 389 | verify_all_options(); |
| 390 | |
| 391 | if( recomputeFlag ) leaf_rebuild(); |
| 392 | blob_zero(&sql); |
| 393 | blob_append(&sql, timeline_query_for_tty(), -1); |
| 394 | blob_append_sql(&sql, " AND blob.rid IN leaf"); |
| 395 | if( showClosed ){ |
| 396 | blob_append_sql(&sql," AND %z", leaf_is_closed_sql("blob.rid")); |
| 397 | }else if( !showAll ){ |
| 398 | blob_append_sql(&sql," AND NOT %z", leaf_is_closed_sql("blob.rid")); |
| 399 | } |
| 400 | if( byBranch ){ |
| 401 | db_prepare(&q, "%s ORDER BY nullif(branch,'trunk') COLLATE nocase," |
| 402 | " event.mtime DESC", |
| @@ -405,27 +407,30 @@ | |
| 405 | db_prepare(&q, "%s ORDER BY event.mtime DESC", blob_sql_text(&sql)); |
| 406 | } |
| 407 | blob_reset(&sql); |
| 408 | n = 0; |
| 409 | while( db_step(&q)==SQLITE_ROW ){ |
| 410 | const char *zId = db_column_text(&q, 1); |
| 411 | const char *zDate = db_column_text(&q, 2); |
| 412 | const char *zCom = db_column_text(&q, 3); |
| 413 | const char *zBr = db_column_text(&q, 7); |
| 414 | char *z; |
| 415 | |
| 416 | if( byBranch && fossil_strcmp(zBr, zLastBr)!=0 ){ |
| 417 | fossil_print("*** %s ***\n", zBr); |
| 418 | fossil_free(zLastBr); |
| 419 | zLastBr = fossil_strdup(zBr); |
| 420 | } |
| 421 | n++; |
| 422 | sqlite3_snprintf(sizeof(zLineNo), zLineNo, "(%d)", n); |
| 423 | fossil_print("%6s ", zLineNo); |
| 424 | z = mprintf("%s [%S] %s", zDate, zId, zCom); |
| 425 | comment_print(z, zCom, 7, width, g.comFmtFlags); |
| 426 | fossil_free(z); |
| 427 | } |
| 428 | fossil_free(zLastBr); |
| 429 | db_finalize(&q); |
| 430 | } |
| 431 | |
| 432 |
| --- src/descendants.c | |
| +++ src/descendants.c | |
| @@ -340,14 +340,15 @@ | |
| 340 | db_finalize(&q); |
| 341 | } |
| 342 | |
| 343 | /* |
| 344 | ** COMMAND: leaves* |
| 345 | ** COMMAND: forks* |
| 346 | ** |
| 347 | ** Usage: %fossil leaves|forks ?OPTIONS? |
| 348 | ** |
| 349 | ** Find leaves/forks of all branches. By default show only open leaves. |
| 350 | ** The -a|--all flag causes all leaves (closed and open) to be shown. |
| 351 | ** The -c|--closed flag shows only closed leaves. |
| 352 | ** |
| 353 | ** The --recompute flag causes the content of the "leaf" table in the |
| 354 | ** repository database to be recomputed. |
| @@ -368,10 +369,11 @@ | |
| 369 | Blob sql; |
| 370 | int showAll = find_option("all", "a", 0)!=0; |
| 371 | int showClosed = find_option("closed", "c", 0)!=0; |
| 372 | int recomputeFlag = find_option("recompute",0,0)!=0; |
| 373 | int byBranch = find_option("bybranch",0,0)!=0; |
| 374 | int showForks = g.argv[1][0]=='f'; |
| 375 | const char *zWidth = find_option("width","W",1); |
| 376 | char *zLastBr = 0; |
| 377 | int n, width; |
| 378 | char zLineNo[10]; |
| 379 | |
| @@ -382,21 +384,21 @@ | |
| 384 | } |
| 385 | }else{ |
| 386 | width = -1; |
| 387 | } |
| 388 | db_find_and_open_repository(0,0); |
| 389 | |
| 390 | /* We should be done with options.. */ |
| 391 | verify_all_options(); |
| 392 | |
| 393 | if( recomputeFlag ) leaf_rebuild(); |
| 394 | blob_zero(&sql); |
| 395 | blob_append(&sql, timeline_query_for_tty(), -1); |
| 396 | blob_append_sql(&sql, " AND blob.rid IN leaf"); |
| 397 | if( showClosed ){ |
| 398 | blob_append_sql(&sql," AND %z", leaf_is_closed_sql("blob.rid")); |
| 399 | }else if( !showAll || showForks ){ |
| 400 | blob_append_sql(&sql," AND NOT %z", leaf_is_closed_sql("blob.rid")); |
| 401 | } |
| 402 | if( byBranch ){ |
| 403 | db_prepare(&q, "%s ORDER BY nullif(branch,'trunk') COLLATE nocase," |
| 404 | " event.mtime DESC", |
| @@ -405,27 +407,30 @@ | |
| 407 | db_prepare(&q, "%s ORDER BY event.mtime DESC", blob_sql_text(&sql)); |
| 408 | } |
| 409 | blob_reset(&sql); |
| 410 | n = 0; |
| 411 | while( db_step(&q)==SQLITE_ROW ){ |
| 412 | if( !showForks || |
| 413 | fossil_find_nearest_fork(db_column_int(&q, 0), db_open_local(0)) ){ |
| 414 | const char *zId = db_column_text(&q, 1); |
| 415 | const char *zDate = db_column_text(&q, 2); |
| 416 | const char *zCom = db_column_text(&q, 3); |
| 417 | const char *zBr = db_column_text(&q, 7); |
| 418 | char *z; |
| 419 | |
| 420 | if( byBranch && fossil_strcmp(zBr, zLastBr)!=0 ){ |
| 421 | fossil_print("*** %s ***\n", zBr); |
| 422 | fossil_free(zLastBr); |
| 423 | zLastBr = fossil_strdup(zBr); |
| 424 | } |
| 425 | n++; |
| 426 | sqlite3_snprintf(sizeof(zLineNo), zLineNo, "(%d)", n); |
| 427 | fossil_print("%6s ", zLineNo); |
| 428 | z = mprintf("%s [%S] %s", zDate, zId, zCom); |
| 429 | comment_print(z, zCom, 7, width, g.comFmtFlags); |
| 430 | fossil_free(z); |
| 431 | } |
| 432 | } |
| 433 | fossil_free(zLastBr); |
| 434 | db_finalize(&q); |
| 435 | } |
| 436 | |
| 437 |
+1
-1
| --- src/info.c | ||
| +++ src/info.c | ||
| @@ -121,11 +121,11 @@ | ||
| 121 | 121 | " WHERE tx.rid=%d" |
| 122 | 122 | " AND tx.tagid=%d" |
| 123 | 123 | " AND tx.tagtype>0", |
| 124 | 124 | rid, TAG_CLOSED)){ |
| 125 | 125 | fossil_print("%s\n", "closed"); |
| 126 | - }else if( fossil_find_nearest_fork(rid, 1) ){ | |
| 126 | + }else if( fossil_find_nearest_fork(rid, db_open_local(0)) ){ | |
| 127 | 127 | fossil_print("%s\n", "fork"); |
| 128 | 128 | isFork = 1; |
| 129 | 129 | }else{ |
| 130 | 130 | fossil_print("%s\n", "open"); |
| 131 | 131 | } |
| 132 | 132 |
| --- src/info.c | |
| +++ src/info.c | |
| @@ -121,11 +121,11 @@ | |
| 121 | " WHERE tx.rid=%d" |
| 122 | " AND tx.tagid=%d" |
| 123 | " AND tx.tagtype>0", |
| 124 | rid, TAG_CLOSED)){ |
| 125 | fossil_print("%s\n", "closed"); |
| 126 | }else if( fossil_find_nearest_fork(rid, 1) ){ |
| 127 | fossil_print("%s\n", "fork"); |
| 128 | isFork = 1; |
| 129 | }else{ |
| 130 | fossil_print("%s\n", "open"); |
| 131 | } |
| 132 |
| --- src/info.c | |
| +++ src/info.c | |
| @@ -121,11 +121,11 @@ | |
| 121 | " WHERE tx.rid=%d" |
| 122 | " AND tx.tagid=%d" |
| 123 | " AND tx.tagtype>0", |
| 124 | rid, TAG_CLOSED)){ |
| 125 | fossil_print("%s\n", "closed"); |
| 126 | }else if( fossil_find_nearest_fork(rid, db_open_local(0)) ){ |
| 127 | fossil_print("%s\n", "fork"); |
| 128 | isFork = 1; |
| 129 | }else{ |
| 130 | fossil_print("%s\n", "open"); |
| 131 | } |
| 132 |
+1
-1
| --- src/merge.c | ||
| +++ src/merge.c | ||
| @@ -217,11 +217,11 @@ | ||
| 217 | 217 | */ |
| 218 | 218 | Stmt q; |
| 219 | 219 | if( pickFlag || backoutFlag || integrateFlag){ |
| 220 | 220 | fossil_fatal("cannot use --backout, --cherrypick or --integrate with a fork merge"); |
| 221 | 221 | } |
| 222 | - mid = fossil_find_nearest_fork(vid, 1); | |
| 222 | + mid = fossil_find_nearest_fork(vid, db_open_local(0)); | |
| 223 | 223 | if( mid==0 ){ |
| 224 | 224 | fossil_fatal("no unmerged forks of branch \"%s\"", |
| 225 | 225 | db_text(0, "SELECT value FROM tagxref" |
| 226 | 226 | " WHERE tagid=%d AND rid=%d AND tagtype>0", |
| 227 | 227 | TAG_BRANCH, vid) |
| 228 | 228 |
| --- src/merge.c | |
| +++ src/merge.c | |
| @@ -217,11 +217,11 @@ | |
| 217 | */ |
| 218 | Stmt q; |
| 219 | if( pickFlag || backoutFlag || integrateFlag){ |
| 220 | fossil_fatal("cannot use --backout, --cherrypick or --integrate with a fork merge"); |
| 221 | } |
| 222 | mid = fossil_find_nearest_fork(vid, 1); |
| 223 | if( mid==0 ){ |
| 224 | fossil_fatal("no unmerged forks of branch \"%s\"", |
| 225 | db_text(0, "SELECT value FROM tagxref" |
| 226 | " WHERE tagid=%d AND rid=%d AND tagtype>0", |
| 227 | TAG_BRANCH, vid) |
| 228 |
| --- src/merge.c | |
| +++ src/merge.c | |
| @@ -217,11 +217,11 @@ | |
| 217 | */ |
| 218 | Stmt q; |
| 219 | if( pickFlag || backoutFlag || integrateFlag){ |
| 220 | fossil_fatal("cannot use --backout, --cherrypick or --integrate with a fork merge"); |
| 221 | } |
| 222 | mid = fossil_find_nearest_fork(vid, db_open_local(0)); |
| 223 | if( mid==0 ){ |
| 224 | fossil_fatal("no unmerged forks of branch \"%s\"", |
| 225 | db_text(0, "SELECT value FROM tagxref" |
| 226 | " WHERE tagid=%d AND rid=%d AND tagtype>0", |
| 227 | TAG_BRANCH, vid) |
| 228 |
+1
-1
| --- src/sitemap.c | ||
| +++ src/sitemap.c | ||
| @@ -47,11 +47,11 @@ | ||
| 47 | 47 | @ <li>%z(href("%R/tree?type=flat"))Flat-view</a></li> |
| 48 | 48 | @ <li>%z(href("%R/fileage?name=trunk"))File ages for Trunk</a></li> |
| 49 | 49 | @ </ul> |
| 50 | 50 | @ <li>%z(href("%R/timeline?n=200"))Project Timeline</a></li> |
| 51 | 51 | @ <ul> |
| 52 | - @ <li>%z(href("%R/timeline?a=1970-01-01&y=ci&n=10"))First 10 | |
| 52 | + @ <li>%z(href("%R/timeline?a=1970-01-01&y=ci&n=10"))First 10 | |
| 53 | 53 | @ check-ins</a></li> |
| 54 | 54 | @ <li>%z(href("%R/timeline?n=all&namechng"))All check-ins with file name |
| 55 | 55 | @ changes</a></li> |
| 56 | 56 | @ <li>%z(href("%R/reports"))Activity Reports</a></li> |
| 57 | 57 | @ </ul> |
| 58 | 58 |
| --- src/sitemap.c | |
| +++ src/sitemap.c | |
| @@ -47,11 +47,11 @@ | |
| 47 | @ <li>%z(href("%R/tree?type=flat"))Flat-view</a></li> |
| 48 | @ <li>%z(href("%R/fileage?name=trunk"))File ages for Trunk</a></li> |
| 49 | @ </ul> |
| 50 | @ <li>%z(href("%R/timeline?n=200"))Project Timeline</a></li> |
| 51 | @ <ul> |
| 52 | @ <li>%z(href("%R/timeline?a=1970-01-01&y=ci&n=10"))First 10 |
| 53 | @ check-ins</a></li> |
| 54 | @ <li>%z(href("%R/timeline?n=all&namechng"))All check-ins with file name |
| 55 | @ changes</a></li> |
| 56 | @ <li>%z(href("%R/reports"))Activity Reports</a></li> |
| 57 | @ </ul> |
| 58 |
| --- src/sitemap.c | |
| +++ src/sitemap.c | |
| @@ -47,11 +47,11 @@ | |
| 47 | @ <li>%z(href("%R/tree?type=flat"))Flat-view</a></li> |
| 48 | @ <li>%z(href("%R/fileage?name=trunk"))File ages for Trunk</a></li> |
| 49 | @ </ul> |
| 50 | @ <li>%z(href("%R/timeline?n=200"))Project Timeline</a></li> |
| 51 | @ <ul> |
| 52 | @ <li>%z(href("%R/timeline?a=1970-01-01&y=ci&n=10"))First 10 |
| 53 | @ check-ins</a></li> |
| 54 | @ <li>%z(href("%R/timeline?n=all&namechng"))All check-ins with file name |
| 55 | @ changes</a></li> |
| 56 | @ <li>%z(href("%R/reports"))Activity Reports</a></li> |
| 57 | @ </ul> |
| 58 |
+1
-1
| --- src/skins.c | ||
| +++ src/skins.c | ||
| @@ -602,11 +602,11 @@ | ||
| 602 | 602 | cgi_replace_parameter(aSkinAttr[ii].zFile, builtin_text(zDflt)); |
| 603 | 603 | } |
| 604 | 604 | style_header("%s", aSkinAttr[ii].zTitle); |
| 605 | 605 | for(j=0; j<ArraySize(aSkinAttr); j++){ |
| 606 | 606 | if( j==ii ) continue; |
| 607 | - style_submenu_element(aSkinAttr[j].zSubmenu, 0, | |
| 607 | + style_submenu_element(aSkinAttr[j].zSubmenu, 0, | |
| 608 | 608 | "%R/setup_skinedit?w=%d&basis=%h",j,zBasis); |
| 609 | 609 | } |
| 610 | 610 | style_submenu_element("Skins", 0, "%R/setup_skin"); |
| 611 | 611 | @ <form action="%s(g.zTop)/setup_skinedit" method="post"><div> |
| 612 | 612 | login_insert_csrf_secret(); |
| 613 | 613 |
| --- src/skins.c | |
| +++ src/skins.c | |
| @@ -602,11 +602,11 @@ | |
| 602 | cgi_replace_parameter(aSkinAttr[ii].zFile, builtin_text(zDflt)); |
| 603 | } |
| 604 | style_header("%s", aSkinAttr[ii].zTitle); |
| 605 | for(j=0; j<ArraySize(aSkinAttr); j++){ |
| 606 | if( j==ii ) continue; |
| 607 | style_submenu_element(aSkinAttr[j].zSubmenu, 0, |
| 608 | "%R/setup_skinedit?w=%d&basis=%h",j,zBasis); |
| 609 | } |
| 610 | style_submenu_element("Skins", 0, "%R/setup_skin"); |
| 611 | @ <form action="%s(g.zTop)/setup_skinedit" method="post"><div> |
| 612 | login_insert_csrf_secret(); |
| 613 |
| --- src/skins.c | |
| +++ src/skins.c | |
| @@ -602,11 +602,11 @@ | |
| 602 | cgi_replace_parameter(aSkinAttr[ii].zFile, builtin_text(zDflt)); |
| 603 | } |
| 604 | style_header("%s", aSkinAttr[ii].zTitle); |
| 605 | for(j=0; j<ArraySize(aSkinAttr); j++){ |
| 606 | if( j==ii ) continue; |
| 607 | style_submenu_element(aSkinAttr[j].zSubmenu, 0, |
| 608 | "%R/setup_skinedit?w=%d&basis=%h",j,zBasis); |
| 609 | } |
| 610 | style_submenu_element("Skins", 0, "%R/setup_skin"); |
| 611 | @ <form action="%s(g.zTop)/setup_skinedit" method="post"><div> |
| 612 | login_insert_csrf_secret(); |
| 613 |
+9
-2
| --- src/sqlcmd.c | ||
| +++ src/sqlcmd.c | ||
| @@ -66,21 +66,27 @@ | ||
| 66 | 66 | ){ |
| 67 | 67 | const unsigned char *pIn; |
| 68 | 68 | unsigned char *pOut; |
| 69 | 69 | unsigned int nIn; |
| 70 | 70 | unsigned long int nOut; |
| 71 | + int rc; | |
| 71 | 72 | |
| 72 | 73 | pIn = sqlite3_value_blob(argv[0]); |
| 73 | 74 | nIn = sqlite3_value_bytes(argv[0]); |
| 74 | 75 | nOut = 13 + nIn + (nIn+999)/1000; |
| 75 | 76 | pOut = sqlite3_malloc( nOut+4 ); |
| 76 | 77 | pOut[0] = nIn>>24 & 0xff; |
| 77 | 78 | pOut[1] = nIn>>16 & 0xff; |
| 78 | 79 | pOut[2] = nIn>>8 & 0xff; |
| 79 | 80 | pOut[3] = nIn & 0xff; |
| 80 | - compress(&pOut[4], &nOut, pIn, nIn); | |
| 81 | - sqlite3_result_blob(context, pOut, nOut+4, sqlite3_free); | |
| 81 | + rc = compress(&pOut[4], &nOut, pIn, nIn); | |
| 82 | + if( rc==Z_OK ){ | |
| 83 | + sqlite3_result_blob(context, pOut, nOut+4, sqlite3_free); | |
| 84 | + }else{ | |
| 85 | + sqlite3_free(pOut); | |
| 86 | + sqlite3_result_error(context, "input cannot be zlib compressed", -1); | |
| 87 | + } | |
| 82 | 88 | } |
| 83 | 89 | |
| 84 | 90 | /* |
| 85 | 91 | ** Implementation of the "decompress(X)" SQL function. The argument X |
| 86 | 92 | ** is a blob which was obtained from compress(Y). The output will be |
| @@ -103,10 +109,11 @@ | ||
| 103 | 109 | pOut = sqlite3_malloc( nOut+1 ); |
| 104 | 110 | rc = uncompress(pOut, &nOut, &pIn[4], nIn-4); |
| 105 | 111 | if( rc==Z_OK ){ |
| 106 | 112 | sqlite3_result_blob(context, pOut, nOut, sqlite3_free); |
| 107 | 113 | }else{ |
| 114 | + sqlite3_free(pOut); | |
| 108 | 115 | sqlite3_result_error(context, "input is not zlib compressed", -1); |
| 109 | 116 | } |
| 110 | 117 | } |
| 111 | 118 | |
| 112 | 119 | /* |
| 113 | 120 |
| --- src/sqlcmd.c | |
| +++ src/sqlcmd.c | |
| @@ -66,21 +66,27 @@ | |
| 66 | ){ |
| 67 | const unsigned char *pIn; |
| 68 | unsigned char *pOut; |
| 69 | unsigned int nIn; |
| 70 | unsigned long int nOut; |
| 71 | |
| 72 | pIn = sqlite3_value_blob(argv[0]); |
| 73 | nIn = sqlite3_value_bytes(argv[0]); |
| 74 | nOut = 13 + nIn + (nIn+999)/1000; |
| 75 | pOut = sqlite3_malloc( nOut+4 ); |
| 76 | pOut[0] = nIn>>24 & 0xff; |
| 77 | pOut[1] = nIn>>16 & 0xff; |
| 78 | pOut[2] = nIn>>8 & 0xff; |
| 79 | pOut[3] = nIn & 0xff; |
| 80 | compress(&pOut[4], &nOut, pIn, nIn); |
| 81 | sqlite3_result_blob(context, pOut, nOut+4, sqlite3_free); |
| 82 | } |
| 83 | |
| 84 | /* |
| 85 | ** Implementation of the "decompress(X)" SQL function. The argument X |
| 86 | ** is a blob which was obtained from compress(Y). The output will be |
| @@ -103,10 +109,11 @@ | |
| 103 | pOut = sqlite3_malloc( nOut+1 ); |
| 104 | rc = uncompress(pOut, &nOut, &pIn[4], nIn-4); |
| 105 | if( rc==Z_OK ){ |
| 106 | sqlite3_result_blob(context, pOut, nOut, sqlite3_free); |
| 107 | }else{ |
| 108 | sqlite3_result_error(context, "input is not zlib compressed", -1); |
| 109 | } |
| 110 | } |
| 111 | |
| 112 | /* |
| 113 |
| --- src/sqlcmd.c | |
| +++ src/sqlcmd.c | |
| @@ -66,21 +66,27 @@ | |
| 66 | ){ |
| 67 | const unsigned char *pIn; |
| 68 | unsigned char *pOut; |
| 69 | unsigned int nIn; |
| 70 | unsigned long int nOut; |
| 71 | int rc; |
| 72 | |
| 73 | pIn = sqlite3_value_blob(argv[0]); |
| 74 | nIn = sqlite3_value_bytes(argv[0]); |
| 75 | nOut = 13 + nIn + (nIn+999)/1000; |
| 76 | pOut = sqlite3_malloc( nOut+4 ); |
| 77 | pOut[0] = nIn>>24 & 0xff; |
| 78 | pOut[1] = nIn>>16 & 0xff; |
| 79 | pOut[2] = nIn>>8 & 0xff; |
| 80 | pOut[3] = nIn & 0xff; |
| 81 | rc = compress(&pOut[4], &nOut, pIn, nIn); |
| 82 | if( rc==Z_OK ){ |
| 83 | sqlite3_result_blob(context, pOut, nOut+4, sqlite3_free); |
| 84 | }else{ |
| 85 | sqlite3_free(pOut); |
| 86 | sqlite3_result_error(context, "input cannot be zlib compressed", -1); |
| 87 | } |
| 88 | } |
| 89 | |
| 90 | /* |
| 91 | ** Implementation of the "decompress(X)" SQL function. The argument X |
| 92 | ** is a blob which was obtained from compress(Y). The output will be |
| @@ -103,10 +109,11 @@ | |
| 109 | pOut = sqlite3_malloc( nOut+1 ); |
| 110 | rc = uncompress(pOut, &nOut, &pIn[4], nIn-4); |
| 111 | if( rc==Z_OK ){ |
| 112 | sqlite3_result_blob(context, pOut, nOut, sqlite3_free); |
| 113 | }else{ |
| 114 | sqlite3_free(pOut); |
| 115 | sqlite3_result_error(context, "input is not zlib compressed", -1); |
| 116 | } |
| 117 | } |
| 118 | |
| 119 | /* |
| 120 |
+1
-1
| --- src/utf8.c | ||
| +++ src/utf8.c | ||
| @@ -323,11 +323,11 @@ | ||
| 323 | 323 | } |
| 324 | 324 | |
| 325 | 325 | /* If blob to be written to the Windows console is not |
| 326 | 326 | * UTF-8, convert it to UTF-8 first. |
| 327 | 327 | */ |
| 328 | - blob_init(&blob, zUtf8, nByte); | |
| 328 | + blob_init(&blob, zUtf8, nByte); | |
| 329 | 329 | blob_to_utf8_no_bom(&blob, 1); |
| 330 | 330 | nChar = MultiByteToWideChar(CP_UTF8, 0, blob_buffer(&blob), |
| 331 | 331 | blob_size(&blob), NULL, 0); |
| 332 | 332 | zUnicode = malloc( (nChar + 1) *sizeof(zUnicode[0]) ); |
| 333 | 333 | if( zUnicode==0 ){ |
| 334 | 334 |
| --- src/utf8.c | |
| +++ src/utf8.c | |
| @@ -323,11 +323,11 @@ | |
| 323 | } |
| 324 | |
| 325 | /* If blob to be written to the Windows console is not |
| 326 | * UTF-8, convert it to UTF-8 first. |
| 327 | */ |
| 328 | blob_init(&blob, zUtf8, nByte); |
| 329 | blob_to_utf8_no_bom(&blob, 1); |
| 330 | nChar = MultiByteToWideChar(CP_UTF8, 0, blob_buffer(&blob), |
| 331 | blob_size(&blob), NULL, 0); |
| 332 | zUnicode = malloc( (nChar + 1) *sizeof(zUnicode[0]) ); |
| 333 | if( zUnicode==0 ){ |
| 334 |
| --- src/utf8.c | |
| +++ src/utf8.c | |
| @@ -323,11 +323,11 @@ | |
| 323 | } |
| 324 | |
| 325 | /* If blob to be written to the Windows console is not |
| 326 | * UTF-8, convert it to UTF-8 first. |
| 327 | */ |
| 328 | blob_init(&blob, zUtf8, nByte); |
| 329 | blob_to_utf8_no_bom(&blob, 1); |
| 330 | nChar = MultiByteToWideChar(CP_UTF8, 0, blob_buffer(&blob), |
| 331 | blob_size(&blob), NULL, 0); |
| 332 | zUnicode = malloc( (nChar + 1) *sizeof(zUnicode[0]) ); |
| 333 | if( zUnicode==0 ){ |
| 334 |
+1
-1
| --- src/zip.c | ||
| +++ src/zip.c | ||
| @@ -399,11 +399,11 @@ | ||
| 399 | 399 | int rid; |
| 400 | 400 | Blob zip; |
| 401 | 401 | const char *zName; |
| 402 | 402 | zName = find_option("name", 0, 1); |
| 403 | 403 | db_find_and_open_repository(0, 0); |
| 404 | - | |
| 404 | + | |
| 405 | 405 | /* We should be done with options.. */ |
| 406 | 406 | verify_all_options(); |
| 407 | 407 | |
| 408 | 408 | if( g.argc!=4 ){ |
| 409 | 409 | usage("VERSION OUTPUTFILE"); |
| 410 | 410 |
| --- src/zip.c | |
| +++ src/zip.c | |
| @@ -399,11 +399,11 @@ | |
| 399 | int rid; |
| 400 | Blob zip; |
| 401 | const char *zName; |
| 402 | zName = find_option("name", 0, 1); |
| 403 | db_find_and_open_repository(0, 0); |
| 404 | |
| 405 | /* We should be done with options.. */ |
| 406 | verify_all_options(); |
| 407 | |
| 408 | if( g.argc!=4 ){ |
| 409 | usage("VERSION OUTPUTFILE"); |
| 410 |
| --- src/zip.c | |
| +++ src/zip.c | |
| @@ -399,11 +399,11 @@ | |
| 399 | int rid; |
| 400 | Blob zip; |
| 401 | const char *zName; |
| 402 | zName = find_option("name", 0, 1); |
| 403 | db_find_and_open_repository(0, 0); |
| 404 | |
| 405 | /* We should be done with options.. */ |
| 406 | verify_all_options(); |
| 407 | |
| 408 | if( g.argc!=4 ){ |
| 409 | usage("VERSION OUTPUTFILE"); |
| 410 |
+1
| --- www/changes.wiki | ||
| +++ www/changes.wiki | ||
| @@ -11,10 +11,11 @@ | ||
| 11 | 11 | or HTML. |
| 12 | 12 | * Formally translate TH1 to Tcl return codes and vice-versa, where |
| 13 | 13 | necessary, in the Tcl integration subsystem. |
| 14 | 14 | * Better fork detection on [/help?cmd=import|fossil update], |
| 15 | 15 | [/help?cmd=import|fossil status] and related commands. |
| 16 | + * Add [/help?cmd=forks|fossil forks], for finding all forks. | |
| 16 | 17 | |
| 17 | 18 | <h2>Changes for Version 1.32 (2015-03-14)</h2> |
| 18 | 19 | * When creating a new repository using [/help?cmd=init|fossil init], ensure |
| 19 | 20 | that the new repository is fully compatible with historical versions of |
| 20 | 21 | Fossil by having a valid manifest as RID 1. |
| 21 | 22 |
| --- www/changes.wiki | |
| +++ www/changes.wiki | |
| @@ -11,10 +11,11 @@ | |
| 11 | or HTML. |
| 12 | * Formally translate TH1 to Tcl return codes and vice-versa, where |
| 13 | necessary, in the Tcl integration subsystem. |
| 14 | * Better fork detection on [/help?cmd=import|fossil update], |
| 15 | [/help?cmd=import|fossil status] and related commands. |
| 16 | |
| 17 | <h2>Changes for Version 1.32 (2015-03-14)</h2> |
| 18 | * When creating a new repository using [/help?cmd=init|fossil init], ensure |
| 19 | that the new repository is fully compatible with historical versions of |
| 20 | Fossil by having a valid manifest as RID 1. |
| 21 |
| --- www/changes.wiki | |
| +++ www/changes.wiki | |
| @@ -11,10 +11,11 @@ | |
| 11 | or HTML. |
| 12 | * Formally translate TH1 to Tcl return codes and vice-versa, where |
| 13 | necessary, in the Tcl integration subsystem. |
| 14 | * Better fork detection on [/help?cmd=import|fossil update], |
| 15 | [/help?cmd=import|fossil status] and related commands. |
| 16 | * Add [/help?cmd=forks|fossil forks], for finding all forks. |
| 17 | |
| 18 | <h2>Changes for Version 1.32 (2015-03-14)</h2> |
| 19 | * When creating a new repository using [/help?cmd=init|fossil init], ensure |
| 20 | that the new repository is fully compatible with historical versions of |
| 21 | Fossil by having a valid manifest as RID 1. |
| 22 |