Re: [fossil-users] JSON/wiki: what info needs to be returned for...
On 09/17/11 08:35, Richard Hipp wrote: (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?) Yes please :) -Martin ___ fossil-users mailing list fossil-users@lists.fossil-scm.org http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users
Re: [fossil-users] JSON/wiki: what info needs to be returned for...
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 ___ fossil-users mailing list fossil-users@lists.fossil-scm.org http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users
Re: [fossil-users] JSON/wiki: what info needs to be returned for...
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
Re: [fossil-users] JSON/wiki: what info needs to be returned for...
On Sat, Sep 17, 2011 at 2:35 PM, Richard Hipp d...@sqlite.org wrote: (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?) Fine by me - i have no strong opinion one way or the other, but i understand that when i'm in one of my phases i can generate more traffic than the average user wants to see ;). who created it, and when. See http://www.fossil-scm.org/doc/trunk/www/fileformat.wiki#wikichng for the details of the artifact content. Section 4 described basically want i envisioned, it seems. i was concerned that getting the name of the committer might be more difficult. 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. Just out of curiosity - is that implement like a file mv operation or are they different? 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: There was a time (long ago) when i used to know that. Time to get back into the db structure. To get SHA1 hash for all the different versions of a single wiki page named xyzzy, do this: That's very helpful - i'd like to be able to walk the lineage via json requests. 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. :-D 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. i don't _think_ i'll be needing a persistent store like this, but rather building them from client code (and then probably only occassionally). Only time will tell... -- - stephan beal http://wanderinghorse.net/home/stephan/ ___ fossil-users mailing list fossil-users@lists.fossil-scm.org http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users
Re: [fossil-users] JSON/wiki: what info needs to be returned for...
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. -- - stephan beal http://wanderinghorse.net/home/stephan/ ___ fossil-users mailing list fossil-users@lists.fossil-scm.org http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users
[fossil-users] JSON/wiki: what info needs to be returned for...
Hi, all! Now that logging in works, i'd like to start tackling some of the bigger fish... For /json/wiki/list requests, what page info needs to be returned? i was thinking: name, sizeInBytes (as opposed to size in UTF8 chars), name of last committer, artifact ID i'm not sure i can get the committers name easily, but the rest should be easy to do. Is there info i've overlooked here? Note that the content will not be returned with the 'list' request because the point of this request is to get just the list of pages. The content can be arbitrarily large and will be fetched via a separate wiki/get request. -- - stephan beal http://wanderinghorse.net/home/stephan/ ___ fossil-users mailing list fossil-users@lists.fossil-scm.org http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users
Re: [fossil-users] JSON/wiki: what info needs to be returned for...
On Thu, Sep 15, 2011 at 6:20 PM, Stephan Beal sgb...@googlemail.com wrote: For /json/wiki/list requests, what page info needs to be returned? i was thinking: name, sizeInBytes (as opposed to size in UTF8 chars), name of last committer, artifact ID i'm not sure i can get the committers name easily, but the rest should be easy to do. Is there info i've overlooked here? Actually, Fossil fetches wiki pages by name. Artifact Id would be used to fetch a specific version of a page. ___ fossil-users mailing list fossil-users@lists.fossil-scm.org http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users