From 40ca2cf3c764b35cc4a764547a4db9f35e20b1b1 Mon Sep 17 00:00:00 2001 From: joey Date: Mon, 4 Sep 2006 06:16:29 +0000 Subject: [PATCH 01/16] typo --- debian/changelog | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/debian/changelog b/debian/changelog index 491f73508..d6ccc99e4 100644 --- a/debian/changelog +++ b/debian/changelog @@ -4,7 +4,7 @@ ikiwiki (1.25) UNRELEASED; urgency=low zombies; this hit htmltidy especially badly. * Drop real uid/gid in the suid wrapper, thus allowing commits to remote subversion repos and fixing some other issues. - * Add support for tla, contributed by Clint Adama. Closes: #385936 + * Add support for tla, contributed by Clint Adams. Closes: #385936 -- Joey Hess Mon, 4 Sep 2006 01:33:17 -0400 -- 2.39.5 From 435645a8ee02afb739eb454e7bc51db0b0e64973 Mon Sep 17 00:00:00 2001 From: joey Date: Mon, 4 Sep 2006 06:17:51 +0000 Subject: [PATCH 02/16] foo --- doc/setup.mdwn | 2 ++ 1 file changed, 2 insertions(+) diff --git a/doc/setup.mdwn b/doc/setup.mdwn index b3620fb3c..e2396f777 100644 --- a/doc/setup.mdwn +++ b/doc/setup.mdwn @@ -23,6 +23,8 @@ you through setting up a wiki that is stored in [[Subversion]], [[Git]], or mkdir /tla tla make-archive me@localhost--wiki /tla/wikirepo tla my-id "" + # Edit {arch}/=tagging-method and change the precious + # line to add the .ikiwiki directory to the regexp. 3. Check out the repository to make the working copy that ikiwiki will use. -- 2.39.5 From 5851f0f753db2d84709be139ba41dc4e7c4fe83a Mon Sep 17 00:00:00 2001 From: joey Date: Mon, 4 Sep 2006 06:24:27 +0000 Subject: [PATCH 03/16] bugnum --- IkiWiki/Rcs/tla.pm | 1 + 1 file changed, 1 insertion(+) diff --git a/IkiWiki/Rcs/tla.pm b/IkiWiki/Rcs/tla.pm index 0f62dfa83..48dc78157 100644 --- a/IkiWiki/Rcs/tla.pm +++ b/IkiWiki/Rcs/tla.pm @@ -10,6 +10,7 @@ package IkiWiki; my $tla_webcommit=qr/^web commit (by (\w+)|from (\d+\.\d+\.\d+\.\d+)):?(.*)/; sub quiet_system (@) { + # See Debian bug #385939. open (SAVEOUT, ">&STDOUT"); close STDOUT; my $ret=system(@_); -- 2.39.5 From 7df3f98b3867dcfdaaeb5179d5bfb144035988f7 Mon Sep 17 00:00:00 2001 From: www-data Date: Mon, 4 Sep 2006 19:54:04 +0000 Subject: [PATCH 04/16] web commit by ClintAdams --- doc/tla.mdwn | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 doc/tla.mdwn diff --git a/doc/tla.mdwn b/doc/tla.mdwn new file mode 100644 index 000000000..4c8f49f3b --- /dev/null +++ b/doc/tla.mdwn @@ -0,0 +1,9 @@ +[tla](http://wiki.gnuarch.org/) is an implementation of the [GNU](http://www.gnu.org/) [Arch](http://www.gnuarch.org/) revision control system. While ikiwiki is relatively +independent of the underlying revision control system, and can easily be +used without one, using it with Subversion is recommended since it's how +the author uses it. ([[Git]] is another option.) + +Ikiwiki can run as a [[post-commit]] hook to update a wiki whenever commits +come in. When running as a [[cgi]] with tla, ikiwiki automatically +commits edited pages to the Arch repostory, and uses the Arch +log to generate the [[RecentChanges]] page. \ No newline at end of file -- 2.39.5 From b8c8977bcbafd62dc845e72ea22b308aeb9c59c1 Mon Sep 17 00:00:00 2001 From: www-data Date: Tue, 5 Sep 2006 08:13:15 +0000 Subject: [PATCH 05/16] web commit by tuomov --- doc/todo/RSS_links.mdwn | 1 + 1 file changed, 1 insertion(+) create mode 100644 doc/todo/RSS_links.mdwn diff --git a/doc/todo/RSS_links.mdwn b/doc/todo/RSS_links.mdwn new file mode 100644 index 000000000..26f057769 --- /dev/null +++ b/doc/todo/RSS_links.mdwn @@ -0,0 +1 @@ +The RSS feeds on a page should be indicated with , so that they can be found by aggregators. \ No newline at end of file -- 2.39.5 From 85f7f4086376d9c7f4433f8c65c1e8f426a54aff Mon Sep 17 00:00:00 2001 From: www-data Date: Tue, 5 Sep 2006 08:13:34 +0000 Subject: [PATCH 06/16] web commit by tuomov --- doc/todo/RSS_links.mdwn | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/todo/RSS_links.mdwn b/doc/todo/RSS_links.mdwn index 26f057769..596314a95 100644 --- a/doc/todo/RSS_links.mdwn +++ b/doc/todo/RSS_links.mdwn @@ -1 +1 @@ -The RSS feeds on a page should be indicated with , so that they can be found by aggregators. \ No newline at end of file +The RSS feeds on a page should be indicated with <link rel>, so that they can be found by aggregators. \ No newline at end of file -- 2.39.5 From f26e7442479ef4b57388a9b299da9b0741976d06 Mon Sep 17 00:00:00 2001 From: joey Date: Tue, 5 Sep 2006 19:17:44 +0000 Subject: [PATCH 07/16] add tla --- debian/control | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/debian/control b/debian/control index 5c284e0a5..23e738283 100644 --- a/debian/control +++ b/debian/control @@ -9,7 +9,7 @@ Standards-Version: 3.7.2 Package: ikiwiki Architecture: all Depends: ${perl:Depends}, libxml-simple-perl, markdown, libtimedate-perl, libhtml-template-perl, libhtml-scrubber-perl, libcgi-formbuilder-perl (>= 3.02.02), libtime-duration-perl, libcgi-session-perl, libmail-sendmail-perl, gcc | c-compiler, libc6-dev | libc-dev, libhtml-parser-perl -Recommends: subversion | git-core, hyperestraier +Recommends: subversion | git-core | tla, hyperestraier Suggests: viewcvs, librpc-xml-perl, libtext-wikiformat-perl, python-docutils, polygen, tidy, libxml-feed-perl, libmailtools-perl Description: a wiki compiler ikiwiki converts a directory full of wiki pages into html pages suitable -- 2.39.5 From 0c1999f782c1adecb319e4b6b14ce21234c9bbfe Mon Sep 17 00:00:00 2001 From: joey Date: Wed, 6 Sep 2006 19:52:24 +0000 Subject: [PATCH 08/16] update --- debian/control | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/debian/control b/debian/control index 23e738283..2b8bdbb32 100644 --- a/debian/control +++ b/debian/control @@ -14,12 +14,13 @@ Suggests: viewcvs, librpc-xml-perl, libtext-wikiformat-perl, python-docutils, po Description: a wiki compiler ikiwiki converts a directory full of wiki pages into html pages suitable for publishing on a website. Unlike many wikis, ikiwiki does not have its - own means of storing page history or its own markup language. Instead it - uses subversion (or git) and markdown. + own means of storing page history. Instead it can use Subversion (or + Git or tla). . ikiwiki implements all of the other standard features of a wiki, including web-based page editing, user registration and logins, a RecentChanges page, BackLinks, search, Discussion pages, tags, smart merging and conflict resolution, page locking, and commit emails. . - It also supports generating RSS feeds and blogging. + It also supports generating RSS feeds and blogging, and a plugin system + allows many other features to be added. -- 2.39.5 From 9439a374d0ebe422af28adbf72d21d6994eec059 Mon Sep 17 00:00:00 2001 From: joey Date: Wed, 6 Sep 2006 20:01:37 +0000 Subject: [PATCH 09/16] update --- debian/changelog | 2 +- doc/recentchanges.mdwn | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/debian/changelog b/debian/changelog index d6ccc99e4..99932e007 100644 --- a/debian/changelog +++ b/debian/changelog @@ -6,7 +6,7 @@ ikiwiki (1.25) UNRELEASED; urgency=low subversion repos and fixing some other issues. * Add support for tla, contributed by Clint Adams. Closes: #385936 - -- Joey Hess Mon, 4 Sep 2006 01:33:17 -0400 + -- Joey Hess Wed, 6 Sep 2006 15:47:25 -0400 ikiwiki (1.24) unstable; urgency=low diff --git a/doc/recentchanges.mdwn b/doc/recentchanges.mdwn index a40f396b6..9613f2480 100644 --- a/doc/recentchanges.mdwn +++ b/doc/recentchanges.mdwn @@ -1,3 +1,4 @@ ikiwiki generates the list of recent changes by examining the -[[Subversion]] or [[Git]] commit log. You have to have [[CGI]] set up for -this feature to be enabled. +history of the revision control system ([[Subversion]], etc) that the wiki +is configured to use. You have to have [[CGI]] set up for this feature to be +enabled. -- 2.39.5 From 1f26347379fd646e75302f32cf3411fb09cef5e4 Mon Sep 17 00:00:00 2001 From: joey Date: Wed, 6 Sep 2006 20:02:12 +0000 Subject: [PATCH 10/16] escaping fix from Emanuele Aina --- IkiWiki/CGI.pm | 2 +- templates/recentchanges.tmpl | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/IkiWiki/CGI.pm b/IkiWiki/CGI.pm index 6e1efbd69..be06db49c 100644 --- a/IkiWiki/CGI.pm +++ b/IkiWiki/CGI.pm @@ -81,7 +81,7 @@ sub cgi_recentchanges ($) { #{{{ my $changelog=[rcs_recentchanges(100)]; foreach my $change (@$changelog) { $change->{when} = concise(ago($change->{when})); - $change->{user} = htmllink("", "", $change->{user}, 1); + $change->{user} = htmllink("", "", escapeHTML($change->{user}), 1); $change->{pages} = [ map { $_->{link} = htmllink("", "", $_->{page}, 1); diff --git a/templates/recentchanges.tmpl b/templates/recentchanges.tmpl index f927cf62f..726e52f64 100644 --- a/templates/recentchanges.tmpl +++ b/templates/recentchanges.tmpl @@ -30,7 +30,7 @@ - + -- 2.39.5 From f7d95297bb74878e54207c6f1c6d3ec330d503e7 Mon Sep 17 00:00:00 2001 From: joey Date: Wed, 6 Sep 2006 20:03:59 +0000 Subject: [PATCH 11/16] need to import escapeHTML --- IkiWiki/CGI.pm | 1 + 1 file changed, 1 insertion(+) diff --git a/IkiWiki/CGI.pm b/IkiWiki/CGI.pm index be06db49c..eb89752ec 100644 --- a/IkiWiki/CGI.pm +++ b/IkiWiki/CGI.pm @@ -77,6 +77,7 @@ sub cgi_recentchanges ($) { #{{{ memoize("htmllink"); eval q{use Time::Duration}; + eval q{use CGI 'escapeHTML'}; my $changelog=[rcs_recentchanges(100)]; foreach my $change (@$changelog) { -- 2.39.5 From 513af0c0df210bbab175f3408013f058cec05ef1 Mon Sep 17 00:00:00 2001 From: joey Date: Wed, 6 Sep 2006 20:04:20 +0000 Subject: [PATCH 12/16] typo --- doc/git.mdwn | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/git.mdwn b/doc/git.mdwn index 53fd9efcd..672db11da 100644 --- a/doc/git.mdwn +++ b/doc/git.mdwn @@ -1,4 +1,4 @@ -Git is a distributed revison control system originally developed for the linux kernel. Ikiki supports storing a wiki in git. +Git is a distributed revison control system originally developed for the linux kernel. Ikiwiki supports storing a wiki in git. Ikiwiki can run as a post-update hook to update a wiki whenever commits come in. When running as a [[cgi]] with Git, ikiwiki automatically -- 2.39.5 From f7f3b0bb7d91c74f67023e970cee71ad2ea260da Mon Sep 17 00:00:00 2001 From: joey Date: Wed, 6 Sep 2006 20:31:55 +0000 Subject: [PATCH 13/16] * Add support for mercurial, contributed by Emanuele Aina. --- IkiWiki/Rcs/mercurial.pm | 143 ++++++++++++++++++++++++++++++++++++ debian/changelog | 3 +- debian/control | 6 +- doc/about_rcs_backends.mdwn | 31 +++++++- doc/features.mdwn | 16 ++-- doc/ikiwiki.setup | 5 ++ doc/index.mdwn | 4 +- doc/mercurial.mdwn | 8 ++ doc/post-commit.mdwn | 2 +- doc/roadmap.mdwn | 5 +- doc/setup.mdwn | 26 +++++-- doc/todo/mercurial.mdwn | 4 + doc/usage.mdwn | 5 ++ 13 files changed, 231 insertions(+), 27 deletions(-) create mode 100644 IkiWiki/Rcs/mercurial.pm create mode 100644 doc/mercurial.mdwn create mode 100644 doc/todo/mercurial.mdwn diff --git a/IkiWiki/Rcs/mercurial.pm b/IkiWiki/Rcs/mercurial.pm new file mode 100644 index 000000000..82a2fa642 --- /dev/null +++ b/IkiWiki/Rcs/mercurial.pm @@ -0,0 +1,143 @@ +#!/usr/bin/perl + +use warnings; +use strict; +use IkiWiki; +use Encode; +use open qw{:utf8 :std}; + +package IkiWiki; + +sub mercurial_log($) { + my $out = shift; + my @infos; + + while (<$out>) { + my $line = $_; + my ($key, $value); + + if (/^description:/) { + $key = "description"; + $value = ""; + + # slurp everything as the description text + # until the next changeset + while (<$out>) { + if (/^changeset: /) { + $line = $_; + last; + } + + $value .= $_; + } + + local $/ = ""; + chomp $value; + $infos[$#infos]{$key} = $value; + } + + chomp $line; + ($key, $value) = split /: +/, $line, 2; + + if ($key eq "changeset") { + push @infos, {}; + + # remove the revision index, which is strictly + # local to the repository + $value =~ s/^\d+://; + } + + $infos[$#infos]{$key} = $value; + } + close $out; + + return @infos; +} + +sub rcs_update () { #{{{ + my @cmdline = ("hg", "-R", "$config{srcdir}", "update"); + if (system(@cmdline) != 0) { + warn "'@cmdline' failed: $!"; + } +} #}}} + +sub rcs_prepedit ($) { #{{{ + return ""; +} #}}} + +sub rcs_commit ($$$) { #{{{ + my ($file, $message, $rcstoken) = @_; + + $message = possibly_foolish_untaint($message); + + my @cmdline = ("hg", "-R", "$config{srcdir}", "commit", "-m", "$message"); + if (system(@cmdline) != 0) { + warn "'@cmdline' failed: $!"; + } + + return undef; # success +} #}}} + +sub rcs_add ($) { # {{{ + my ($file) = @_; + + my @cmdline = ("hg", "-R", "$config{srcdir}", "add", "$file"); + if (system(@cmdline) != 0) { + warn "'@cmdline' failed: $!"; + } +} #}}} + +sub rcs_recentchanges ($) { #{{{ + my ($num) = @_; + + eval q{use CGI 'escapeHTML'}; + + my @cmdline = ("hg", "-R", $config{srcdir}, "log", "-v", "-l", $num); + open (my $out, "@cmdline |"); + + my @ret; + foreach my $info (mercurial_log($out)) { + my @pages = (); + my @message = (); + + foreach my $msgline (split(/\n/, $info->{description})) { + push @message, { line => $msgline }; + } + + foreach my $file (split / /,$info->{files}) { + my $diffurl = $config{'diffurl'}; + $diffurl =~ s/\[\[file\]\]/$file/go; + $diffurl =~ s/\[\[r2\]\]/$info->{changeset}/go; + + push @pages, { + page => pagename($file), + diffurl => $diffurl, + }; + } + + my $user = $info->{"user"}; + $user =~ s/\s*<.*>\s*$//; + $user =~ s/^\s*//; + + push @ret, { + rev => $info->{"changeset"}, + user => $user, + committype => "mercurial", + when => $info->{"date"}, + message => [@message], + pages => [@pages], + }; + } + + return @ret; +} #}}} + +sub rcs_notify () { #{{{ + # TODO +} #}}} + +sub rcs_getctime ($) { #{{{ + error "getctime not implemented"; +} #}}} + +1 diff --git a/debian/changelog b/debian/changelog index 99932e007..8f9bfe2ec 100644 --- a/debian/changelog +++ b/debian/changelog @@ -5,8 +5,9 @@ ikiwiki (1.25) UNRELEASED; urgency=low * Drop real uid/gid in the suid wrapper, thus allowing commits to remote subversion repos and fixing some other issues. * Add support for tla, contributed by Clint Adams. Closes: #385936 + * Add support for mercurial, contributed by Emanuele Aina. - -- Joey Hess Wed, 6 Sep 2006 15:47:25 -0400 + -- Joey Hess Wed, 6 Sep 2006 15:55:39 -0400 ikiwiki (1.24) unstable; urgency=low diff --git a/debian/control b/debian/control index 2b8bdbb32..05ea1bcf5 100644 --- a/debian/control +++ b/debian/control @@ -9,13 +9,13 @@ Standards-Version: 3.7.2 Package: ikiwiki Architecture: all Depends: ${perl:Depends}, libxml-simple-perl, markdown, libtimedate-perl, libhtml-template-perl, libhtml-scrubber-perl, libcgi-formbuilder-perl (>= 3.02.02), libtime-duration-perl, libcgi-session-perl, libmail-sendmail-perl, gcc | c-compiler, libc6-dev | libc-dev, libhtml-parser-perl -Recommends: subversion | git-core | tla, hyperestraier +Recommends: subversion | git-core | tla | mercurual, hyperestraier Suggests: viewcvs, librpc-xml-perl, libtext-wikiformat-perl, python-docutils, polygen, tidy, libxml-feed-perl, libmailtools-perl Description: a wiki compiler ikiwiki converts a directory full of wiki pages into html pages suitable for publishing on a website. Unlike many wikis, ikiwiki does not have its - own means of storing page history. Instead it can use Subversion (or - Git or tla). + own means of storing page history, and instead uses a revision control + system (such as Subversion). . ikiwiki implements all of the other standard features of a wiki, including web-based page editing, user registration and logins, a RecentChanges diff --git a/doc/about_rcs_backends.mdwn b/doc/about_rcs_backends.mdwn index 0a95b7f54..95d641e72 100644 --- a/doc/about_rcs_backends.mdwn +++ b/doc/about_rcs_backends.mdwn @@ -117,8 +117,33 @@ part). GIT doesn't have a similar functionality like 'svn merge -rOLD:NEW FILE' (please see the relevant comment in mergepast for more details), so I had to invent an ugly hack just for the purpose. -## [mercurial](http://www.selenic.com/mercurial/) +## [Mercurial](http://www.selenic.com/mercurial/) -Being worked on by Emanuele Aina. +The Mercurial backend is still in a early phase, so it may not be mature +enough, but it should be simple to understand and use. - +As Mercurial is a distributed RCS, it lacks the distinction between +repository and working copy (every wc is a repo). + +This means that the Mercurial backend uses directly the repository as +working copy (the master M and the working copy W described in the svn +example are the same thing). + +You only need to specify 'srcdir' (the repository M) and 'destdir' (where +the HTML will be generated). + +Master repository M. + +RCS commit from the outside are installed into M. + +M is directly used as working copy (M is also W). + +HTML is generated from the working copy in M. rcs_update() will update +to the last committed revision in M (the same as 'hg update'). +If you use an 'update' hook you can generate automatically the HTML +in the destination directory each time 'hg update' is called. + +CGI operates on M. rcs_commit() will commit directly in M. + +If you have any question or suggestion about the Mercurial backend +please refer to [Emanuele](http://nerd.ocracy.org/em/). diff --git a/doc/features.mdwn b/doc/features.mdwn index d5fa4026b..c568213bf 100644 --- a/doc/features.mdwn +++ b/doc/features.mdwn @@ -4,18 +4,18 @@ An overview of some of ikiwiki's features: ## Uses a real RCS Rather than implement its own system for storing page histories etc, -ikiwiki uses a real RCS. This isn't because we're lazy, it's because a -real RCS is a good thing to have, and there are advantages to using one -that are not possible with a standard wiki. +ikiwiki uses a real Revision Control System. This isn't because we're +lazy, it's because a real RCS is a good thing to have, and there are +advantages to using one that are not possible with a standard wiki. Instead of editing pages in a stupid web form, you can use vim and commit -changes via svn. Or work disconnected using svk and push your changes out -when you come online. Or use git or tla to work in a distributed fashion -all the time. (It's also possible to [[plugins/write]] a plugin to support -other systems.) +changes via [[Subversion]]. Or work disconnected using svk and push your +changes out when you come online. Or use [[git]], [[tla]], or [[mercurial]] +to work in a distributed fashion all the time. (It's also possible to +[[plugins/write]] a plugin to support other systems.) ikiwiki can be run from a [[post-commit]] hook to update your wiki -immediately whenever you commit. +immediately whenever you commit a change using the RCS. Note that ikiwiki does not require a RCS to function. If you want to run a simple wiki without page history, it can do that too. diff --git a/doc/ikiwiki.setup b/doc/ikiwiki.setup index 95d2d46af..ac84352df 100644 --- a/doc/ikiwiki.setup +++ b/doc/ikiwiki.setup @@ -35,6 +35,11 @@ use IkiWiki::Setup::Standard { #historyurl => ??, #diffurl => ??, + # Mercurial stuff. + #rcs => "mercurial", + #historyurl => "http://localhost:8000/", # hg serve'd local repository + #diffurl => "http://localhost:8000/?fd=[[changeset]];file=[[file]]", + wrappers => [ #{ # # The cgi wrapper. diff --git a/doc/index.mdwn b/doc/index.mdwn index 67f099210..2dd90247c 100644 --- a/doc/index.mdwn +++ b/doc/index.mdwn @@ -1,8 +1,8 @@ [[ikiwiki_logo|logo/ikiwiki.png]] ikiwiki is a **wiki compiler**. It converts wiki pages into html pages suitable for publishing on a website. Unlike a traditional -wiki, ikiwiki does not have its own means of storing page history. -Instead it can use [[Subversion]] (or [[Git]] or [[tla]]). +wiki, ikiwiki does not have its own means of storing page history, +and instead uses a revision control system (such as [[Subversion]]). * [[News]] is a blog (built using ikiwiki) of news items about ikiwiki. It's the best way to find out when there's a new version to [[Download]]. diff --git a/doc/mercurial.mdwn b/doc/mercurial.mdwn new file mode 100644 index 000000000..5eaae1997 --- /dev/null +++ b/doc/mercurial.mdwn @@ -0,0 +1,8 @@ +[Mercurial](http://selenic.com/mercurial) is a distributed revison control +system developed by Matt Mackall. Ikiwiki supports storing a wiki in a +mercurial repository. + +Ikiwiki can run as a post-update hook to update a wiki whenever commits +come in. When running as a [[cgi]] with Mercurial, ikiwiki automatically +commits edited pages, and uses the Mercurial history to generate the +[[RecentChanges]] page. diff --git a/doc/post-commit.mdwn b/doc/post-commit.mdwn index 8def3d751..84375dad0 100644 --- a/doc/post-commit.mdwn +++ b/doc/post-commit.mdwn @@ -1,5 +1,5 @@ A post-commit hook is run every time you commit a change to your -[[subversion]] (or [[git]]) repository. To make the wiki be updated each +[[subversion]] (or [[git]] or [[mercurial]]) repository. To make the wiki be updated each time a commit is made, it can be run from (or as) a post-commit hook. The best way to run ikiwiki in a post-commit hook is using a wrapper, which diff --git a/doc/roadmap.mdwn b/doc/roadmap.mdwn index 4bd9ab671..a4b4919d4 100644 --- a/doc/roadmap.mdwn +++ b/doc/roadmap.mdwn @@ -22,9 +22,8 @@ Released 29 April 2006. possible)_ * Improved [[todo/html]] stylesheets and templates. * Improved scalable [[logo]]. _(status: done)_ -* Support for at least one RCS aside from svn. Once it supports two, it should - quickly grow to support them all.. See [[about_rcs_backends]] - _(status: supports git and tla in tree)_ +* Support for at other revision control systems aside from svn. + See [[about_rcs_backends]] _(status: supports git, tla, mercurial)_ * Support for one other markup language, probably restructured text. _(status: done, but the rst plugin needs improvement)_ * No serious known [[bugs]] diff --git a/doc/setup.mdwn b/doc/setup.mdwn index e2396f777..c6a8f297e 100644 --- a/doc/setup.mdwn +++ b/doc/setup.mdwn @@ -1,6 +1,6 @@ So you want to set up your own wiki using ikiwiki? This tutorial will walk -you through setting up a wiki that is stored in [[Subversion]], [[Git]], or -[[TLA]], and that has optional support for commits from the web. +you through setting up a wiki that is stored in [[Subversion]], [[Git]], +[[TLA]] or [[Mercurial]], and that has optional support for commits from the web. 1. [[Install]] ikiwiki. See [[download]] for where to get it. @@ -26,6 +26,9 @@ you through setting up a wiki that is stored in [[Subversion]], [[Git]], or # Edit {arch}/=tagging-method and change the precious # line to add the .ikiwiki directory to the regexp. + # Mercurial + hg init /hg/wikirepo + 3. Check out the repository to make the working copy that ikiwiki will use. # Subversion @@ -41,6 +44,12 @@ you through setting up a wiki that is stored in [[Subversion]], [[Git]], or tla init-tree me@localhost--wiki/wiki--0 tla import + # Mercurial + # Mercurial uses a single repo approach, so no need to + # clone anything. Because the following examples + # refer to the ~/wikiwc working copy we symlink it: + ln -s /hg/wikirepo ~/wikiwc + 4. Build your wiki for the first time. ikiwiki --verbose ~/wikiwc/ ~/public_html/wiki/ \ @@ -70,6 +79,10 @@ you through setting up a wiki that is stored in [[Subversion]], [[Git]], or tla add index.mdwn tla commit + # Mercurial + hg add index.mdwn + hg commit -m customised index.mdwn + You can also add any files you like from scratch of course. 6. Repeat steps 4 and 5 as desired, editing or adding pages and rebuilding @@ -92,12 +105,13 @@ you through setting up a wiki that is stored in [[Subversion]], [[Git]], or that all of these are pointing to the right directories, and read through and configure the rest of the file to your liking. - If you want to use git, comment out the subversion stuff, uncomment and - edit the git stuff. + If you want to use something other than subversion, comment out the + subversion configuration, and uncomment and edit the configuration for + your chosen RCS. Note that the default file has a block to configure an [[post-commit]] wrapper to update the wiki. You need to uncomment the related block for - whatever rcs you use and comment out the other rcs blocks. + whatever RCS you use and comment out the other rcs blocks. When you're satisfied, run `ikiwiki --setup ikiwiki.setup`, and it will set everything up and update your wiki. @@ -111,7 +125,7 @@ you through setting up a wiki that is stored in [[Subversion]], [[Git]], or 9. Add [[PageHistory]] links to the top of pages. This requires you to have setup a repository browser. For Subversion, you may use [[ViewCVS]] or something similar to access your [[Subversion]] repository. For Git, - [[Gitweb]] can be used. + [[Gitweb]] can be used, etc. The `historyurl` setting makes ikiwiki add the links, and in that url, "\[[file]]" is replaced with the name of the file to view. So edit diff --git a/doc/todo/mercurial.mdwn b/doc/todo/mercurial.mdwn new file mode 100644 index 000000000..e25039b13 --- /dev/null +++ b/doc/todo/mercurial.mdwn @@ -0,0 +1,4 @@ +* Need to get post commit hook working (or an example of how to use it.) +* Need --ctime support. +* rcs_notify is not implemented +* Is the code sufficiently robust? It just warns when mercurial fails. diff --git a/doc/usage.mdwn b/doc/usage.mdwn index 4456e8c1c..0c7e7d036 100644 --- a/doc/usage.mdwn +++ b/doc/usage.mdwn @@ -120,6 +120,11 @@ configuration options of their own. If you use git, the `source` directory is assumed to be a clone of the [[git]] repository. + If you use tla, the `source` directory is assumed to be a tla import. + + If you use mercurial, the `source` directory is assumed to be the + [[mercurial]] repository. + In [[CGI]] mode, with a revision control system enabled pages edited via the web will be committed. Also, the [[RecentChanges]] link will be placed on pages. -- 2.39.5 From 6a2abf8352a7a1516345f408b6356bd1ace68f19 Mon Sep 17 00:00:00 2001 From: joey Date: Wed, 6 Sep 2006 20:34:44 +0000 Subject: [PATCH 14/16] cleanup --- doc/tla.mdwn | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/doc/tla.mdwn b/doc/tla.mdwn index 4c8f49f3b..31409ee67 100644 --- a/doc/tla.mdwn +++ b/doc/tla.mdwn @@ -1,9 +1,8 @@ -[tla](http://wiki.gnuarch.org/) is an implementation of the [GNU](http://www.gnu.org/) [Arch](http://www.gnuarch.org/) revision control system. While ikiwiki is relatively -independent of the underlying revision control system, and can easily be -used without one, using it with Subversion is recommended since it's how -the author uses it. ([[Git]] is another option.) +[tla](http://wiki.gnuarch.org/) is an implementation of the +[GNU](http://www.gnu.org/) [Arch](http://www.gnuarch.org/) revision control +system. kiwiki supports storing a wiki in tla. Ikiwiki can run as a [[post-commit]] hook to update a wiki whenever commits come in. When running as a [[cgi]] with tla, ikiwiki automatically commits edited pages to the Arch repostory, and uses the Arch -log to generate the [[RecentChanges]] page. \ No newline at end of file +log to generate the [[RecentChanges]] page. -- 2.39.5 From 7aaacd17d07e216107ae3ae5f71e4b7d0a19c8a9 Mon Sep 17 00:00:00 2001 From: joey Date: Wed, 6 Sep 2006 20:35:18 +0000 Subject: [PATCH 15/16] fix --- doc/tla.mdwn | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/tla.mdwn b/doc/tla.mdwn index 31409ee67..4c2b9227c 100644 --- a/doc/tla.mdwn +++ b/doc/tla.mdwn @@ -1,6 +1,6 @@ [tla](http://wiki.gnuarch.org/) is an implementation of the [GNU](http://www.gnu.org/) [Arch](http://www.gnuarch.org/) revision control -system. kiwiki supports storing a wiki in tla. +system. Ikiwiki supports storing a wiki in tla. Ikiwiki can run as a [[post-commit]] hook to update a wiki whenever commits come in. When running as a [[cgi]] with tla, ikiwiki automatically -- 2.39.5 From bd1eb38ed8f0e0621000dc9d597967b9ad82d995 Mon Sep 17 00:00:00 2001 From: joey Date: Wed, 6 Sep 2006 20:49:01 +0000 Subject: [PATCH 16/16] comment --- doc/todo/RSS_links.mdwn | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/doc/todo/RSS_links.mdwn b/doc/todo/RSS_links.mdwn index 596314a95..9ee62ee4e 100644 --- a/doc/todo/RSS_links.mdwn +++ b/doc/todo/RSS_links.mdwn @@ -1 +1,15 @@ -The RSS feeds on a page should be indicated with <link rel>, so that they can be found by aggregators. \ No newline at end of file +The RSS feeds on a page should be indicated with <link rel>, so that +they can be found by aggregators. + +--tumov + +I've been wondering about this. Ikiwiki's rss buttons include a +type="application/rss+xml" and link to the rss file, and this is enough for +at least some auto-discovery tools to find the rss feed. But apparently not +all of them. + +For example, firefox requires the following: + + + +--[[Joey]] -- 2.39.5