d6b8b5ba73 2009-08-26 drh: <title>Deleting Content From Fossil</title> d6b8b5ba73 2009-08-26 drh: <h1 align="center">Deleting Content From Fossil</h1> d6b8b5ba73 2009-08-26 drh: d6b8b5ba73 2009-08-26 drh: Fossil is designed to keep all historical content forever. Users d6b8b5ba73 2009-08-26 drh: of Fossil are discouraged from "deleting" content simply because it d6b8b5ba73 2009-08-26 drh: has become obsolete. Old content is part of the historical record d6b8b5ba73 2009-08-26 drh: (part of the "fossil record") and should be maintained indefinitely. d6b8b5ba73 2009-08-26 drh: Such is the design intent of Fossil. d6b8b5ba73 2009-08-26 drh: d6b8b5ba73 2009-08-26 drh: Nevertheless, there may occasionally arise legitimate reasons for d6b8b5ba73 2009-08-26 drh: deleting content. Such reasons might include: d6b8b5ba73 2009-08-26 drh: d6b8b5ba73 2009-08-26 drh: * Spammers have inserted inappropriate content into a wiki page d6b8b5ba73 2009-08-26 drh: or ticket that needs to be removed. d6b8b5ba73 2009-08-26 drh: d6b8b5ba73 2009-08-26 drh: * A file that contains trade secrets or that is under copyright d6b8b5ba73 2009-08-26 drh: may have been accidentally committed and needs to be backed d6b8b5ba73 2009-08-26 drh: out. d6b8b5ba73 2009-08-26 drh: d6b8b5ba73 2009-08-26 drh: * A malformed control artifact may have been inserted and is d6b8b5ba73 2009-08-26 drh: disrupting the operation of Fossil. d6b8b5ba73 2009-08-26 drh: d6b8b5ba73 2009-08-26 drh: <h2>Shunning</h2> d6b8b5ba73 2009-08-26 drh: d6b8b5ba73 2009-08-26 drh: Fossil provides a mechanism called "shunning" for removing content from d6b8b5ba73 2009-08-26 drh: a repository. d6b8b5ba73 2009-08-26 drh: d6b8b5ba73 2009-08-26 drh: Every Fossil repository maintains a list of the SHA1 hash names of d6b8b5ba73 2009-08-26 drh: "shunned" artifacts. d6b8b5ba73 2009-08-26 drh: Fossil will refuse to push or pull any shunned artifact. d6b8b5ba73 2009-08-26 drh: Furthermore, all shunned artifacts (but not the shunning list d6b8b5ba73 2009-08-26 drh: itself) are removed from the d6b8b5ba73 2009-08-26 drh: repository whenever the repository is reconstructed using the d6b8b5ba73 2009-08-26 drh: "rebuild" command. d6b8b5ba73 2009-08-26 drh: d6b8b5ba73 2009-08-26 drh: <h3>Shunning lists are local state</h3> d6b8b5ba73 2009-08-26 drh: d6b8b5ba73 2009-08-26 drh: The shunning list is part of the local state of a Fossil repository. d6b8b5ba73 2009-08-26 drh: In other words, shunning does not propagate using the normal "sync" d6b8b5ba73 2009-08-26 drh: mechanism. An artifact can be d6b8b5ba73 2009-08-26 drh: shunned from one repository but be allowed to exist in another. The fact that d6b8b5ba73 2009-08-26 drh: the shunning list does not propagate is a security feature. If the d6b8b5ba73 2009-08-26 drh: shunning list propagated then a malecious user (or d6b8b5ba73 2009-08-26 drh: a bug in the fossil code) might introduce a shun record that would d6b8b5ba73 2009-08-26 drh: propagate through all respositories in a network and permanently d6b8b5ba73 2009-08-26 drh: destroy vital information. By refusing to propagate the shunning list, d6b8b5ba73 2009-08-26 drh: Fossil insures that no remote user will ever be able to remove d6b8b5ba73 2009-08-26 drh: information from your personal repositories without your permission. d6b8b5ba73 2009-08-26 drh: d6b8b5ba73 2009-08-26 drh: The shunning list does not propagate by the normal "sync" mechanism, d6b8b5ba73 2009-08-26 drh: but it is still possible to copy shuns from one repository to another d6b8b5ba73 2009-08-26 drh: using the "configuration" command: d6b8b5ba73 2009-08-26 drh: d6b8b5ba73 2009-08-26 drh: <b>fossil configuration pull shun</b> <i>remote-url</i><br> d6b8b5ba73 2009-08-26 drh: <b>fossil configuration push shun</b> <i>remote-url</i> d6b8b5ba73 2009-08-26 drh: d6b8b5ba73 2009-08-26 drh: The two command above will pull or push shunning lists from or to d6b8b5ba73 2009-08-26 drh: the <i>remote-url</i> indicated and merge the lists on the receiving d6b8b5ba73 2009-08-26 drh: end. "Admin" privilege on the remote server is required in order to d6b8b5ba73 2009-08-26 drh: push a shun list. d6b8b5ba73 2009-08-26 drh: d6b8b5ba73 2009-08-26 drh: Note that the shunning list remains in the respository even after the d6b8b5ba73 2009-08-26 drh: shunned artifact has been removed. This is to prevent the artifact d6b8b5ba73 2009-08-26 drh: from being reintroduced into the repository the next time it syncs with d6b8b5ba73 2009-08-26 drh: another repository that has not shunned the artifact. d6b8b5ba73 2009-08-26 drh: d6b8b5ba73 2009-08-26 drh: <h3>Managing the shunning list</h3> d6b8b5ba73 2009-08-26 drh: d6b8b5ba73 2009-08-26 drh: The complete shunning list for a repository can be viewed by a user d6b8b5ba73 2009-08-26 drh: with "admin" privilege on the "/shunned" URL of the web interface to Fossil. d6b8b5ba73 2009-08-26 drh: That URL is accessible under the "Admin" button on the default menu d6b8b5ba73 2009-08-26 drh: bar. Items can be added to or removed from the shunning list. "Sync" d6b8b5ba73 2009-08-26 drh: operations are inhibited as soon as the artifact is added to the d6b8b5ba73 2009-08-26 drh: shunning list, but the content of the artifact is not actually removed d6b8b5ba73 2009-08-26 drh: from the responstory until the next time the repository is rebuilt. d6b8b5ba73 2009-08-26 drh: d6b8b5ba73 2009-08-26 drh: When viewing individual artifacts with the web interface, "admin" d6b8b5ba73 2009-08-26 drh: users will usually see a "Shun" option in the submenu that will take d6b8b5ba73 2009-08-26 drh: them directly to the shunning page and enable that artifact to be d6b8b5ba73 2009-08-26 drh: shunned with a single additional mouse click.