> Perhaps the embedded documentation would suffice for your needs ? > > http://www.fossil-scm.org/index.html/doc/tip/www/embeddeddoc.wiki > > I started using the embedded doc because every change could > be version controlled. If I added or changed features in my > code, I could version control the document(s) describing the > changes to the same version of the code being checked-in. > > ~Michael
Thanks for the tip, but I want to be able to make changes over the web without having to checkout the entire source tree first e.g. POST http://www.fossil-scm.org/index.html/doc/tip/www/test.html?Comment=Committing new version of the file [CONTENTS] POST http://www.fossil-scm.org/index.html/doc/b8b2b42a4cd5d7be556569e/www/test.html?Comment=Committing change to previous version of the file [CONTENTS] The first request (could be a PUT or a POST) creates a new version of the file, this is like the web interface for the wiki pages:- POST http://127.0.0.1:8080/wikiedit?csrf=localhost&name=www/test.htm&w=[CONTENTS] However the second request:- updating not the latest version, but a previous version, or version from a branch is not provided over the web interface. This means to implement the second request you are forced to create a web script to:- * Receive the request over the web and authenticate * Create a temporary directory. * Checkout entire repository to a directory at the version the user has requested * write the contents of the PUT / POST to the requested file * perform a commit with the users commit message * delete the temporary directory * send a status ok message back to the user As you can guess the script is not going to answer within 5 seconds for any none-trivial repositories, and this will cause problems if you then scale to supporting multiple users simultaneously. We already have the wiki_cmd_commit() command in wiki.c line 747: int rid; /* artifact ID of parent page */ rid = db_int(0, "SELECT x.rid FROM tag t, tagxref x" " WHERE x.tagid=t.tagid AND t.tagname='wiki-%q'" " ORDER BY x.mtime DESC LIMIT 1", zPageName ); i.e. it finds last change that was made, then performs the logic to store the new version of the file. Would it be possible to supply the artifact ID of the version you are changing rather than automatically finding the latest artifact? To phrase the question differently can we add in another wiki command:- %fossil wiki commit ?-u ARTIFACT? PAGENAME ?FILE? Commit changes to a wiki page from FILE or from standard input. fossil could then be used as a versioned data/document store for ajax applications. /Simon. _______________________________________________ fossil-users mailing list fossil-users@lists.fossil-scm.org http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users