On Sat, Sep 17, 2011 at 3:29 AM, Ron Wilson <ronw.m...@gmail.com> wrote:
> On Fri, Sep 16, 2011 at 3:58 AM, Stephan Beal <sgb...@googlemail.com> > wrote: > > On Fri, Sep 16, 2011 at 5:48 AM, Ron Wilson <ronw.m...@gmail.com> wrote: > >> > >> Actually, Fossil fetches wiki pages by name. Artifact Id would be used > >> to fetch a specific version of a page > > > > Sorry, i meant when we get a list of pages from the server, e.g. for > > creating a "list all wiki pages" page. i generally like to have more > info > > about each page than just the name. But it's certainly not a requirement. > > What you're proposing is fine. Just pointing out what Fossil appears > to do. I suppose there could be a master artifact for a wiki page. I > haven't looked at Fossil's wiki code; I'm just looking at how the > existing UI works > Background information for wiki pages in Fossil: (Aside: Should we create a new fossil-dev mailing list for this kind of thing, and preserve fossil-user for use by people who just want to use Fossil and don't really care what is happening behind the scenes?) Every version of every wiki page is its own artifact. There is no master artifact for the set of all wiki pages or for a particular wiki page title. Each artifact includes a header which describes the name of the wiki page, its parent version, who created it, and when. See http://www.fossil-scm.org/doc/trunk/www/fileformat.wiki#wikichng for the details of the artifact content. Note that since the name of the wiki page is part of the artifact, you cannot change the name of a wiki page. You can check in new versions of the same page under a new name. But historical versions will retain their original name. Changing the name of historical versions would change the SHA1 hash and hence result in a new artifact. Fossil keeps track of the wiki pages by creating a tag named "wiki-NameOfPage" for each wiki artifact. Hence, to get a list of all wiki page names: SELECT substr(tagname,6) FROM tag WHERE tagname GLOB 'wiki-*' ORDER BY tagname; To get SHA1 hash for all the different versions of a single wiki page named "xyzzy", do this: SELECT blob.uuid FROM tag, tagxref, blob WHERE tag.tagname=('wiki-' || 'xyzzy') AND tagxref.tagid=tag.tagid AND tagxref.tagtype=1 AND blob.rid=tagxref.rid ORDER BY tagxref.mtime DESC; Each wiki artifact also creates an entry in the "event" table as well. The event table breaks out the "user" field, so you can use joins against the event table to query for wiki edits by a specific user, for example, or to create a table of the history of edits to a wiki page together with the name of the user who made the edit. Fossil does not build a DAG for the wiki pages. But it could. All the information necessary to build up a wiki page DAG is there in the wiki artifacts. I just haven't run across the need to have a wiki page DAG yet. If you wanted to create a DAG of wiki page edits, that would probably involve a new table similar to the mlink or plink tables. Then you would enhance the artifact parser to populate the new table as wiki artifacts are encountered. Then run "fossil rebuild" to build of the DAG. > _______________________________________________ > fossil-users mailing list > fossil-users@lists.fossil-scm.org > http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users > -- D. Richard Hipp d...@sqlite.org
_______________________________________________ fossil-users mailing list fossil-users@lists.fossil-scm.org http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users