Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Changes In Branch purge Excluding Merge-Ins
This is equivalent to a diff from f1a480e130 to 501f3e1143
|
2016-08-02
| ||
| 15:18 | Merge the "purge" command onto trunk, even though it is incomplete. check-in: b78a32f43d user: drh tags: trunk | |
| 15:17 | Add a further warning on the purge command to indicate that it is dicey. That extra warning makes the purge code permissible to add to trunk. Closed-Leaf check-in: 501f3e1143 user: drh tags: purge | |
| 14:52 | Improved help and remove redundant file listings for the "fossil purge" command. check-in: 2c53d022c3 user: drh tags: purge | |
| 14:41 | Sync up with the trunk. check-in: 12f8633aa1 user: drh tags: purge | |
| 09:10 | Corrections to information about running Fossil in a chroot jail. check-in: f1a480e130 user: drh tags: trunk | |
| 08:46 | Compiler warning fixes. This includes disabling the undocumented FOSSIL_PWREADER feature and upgrading the built-in SQLite. check-in: f35b46d4cb user: drh tags: trunk | |
Changes to src/name.c.
| ︙ | |||
932 933 934 935 936 937 938 | 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 | - + + + + + + - + - + | /* Mark private elements */ db_multi_exec( "UPDATE description SET isPrivate=1 WHERE rid IN private" ); } /* |
| ︙ |
Changes to src/purge.c.
| ︙ | |||
20 21 22 23 24 25 26 | 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 | - + | ** manages the graveyard of purged content. */ #include "config.h" #include "purge.h" #include <assert.h> /* |
| ︙ | |||
50 51 52 53 54 55 56 57 58 59 60 61 62 63 | 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 | + + + + + + + + + | @ isPrivate BOOLEAN, -- True if artifact was originally private @ sz INT NOT NULL, -- Uncompressed size of the purged artifact @ desc TEXT, -- Brief description of this artifact @ data BLOB -- Compressed artifact content @ ); ; /* ** Flags for the purge_artifact_list() function. */ #if INTERFACE #define PURGE_MOVETO_GRAVEYARD 0x0001 /* Move artifacts in graveyard */ #define PURGE_EXPLAIN_ONLY 0x0002 /* Show what would have happened */ #define PURGE_PRINT_SUMMARY 0x0004 /* Print a summary report at end */ #endif /* ** This routine purges multiple artifacts from the repository, transfering ** those artifacts into the PURGEITEM table. ** ** Prior to invoking this routine, the caller must create a (TEMP) table ** named zTab that contains the RID of every artifact to be purged. ** |
| ︙ | |||
79 80 81 82 83 84 85 | 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 | - + - + + + + + + + + + + + | ** (h) BACKLINK ** (i) ATTACHMENT ** (j) TICKETCHNG ** (7) If any ticket artifacts were removed (6j) then rebuild the ** corresponding ticket entries. Possibly remove entries from ** the ticket table. ** |
| ︙ | |||
119 120 121 122 123 124 125 | 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 | - + |
content_undelta(rid);
verify_before_commit(rid);
}
db_finalize(&q);
/* Construct the graveyard and copy the artifacts to be purged into the
** graveyard */
|
| ︙ | |||
187 188 189 190 191 192 193 194 195 196 197 198 199 200 | 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 | + + + + + + + |
ticket_rebuild_entry(db_column_text(&q, 0));
}
db_finalize(&q);
/* db_multi_exec("DROP TABLE \"%w_tickets\"", zTab); */
/* Mission accomplished */
db_end_transaction(0);
if( purgeFlags & PURGE_PRINT_SUMMARY ){
fossil_print("%d artifacts purged\n",
db_int(0, "SELECT count(*) FROM \"%w\";", zTab));
fossil_print("undoable using \"%s purge undo %d\".\n",
g.nameOfExe, peid);
}
return peid;
}
/*
** The TEMP table named zTab contains RIDs for a set of check-ins.
**
** Check to see if any check-in in zTab is a baseline manifest for some
|
| ︙ | |||
218 219 220 221 222 223 224 | 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 | - + | } } /* ** The TEMP table named zTab contains the RIDs for a set of check-in ** artifacts. Expand this set (by adding new entries to zTab) to include |
| ︙ | |||
424 425 426 427 428 429 430 | 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 | - + + + + + + + + + + + + + + - + - - + + - - - + + - - + + + + - + - + + + + + + + + + + + + + + + - - + + + + + + + + + + + + + + + + + + + + + + + - + - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - + + - - - - - - - + - - - + - - - + + | } /* ** COMMAND: purge ** ** The purge command removes content from a repository and stores that content ** in a "graveyard". The graveyard exists so that content can be recovered |