From f7b86d8177efbe90b49acb93ae1f056714dc0851 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Mon, 28 Jan 2008 17:55:58 -0500 Subject: pushing two commits in at once leads to a related problem --- doc/bugs/git_mail_notification_race.mdwn | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'doc/bugs') diff --git a/doc/bugs/git_mail_notification_race.mdwn b/doc/bugs/git_mail_notification_race.mdwn index ebe158fb9..eddc0181e 100644 --- a/doc/bugs/git_mail_notification_race.mdwn +++ b/doc/bugs/git_mail_notification_race.mdwn @@ -4,7 +4,7 @@ I was suprised to receive two mails from ikiwiki about one web edit: 1 F Oct 30 To joey+ikiwiki update of ikiwiki's plugins/contrib/gallery.mdwn by http://arpitjain11.myopenid.com/ The first of these had the correct diff for the changes made by the web - edit (00259020061577316895370ee04cf00b634db98a). +edit (00259020061577316895370ee04cf00b634db98a). But the second had a diff for modifications I made to ikiwiki code around the same time (2a6e353c205a6c2c8b8e2eaf85fe9c585c1af0cd). @@ -38,3 +38,9 @@ diff for the first commit. Ikiwiki's own locking prevents this from happenning if both commits are web edits. At least one of the two commits has to be a non-web commit. + +---- + +A related problem is that if two commits are made separately but then +pushed in together, the commit code only looks at the HEAD commit, which +is the second one. No notification is sent for the first. -- cgit v1.2.3 From ad6d22f237294422bb1d76231f60f069fed8b32e Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Mon, 28 Jan 2008 18:17:31 -0500 Subject: followup --- doc/bugs/git_mail_notification_race.mdwn | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'doc/bugs') diff --git a/doc/bugs/git_mail_notification_race.mdwn b/doc/bugs/git_mail_notification_race.mdwn index eddc0181e..3538b0764 100644 --- a/doc/bugs/git_mail_notification_race.mdwn +++ b/doc/bugs/git_mail_notification_race.mdwn @@ -44,3 +44,12 @@ edits. At least one of the two commits has to be a non-web commit. A related problem is that if two commits are made separately but then pushed in together, the commit code only looks at the HEAD commit, which is the second one. No notification is sent for the first. + +---- + +Based on all of these problems with using the post-update hook, ikiwiki +should be changed to use the post-receive hook, which provides enough +information to avoid the assumuptions that led to these problems. +Transitioning existing wikis to using a new hook will be interesting. Also, +this hook is only present in git >= 1.5.0.7. +--[[Joey]] -- cgit v1.2.3 From d7fdd04b5a113b6dded40cb79b670b16570c11b3 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Tue, 29 Jan 2008 00:36:58 -0500 Subject: * Removed support for sending commit notification mails. Along with it went the svnrepo and notify settings, though both will be ignored if left in setup files. --- IkiWiki.pm | 2 - IkiWiki/CGI.pm | 13 +--- IkiWiki/Rcs/Stub.pm | 7 -- IkiWiki/Rcs/git.pm | 41 ---------- IkiWiki/Rcs/mercurial.pm | 4 - IkiWiki/Rcs/monotone.pm | 48 ------------ IkiWiki/Rcs/svn.pm | 38 ---------- IkiWiki/Rcs/tla.pm | 45 ----------- IkiWiki/UserInfo.pm | 87 ---------------------- IkiWiki/Wrapper.pm | 16 ---- debian/changelog | 3 + doc/bugs/git_mail_notification_race.mdwn | 2 + doc/features.mdwn | 7 +- doc/ikiwiki.setup | 3 - doc/index/discussion.mdwn | 3 + doc/rcs/monotone.mdwn | 1 - doc/setup.mdwn | 3 +- ...e_to_this_page__34___checkbox_on_edit_form.mdwn | 6 +- doc/todo/bzr.mdwn | 2 + doc/todo/mercurial.mdwn | 2 +- doc/usage.mdwn | 10 --- doc/wikitemplates.mdwn | 3 - docwiki.setup | 7 +- ikiwiki.in | 8 +- t/svn.t | 9 ++- templates/notifymail.tmpl | 4 - 26 files changed, 33 insertions(+), 341 deletions(-) delete mode 100644 templates/notifymail.tmpl (limited to 'doc/bugs') diff --git a/IkiWiki.pm b/IkiWiki.pm index b326dbdb8..2c3ddac23 100644 --- a/IkiWiki.pm +++ b/IkiWiki.pm @@ -62,7 +62,6 @@ sub defaultconfig () { #{{{ cgi => 0, post_commit => 0, rcs => '', - notify => 0, url => '', cgiurl => '', historyurl => '', @@ -76,7 +75,6 @@ sub defaultconfig () { #{{{ w3mmode => 0, wrapper => undef, wrappermode => undef, - svnrepo => undef, svnpath => "trunk", gitorigin_branch => "origin", gitmaster_branch => "master", diff --git a/IkiWiki/CGI.pm b/IkiWiki/CGI.pm index 5062a448f..55ee5d86a 100644 --- a/IkiWiki/CGI.pm +++ b/IkiWiki/CGI.pm @@ -242,9 +242,6 @@ sub cgi_prefs ($$) { #{{{ $form->field(name => "do", type => "hidden"); $form->field(name => "email", size => 50, fieldset => "preferences"); - $form->field(name => "subscriptions", size => 50, - fieldset => "preferences", - comment => "(".htmllink("", "", "ikiwiki/PageSpec", noimageinline => 1).")"); $form->field(name => "banned_users", size => 50, fieldset => "admin"); @@ -256,8 +253,6 @@ sub cgi_prefs ($$) { #{{{ if (! $form->submitted) { $form->field(name => "email", force => 1, value => userinfo_get($user_name, "email")); - $form->field(name => "subscriptions", force => 1, - value => userinfo_get($user_name, "subscriptions")); if (is_admin($user_name)) { $form->field(name => "banned_users", force => 1, value => join(" ", get_banned_users())); @@ -274,11 +269,9 @@ sub cgi_prefs ($$) { #{{{ return; } elsif ($form->submitted eq 'Save Preferences' && $form->validate) { - foreach my $field (qw(email subscriptions)) { - if (defined $form->field($field)) { - userinfo_set($user_name, $field, $form->field($field)) || - error("failed to set $field"); - } + if (defined $form->field('email')) { + userinfo_set($user_name, 'email', $form->field('email')) || + error("failed to set email"); } if (is_admin($user_name)) { set_banned_users(grep { ! is_admin($_) } diff --git a/IkiWiki/Rcs/Stub.pm b/IkiWiki/Rcs/Stub.pm index ab80a9a47..df347f6a9 100644 --- a/IkiWiki/Rcs/Stub.pm +++ b/IkiWiki/Rcs/Stub.pm @@ -57,13 +57,6 @@ sub rcs_recentchanges ($) { # } } -sub rcs_notify () { - # This function is called when a change is committed to the wiki, - # and ikiwiki is running as a post-commit hook from the RCS. - # It should examine the repository to somehow determine what pages - # changed, and then send emails to users subscribed to those pages. -} - sub rcs_getctime ($) { # Optional, used to get the page creation time from the RCS. error gettext("getctime not implemented"); diff --git a/IkiWiki/Rcs/git.pm b/IkiWiki/Rcs/git.pm index f70582136..26a6f4266 100644 --- a/IkiWiki/Rcs/git.pm +++ b/IkiWiki/Rcs/git.pm @@ -419,47 +419,6 @@ sub rcs_recentchanges ($) { #{{{ return @rets; } #}}} -sub rcs_notify () { #{{{ - # Send notification mail to subscribed users. - # - # In usual Git usage, hooks/update script is presumed to send - # notification mails (see git-receive-pack(1)). But we prefer - # hooks/post-update to support IkiWiki commits coming from a - # cloned repository (through command line) because post-update - # is called _after_ each ref in repository is updated (update - # hook is called _before_ the repository is updated). - # - # Here, we rely on a simple fact: we can extract all parts of the - # notification content by parsing the "HEAD" commit. - - my $ci = git_commit_info('HEAD'); - return if !defined $ci; - - my @changed_pages = map { $_->{'file'} } @{ $ci->{'details'} }; - - my ($user, $message); - if (@{ $ci->{'comment'} }[0] =~ m/$config{web_commit_regexp}/) { - $user = defined $2 ? $2 : $3; - $message = $4; - } - else { - $user = $ci->{'author_username'}; - $message = join "\n", @{ $ci->{'comment'} }; - } - - my $sha1 = $ci->{'sha1'}; - - require IkiWiki::UserInfo; - send_commit_mails( - sub { - $message; - }, - sub { - join "\n", run_or_die('git', 'diff', "${sha1}^", $sha1); - }, $user, @changed_pages - ); -} #}}} - sub rcs_getctime ($) { #{{{ my $file=shift; # Remove srcdir prefix diff --git a/IkiWiki/Rcs/mercurial.pm b/IkiWiki/Rcs/mercurial.pm index 13a88379c..db6a396ac 100644 --- a/IkiWiki/Rcs/mercurial.pm +++ b/IkiWiki/Rcs/mercurial.pm @@ -151,10 +151,6 @@ sub rcs_recentchanges ($) { #{{{ return @ret; } #}}} -sub rcs_notify () { #{{{ - # TODO -} #}}} - sub rcs_getctime ($) { #{{{ my ($file) = @_; diff --git a/IkiWiki/Rcs/monotone.pm b/IkiWiki/Rcs/monotone.pm index b48ac92db..0ae2c1a32 100644 --- a/IkiWiki/Rcs/monotone.pm +++ b/IkiWiki/Rcs/monotone.pm @@ -452,54 +452,6 @@ sub rcs_recentchanges ($) { #{{{ return @ret; } #}}} -sub rcs_notify () { #{{{ - debug("The monotone rcs_notify function is currently untested. Use at own risk!"); - - if (! exists $ENV{REV}) { - error(gettext("REV is not set, not running from mtn post-commit hook, cannot send notifications")); - } - if ($ENV{REV} !~ m/($sha1_pattern)/) { # sha1 is untainted now - error(gettext("REV is not a valid revision identifier, cannot send notifications")); - } - my $rev = $1; - - check_config(); - - my $automator = Monotone->new(); - $automator->open(undef, $config{mtnrootdir}); - - my $certs = [read_certs($automator, $rev)]; - my $user; - my $message; - my $when; - - foreach my $cert (@$certs) { - if ($cert->{signature} eq "ok" && $cert->{trust} eq "trusted") { - if ($cert->{name} eq "author") { - $user = $cert->{value}; - } elsif ($cert->{name} eq "date") { - $when = $cert->{value}; - } elsif ($cert->{name} eq "changelog") { - $message = $cert->{value}; - } - } - } - - my @changed_pages = get_changed_files($automator, $rev); - - $automator->close(); - - require IkiWiki::UserInfo; - send_commit_mails( - sub { - return $message; - }, - sub { - `mtn --root=$config{mtnrootdir} au content_diff -r $rev`; - }, - $user, @changed_pages); -} #}}} - sub rcs_getctime ($) { #{{{ my $file=shift; diff --git a/IkiWiki/Rcs/svn.pm b/IkiWiki/Rcs/svn.pm index 075f8da5a..f7d2242f0 100644 --- a/IkiWiki/Rcs/svn.pm +++ b/IkiWiki/Rcs/svn.pm @@ -217,44 +217,6 @@ sub rcs_recentchanges ($) { #{{{ return @ret; } #}}} -sub rcs_notify () { #{{{ - if (! exists $ENV{REV}) { - error(gettext("REV is not set, not running from svn post-commit hook, cannot send notifications")); - } - my $rev=int(possibly_foolish_untaint($ENV{REV})); - - my $user=`svnlook author $config{svnrepo} -r $rev`; - chomp $user; - - my $message=`svnlook log $config{svnrepo} -r $rev`; - if ($message=~/$config{web_commit_regexp}/) { - $user=defined $2 ? "$2" : "$3"; - $message=$4; - } - - my @changed_pages; - foreach my $change (`svnlook changed $config{svnrepo} -r $rev`) { - chomp $change; - if (length $config{svnpath}) { - if ($change =~ /^[A-Z]+\s+\Q$config{svnpath}\E\/(.*)/) { - push @changed_pages, $1; - } - } - else { - push @changed_pages, $change; - } - } - - require IkiWiki::UserInfo; - send_commit_mails( - sub { - return $message; - }, - sub { - `svnlook diff $config{svnrepo} -r $rev --no-diff-deleted`; - }, $user, @changed_pages); -} #}}} - sub rcs_getctime ($) { #{{{ my $file=shift; diff --git a/IkiWiki/Rcs/tla.pm b/IkiWiki/Rcs/tla.pm index 15824ffaf..ecc561bde 100644 --- a/IkiWiki/Rcs/tla.pm +++ b/IkiWiki/Rcs/tla.pm @@ -160,51 +160,6 @@ sub rcs_recentchanges ($) { return @ret; } -sub rcs_notify () { #{{{ - # FIXME: Not set - if (! exists $ENV{ARCH_VERSION}) { - error("ARCH_VERSION is not set, not running from tla post-commit hook, cannot send notifications"); - } - my $rev=int(possibly_foolish_untaint($ENV{REV})); - - eval q{use Mail::Header}; - error($@) if $@; - open(LOG, $ENV{"ARCH_LOG"}); - my $head = Mail::Header->new(\*LOG); - close(LOG); - - my $user = $head->get("Creator"); - - my $newfiles = $head->get("New-files"); - my $modfiles = $head->get("Modified-files"); - my $remfiles = $head->get("Removed-files"); - - my @changed_pages = grep { !/(^.*\/)?\.arch-ids\/.*\.id$/ } - split(/ /, "$newfiles $modfiles $remfiles .arch-ids/fake.id"); - - require IkiWiki::UserInfo; - send_commit_mails( - sub { - my $message = $head->get("Summary"); - if ($message =~ /$config{web_commit_regexp}/) { - $user=defined $2 ? "$2" : "$3"; - $message=$4; - } - }, - sub { - my $logs = `tla logs -d $config{srcdir}`; - my @changesets = reverse split(/\n/, $logs); - my $i; - - for($i=0;$i<$#changesets;$i++) { - last if $changesets[$i] eq $rev; - } - - my $revminusone = $changesets[$i+1]; - `tla diff -d $ENV{ARCH_TREE_ROOT} $revminusone`; - }, $user, @changed_pages); -} #}}} - sub rcs_getctime ($) { #{{{ my $file=shift; eval q{use Date::Parse}; diff --git a/IkiWiki/UserInfo.pm b/IkiWiki/UserInfo.pm index cfc27609d..2ffc51c55 100644 --- a/IkiWiki/UserInfo.pm +++ b/IkiWiki/UserInfo.pm @@ -92,91 +92,4 @@ sub set_banned_users (@) { #{{{ return userinfo_store($userinfo); } #}}} -sub commit_notify_list ($@) { #{{{ - my $committer=shift; - my @pages = map pagename($_), @_; - - my @ret; - my $userinfo=userinfo_retrieve(); - foreach my $user (keys %{$userinfo}) { - next if $user eq $committer; - if (exists $userinfo->{$user}->{subscriptions} && - length $userinfo->{$user}->{subscriptions} && - exists $userinfo->{$user}->{email} && - length $userinfo->{$user}->{email} && - grep { pagespec_match($_, - $userinfo->{$user}->{subscriptions}, - user => $committer) } - map pagename($_), @_) { - push @ret, $userinfo->{$user}->{email}; - } - } - return @ret; -} #}}} - -sub send_commit_mails ($$$@) { #{{{ - my $messagesub=shift; - my $diffsub=shift; - my $user=shift; - my @changed_pages=@_; - - return unless @changed_pages; - - my @email_recipients=commit_notify_list($user, @changed_pages); - if (@email_recipients) { - # TODO: if a commit spans multiple pages, this will send - # subscribers a diff that might contain pages they did not - # sign up for. Should separate the diff per page and - # reassemble into one mail with just the pages subscribed to. - my $diff=$diffsub->(); - my $message=$messagesub->(); - - my $pagelist; - if (@changed_pages > 2) { - $pagelist="$changed_pages[0] $changed_pages[1] ..."; - } - else { - $pagelist.=join(" ", @changed_pages); - } - #translators: The three variables are the name of the wiki, - #translators: A list of one or more pages that were changed, - #translators: And the name of the user making the change. - #translators: This is used as the subject of a commit email. - my $subject=sprintf(gettext("update of %s's %s by %s"), - $config{wikiname}, $pagelist, $user); - - my $template=template("notifymail.tmpl"); - $template->param( - wikiname => $config{wikiname}, - diff => $diff, - user => $user, - message => $message, - ); - - # Daemonize, in case the mail sending takes a while. - defined(my $pid = fork) or error("Can't fork: $!"); - return if $pid; - setsid() or error("Can't start a new session: $!"); - chdir '/'; - open STDIN, '/dev/null'; - open STDOUT, '>/dev/null'; - open STDERR, '>&STDOUT' or error("Can't dup stdout: $!"); - - unlockwiki(); # don't need to keep a lock on the wiki - - eval q{use Mail::Sendmail}; - error($@) if $@; - foreach my $email (@email_recipients) { - sendmail( - To => $email, - From => "$config{wikiname} <$config{adminemail}>", - Subject => $subject, - Message => $template->output, - ); - } - - exit 0; # daemon process done - } -} #}}} - 1 diff --git a/IkiWiki/Wrapper.pm b/IkiWiki/Wrapper.pm index 2103ea53a..90a4c46c7 100644 --- a/IkiWiki/Wrapper.pm +++ b/IkiWiki/Wrapper.pm @@ -36,22 +36,6 @@ sub gen_wrapper () { #{{{ addenv("$var", s); EOF } - if ($config{rcs} eq "svn" && $config{notify}) { - # Support running directly as hooks/post-commit by passing - # $2 in REV in the environment. - $envsave.=<<"EOF" - if (argc == 3) - addenv("REV", argv[2]); - else if ((s=getenv("REV"))) - addenv("REV", s); -EOF - } - if ($config{rcs} eq "tla" && $config{notify}) { - $envsave.=<<"EOF" - if ((s=getenv("ARCH_VERSION"))) - addenv("ARCH_VERSION", s); -EOF - } $Data::Dumper::Indent=0; # no newlines my $configstring=Data::Dumper->Dump([\%config], ['*config']); diff --git a/debian/changelog b/debian/changelog index b57ef1178..47273ea94 100644 --- a/debian/changelog +++ b/debian/changelog @@ -23,6 +23,9 @@ ikiwiki (2.21) UNRELEASED; urgency=low function. * Pages with extensions starting with "_" are internal-use, and will not be rendered or web-edited. + * Removed support for sending commit notification mails. Along with it went + the svnrepo and notify settings, though both will be ignored if left in + setup files. -- Joey Hess Fri, 11 Jan 2008 15:09:37 -0500 diff --git a/doc/bugs/git_mail_notification_race.mdwn b/doc/bugs/git_mail_notification_race.mdwn index 3538b0764..58bd82325 100644 --- a/doc/bugs/git_mail_notification_race.mdwn +++ b/doc/bugs/git_mail_notification_race.mdwn @@ -1,3 +1,5 @@ +[[done]] (in this branch); fixed removing email notification support! + I was suprised to receive two mails from ikiwiki about one web edit: 1 F Oct 30 To joey+ikiwiki update of ikiwiki's plugins/contrib/gallery.mdwn by http://arpitjain11.myopenid.com/ diff --git a/doc/features.mdwn b/doc/features.mdwn index a7b5c19ab..42eede916 100644 --- a/doc/features.mdwn +++ b/doc/features.mdwn @@ -127,7 +127,7 @@ with that there's no new commit marker syntax to learn. Nearly the definition of a wiki, although perhaps ikiwiki challenges how much of that web gunk a wiki really needs. These features are optional -and can be enabled by enabling [[CGI]]. +and can be enabled by enabling [[CGI]] and a [[Revision_Control_Systems|rcs]]. ### User registration @@ -161,11 +161,6 @@ Well, sorta. Rather than implementing YA history browser, it can link to ikiwiki can use the [[HyperEstraier]] search engine to add powerful full text search capabilities to your wiki. -### Commit mails - -ikiwiki can be configured to send you commit mails with diffs of changes -to selected pages. - ### [[w3mmode]] Can be set up so that w3m can be used to browse a wiki and edit pages diff --git a/doc/ikiwiki.setup b/doc/ikiwiki.setup index 44cb35425..c9616e849 100644 --- a/doc/ikiwiki.setup +++ b/doc/ikiwiki.setup @@ -23,7 +23,6 @@ use IkiWiki::Setup::Standard { #rcs => "svn", #historyurl => "http://svn.example.org/trunk/[[file]]", #diffurl => "http://svn.example.org/trunk/[[file]]?root=wiki&r1=[[r1]]&r2=[[r2]]", - #svnrepo => "/svn/wiki", #svnpath => "trunk", # Git stuff. @@ -72,8 +71,6 @@ use IkiWiki::Setup::Standard { # # what you want. # wrapper => "/svn/wikirepo/hooks/post-commit", # wrappermode => "04755", - # # Enable mail notifications of commits. - # notify => 1, # # Log to syslog since svn post-commit hooks # # hide output and errors. # syslog => 1, diff --git a/doc/index/discussion.mdwn b/doc/index/discussion.mdwn index d5a48f282..4cf38e9cb 100644 --- a/doc/index/discussion.mdwn +++ b/doc/index/discussion.mdwn @@ -405,6 +405,9 @@ I'm playing around with various ways that I can use subversion with ikiwiki. > away without running the post-commit wrapper on commit, and all you lose > is the ability to send commit notification emails. +> (And now that [[recentchanges]] includes rss, you can just subscribe to +> that, no need to worry about commit notification emails anymore.) + * Is it possible / sensible to have ikiwiki share a subversion repository with other data (either completely unrelated files or another ikiwiki instance)? This works in part but again the post-commit hook seems problematic. --[[AdamShand]] diff --git a/doc/rcs/monotone.mdwn b/doc/rcs/monotone.mdwn index d79381571..1d3cd2bc4 100644 --- a/doc/rcs/monotone.mdwn +++ b/doc/rcs/monotone.mdwn @@ -10,7 +10,6 @@ The module is available from the monotone source repository at: Monotone support works, but there are still a few minor missing bits (listed here so they are not forgotten): * At the moment there are no links to display diffs between revisions. It shouldn't be hard to add links to a [ViewMTN](http://grahame.angrygoats.net/moinmoin/ViewMTN) instance, but it hasn't been done yet. -* The [[post-commit]] hook support, so that Ikiwiki sends change notifications when people commit using Monotone rather than the web interface, is partially implemented and untested. * Documentation (this page) could be improved. There is also a mismatch between the way Ikiwiki handles conflicts and the way Monotone handles conflicts. At present, if there is a conflict, then Ikiwiki will commit a revision with conflict markers before presenting it to the user. This is ugly, but there is no clean way to fix it at present. diff --git a/doc/setup.mdwn b/doc/setup.mdwn index af1adc235..9bf7f7c7b 100644 --- a/doc/setup.mdwn +++ b/doc/setup.mdwn @@ -180,8 +180,7 @@ about using the git repositories. Once your wiki is checked in to the revision control system, you should configure ikiwiki to use revision control. Edit your ikiwiki.setup, and uncomment the lines for the revision control system -you chose to use. Be sure to set `svnrepo` to $REPOSITORY, if using -subversion. Uncomment the block for the wrapper for your revision +you chose to use. Uncomment the block for the wrapper for your revision control system, and configure the wrapper path in that block appropriately (for Git, it should be `$REPOSITORY/hooks/post-update`). diff --git a/doc/todo/__34__subscribe_to_this_page__34___checkbox_on_edit_form.mdwn b/doc/todo/__34__subscribe_to_this_page__34___checkbox_on_edit_form.mdwn index 70970c6cc..dc456bbbf 100644 --- a/doc/todo/__34__subscribe_to_this_page__34___checkbox_on_edit_form.mdwn +++ b/doc/todo/__34__subscribe_to_this_page__34___checkbox_on_edit_form.mdwn @@ -3,4 +3,8 @@ user to add a page to their subscribed list while editing. This would prove particularly useful for [[todo]] and [bug](bugs) items, to allow users to receive notifications for activity on their reports. ---[[JoshTriplett]] \ No newline at end of file +--[[JoshTriplett]] + +I went and removed commit notification mails entirely, the idea is that you +subscribe using the [[RecentChanges]] rss feed, and filter it on your end. +Good enough? --[[Joey]] diff --git a/doc/todo/bzr.mdwn b/doc/todo/bzr.mdwn index 9650b9da8..51ae08146 100644 --- a/doc/todo/bzr.mdwn +++ b/doc/todo/bzr.mdwn @@ -4,6 +4,8 @@ rcs_commit was only changed to work around bzr's lack of a switch to set the username). bzr_log could probably be written better by someone better at perl, and rcs_getctime and rcs_notify aren't written at all. --[[bma]] +(rcs_notify is not needed in this branch --[[Joey]]) + #!/usr/bin/perl use warnings; diff --git a/doc/todo/mercurial.mdwn b/doc/todo/mercurial.mdwn index e5de93521..608c7d681 100644 --- a/doc/todo/mercurial.mdwn +++ b/doc/todo/mercurial.mdwn @@ -1,6 +1,6 @@ * Need to get post commit hook working (or an example of how to use it.) * See below. --[[bma]] -* rcs_notify is not implemented +* rcs_notify is not implemented (not needed in this branch --[[Joey]]) * Is the code sufficiently robust? It just warns when mercurial fails. * When rcs_commit is called with a $user that is an openid, it will be passed through to mercurial -u. Will mercurial choke on this? diff --git a/doc/usage.mdwn b/doc/usage.mdwn index 136e969c2..354e266f1 100644 --- a/doc/usage.mdwn +++ b/doc/usage.mdwn @@ -133,11 +133,6 @@ configuration options of their own. access controlled by a group, it makes sense for the ikiwiki wrappers to run setgid to that group. -* --notify, --no-notify - - Enable email notification of commits. This should be used when running - ikiwiki as a [[post-commit]] hook. - * --rcs=svn|git|.., --no-rcs Enable or disable use of a [[revision_control_system|rcs]]. @@ -151,11 +146,6 @@ configuration options of their own. No revision control is enabled by default. -* --svnrepo /svn/wiki - - Specify the location of the svn repository for the wiki. This is required - for using --notify with [[Subversion|rcs/svn]]. - * --svnpath trunk Specify the path inside your svn repository where the wiki is located. diff --git a/doc/wikitemplates.mdwn b/doc/wikitemplates.mdwn index 8a579e183..b8341b637 100644 --- a/doc/wikitemplates.mdwn +++ b/doc/wikitemplates.mdwn @@ -11,9 +11,6 @@ located in /usr/share/ikiwiki/templates by default. * `misc.tmpl` - Generic template used for any page that doesn't have a custom template. * `editpage.tmpl` - Create/edit page. -* `notifymail.tmpl` - Not a html template, this is used to - generate change notification mails for users who have subscribed to - changes to a page. * `recentchanges.tmpl` - Used to generate a RecentChanges table with inline. * `change.tmpl` - Used to create a page describing a change made to the wiki. * `passwordmail.tmpl` - Not a html template, this is used to diff --git a/docwiki.setup b/docwiki.setup index 0a6a86678..5793d87bf 100644 --- a/docwiki.setup +++ b/docwiki.setup @@ -15,5 +15,10 @@ use IkiWiki::Setup::Standard { syslog => 0, userdir => "users", usedirs => 0, - add_plugins => [qw{goodstuff version haiku polygen fortune}], + rcs => 'git', + rss => 1, + cgiurl => "http://ikiwiki.info/ikiwiki.cgi", + url => "http://ikiwiki.info", + add_plugins => [qw{goodstuff version haiku polygen fortune + recentchanges }], } diff --git a/ikiwiki.in b/ikiwiki.in index 2aeaf94ec..9d1f6b520 100755 --- a/ikiwiki.in +++ b/ikiwiki.in @@ -36,12 +36,10 @@ sub getconfig () { #{{{ "cgi!" => \$config{cgi}, "discussion!" => \$config{discussion}, "w3mmode!" => \$config{w3mmode}, - "notify!" => \$config{notify}, "url=s" => \$config{url}, "cgiurl=s" => \$config{cgiurl}, "historyurl=s" => \$config{historyurl}, "diffurl=s" => \$config{diffurl}, - "svnrepo" => \$config{svnrepo}, "svnpath" => \$config{svnpath}, "adminemail=s" => \$config{adminemail}, "timeformat=s" => \$config{timeformat}, @@ -132,10 +130,7 @@ sub main () { #{{{ commandline_render(); } elsif ($config{post_commit} && ! commit_hook_enabled()) { - if ($config{notify}) { - loadindex(); - rcs_notify(); - } + # do nothing } else { lockwiki(); @@ -143,7 +138,6 @@ sub main () { #{{{ require IkiWiki::Render; rcs_update(); refresh(); - rcs_notify() if $config{notify}; saveindex(); } } #}}} diff --git a/t/svn.t b/t/svn.t index a1878a73d..8a8282c73 100755 --- a/t/svn.t +++ b/t/svn.t @@ -21,13 +21,14 @@ BEGIN { use_ok("IkiWiki"); } %config=IkiWiki::defaultconfig(); $config{rcs} = "svn"; $config{srcdir} = "$dir/src"; -$config{svnrepo} = "$dir/repo"; $config{svnpath} = "trunk"; IkiWiki::checkconfig(); -system "svnadmin create $config{svnrepo} >/dev/null"; -system "svn mkdir file://$config{svnrepo}/trunk -m add >/dev/null"; -system "svn co file://$config{svnrepo}/trunk $config{srcdir} >/dev/null"; +my $svnrepo = "$dir/repo"; + +system "svnadmin create $svnrepo >/dev/null"; +system "svn mkdir file://$svnrepo/trunk -m add >/dev/null"; +system "svn co file://$svnrepo/trunk $config{srcdir} >/dev/null"; # Web commit my $test1 = readfile("t/test1.mdwn"); diff --git a/templates/notifymail.tmpl b/templates/notifymail.tmpl deleted file mode 100644 index e3a1dd330..000000000 --- a/templates/notifymail.tmpl +++ /dev/null @@ -1,4 +0,0 @@ -The following change was made by : - - - -- cgit v1.2.3 From 965efbb4410883e4b841e352919e26be3e7f9373 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Sat, 2 Feb 2008 06:59:00 -0500 Subject: web commit by http://perolofsson.myopenid.com/ --- doc/bugs/discussion_of_what__63__.mdwn | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 doc/bugs/discussion_of_what__63__.mdwn (limited to 'doc/bugs') diff --git a/doc/bugs/discussion_of_what__63__.mdwn b/doc/bugs/discussion_of_what__63__.mdwn new file mode 100644 index 000000000..2f469fed9 --- /dev/null +++ b/doc/bugs/discussion_of_what__63__.mdwn @@ -0,0 +1,3 @@ +When searching in ikiwiki, sometimes discussion pages turn up. However, they are only titled "discussion". +In order to know what topic they are discussing, you have to look at the URL. Shouldn't they be titled +"foo/discussion" or "discussion of foo" or something? Thanks, --[[perolofsson]] -- cgit v1.2.3 From d8d2b316928e04d95f3abd4c392ba44403837837 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Sun, 3 Feb 2008 15:05:31 -0500 Subject: fix broken link --- doc/bugs/taint_issue_with_regular_expressions.mdwn | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'doc/bugs') diff --git a/doc/bugs/taint_issue_with_regular_expressions.mdwn b/doc/bugs/taint_issue_with_regular_expressions.mdwn index 6544c8aae..8fe411e5f 100644 --- a/doc/bugs/taint_issue_with_regular_expressions.mdwn +++ b/doc/bugs/taint_issue_with_regular_expressions.mdwn @@ -12,7 +12,7 @@ which is exactly the same regular expression drawn out as a constant. It appear > hole. It seems more likely that perl containes to have taint flag bugs > even in 5.8. See also: [[prune_causing_taint_mode_failures]], > [[Insecure_dependency_in_mkdir]], -> [[Insecure_dependency_in_eval_while_running_with_-T_switch.mdwn]], +> [[Insecure_dependency_in_eval_while_running_with_-T_switch]], > and especially [[debbug 411786]] > > The last of those was the last straw for me, and I disabled taint -- cgit v1.2.3 From 855f28e105ad6f552847891790400f0760d9a631 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Sun, 3 Feb 2008 17:48:30 -0500 Subject: removing old patch that was also sent by mail --- doc/bugs/Monotone_rcs_support.mdwn | 182 +------------------------------------ 1 file changed, 1 insertion(+), 181 deletions(-) (limited to 'doc/bugs') diff --git a/doc/bugs/Monotone_rcs_support.mdwn b/doc/bugs/Monotone_rcs_support.mdwn index 8eaea11af..866805348 100644 --- a/doc/bugs/Monotone_rcs_support.mdwn +++ b/doc/bugs/Monotone_rcs_support.mdwn @@ -75,184 +75,4 @@ change emails at all (cgi or otherwise), so I tested by adding warn() calls. Th few things that needed to be fixed. Support is much closer now (including a simple default monotone lua hook). -When I stick this diff inline into the page, I have to indent it by four spaces, and that's fine. -But markdown seems to still be interpreting parts of it (e.g. the diff url) in strange ways. I -think it is the square brackets. - - Index: IkiWiki/Rcs/monotone.pm - =================================================================== - --- IkiWiki/Rcs/monotone.pm (revision 4252) - +++ IkiWiki/Rcs/monotone.pm (working copy) - @@ -186,8 +186,9 @@ - check_config(); - - if (defined($config{mtnsync}) && $config{mtnsync}) { - + check_mergerc(); - if (system("mtn", "--root=$config{mtnrootdir}", "sync", - - "--quiet", "--ticker=none", - + "--quiet", "--ticker=none", "--rcfile", $config{mtnmergerc}, - "--key", $config{mtnkey}) != 0) { - debug("monotone sync failed before update"); - } - @@ -342,10 +343,10 @@ - return $conflict; - } - if (defined($config{mtnsync}) && $config{mtnsync}) { - - if (system("mtn", "--root=$config{mtnrootdir}", "sync", - + if (system("mtn", "--root=$config{mtnrootdir}", "push", - "--quiet", "--ticker=none", "--key", - $config{mtnkey}) != 0) { - - debug("monotone sync failed"); - + debug("monotone push failed"); - } - } - - @@ -431,10 +432,28 @@ - my @changed_files = get_changed_files($automator, $rev); - my $file; - - + my ($out, $err) = $automator->call("parents", $rev); - + my @parents = ($out =~ m/^($sha1_pattern)$/); - + my $parent = $parents[0]; - + - foreach $file (@changed_files) { - - push @pages, { - - page => pagename($file), - - } if length $file; - + if (length($file)) { - + if (defined $config{diffurl} and (@parents == 1)) { - + my $diffurl=$config{diffurl}; - + $diffurl=~s/\[\[r1\]\]/$parent/g; - + $diffurl=~s/\[\[r2\]\]/$rev/g; - + $diffurl=~s/\[\[file\]\]/$file/g; - + push @pages, { - + page => pagename($file), - + diffurl => $diffurl, - + }; - + } - + else { - + push @pages, { - + page => pagename($file), - + }; - + } - + } - } - - push @ret, { - @@ -487,6 +506,18 @@ - - my @changed_pages = get_changed_files($automator, $rev); - - + my ($out, $err) = $automator->call("parents", $rev); - + my @parents = ($out =~ m/^($sha1_pattern)$/); - + my $parent = $parents[0]; - + - + my $diff; - + - + if (@parents == 1) { - + $automator->setOpts("r", $parent, "r", $rev); - + ($out, $err) = $automator->call("content_diff"); - + $diff = $out; - + } - + - $automator->close(); - - require IkiWiki::UserInfo; - @@ -495,7 +526,7 @@ - return $message; - }, - sub { - - `mtn --root=$config{mtnrootdir} au content_diff -r $rev`; - + return $diff; - }, - $user, @changed_pages); - } #}}} - @@ -604,4 +635,9 @@ - return true - end - } - + function note_netsync_revision_received(new_id, revision, certs, session_id) - + if (program_exists_in_path("ikiwiki-netsync-hook")) then - + execute("ikiwiki-netsync-hook", new_id) - + end - + end - EOF - Index: IkiWiki/Wrapper.pm - =================================================================== - --- IkiWiki/Wrapper.pm (revision 4252) - +++ IkiWiki/Wrapper.pm (working copy) - @@ -46,6 +46,16 @@ - addenv("REV", s); - EOF - } - + if ($config{rcs} eq "monotone" && $config{notify}) { - + # Support running directly as hooks/post-commit by passing - + # $1 in REV in the environment. - + $envsave.=<<"EOF" - + if (argc == 2) - + addenv("REV", argv[1]); - + else if ((s=getenv("REV"))) - + addenv("REV", s); - +EOF - + } - if ($config{rcs} eq "tla" && $config{notify}) { - $envsave.=<<"EOF" - if ((s=getenv("ARCH_VERSION"))) - Index: doc/rcs/monotone.mdwn - =================================================================== - --- doc/rcs/monotone.mdwn (revision 4252) - +++ doc/rcs/monotone.mdwn (working copy) - @@ -1,16 +1,13 @@ - -[monotone](http://monotone.ca/) is a distributed revision control system. - -Ikiwiki supports storing a wiki in Monotone and editing it using the [[cgi]] interface. - +[Monotone](http://monotone.ca/) is a distributed revision control system. - +Ikiwiki supports storing a wiki in a Monotone repository and editing it using the [[cgi]] interface. - It will use the Monotone logs to generate the [[RecentChanges]] page. - - -The monotone support requires the Monotone perl module (from the contrib/ directory - -in the monotone source) to be installed. In particular, it needs version 0.03 or higher of that module. - +The monotone support in Ikiwiki requires the Monotone perl module to be installed - +(available from the contrib/ directory in the monotone source). - +In particular, it needs version 0.03 or higher of that module. - The module is available from the monotone source repository at: - - - -Monotone support works, but there are still a few minor missing bits (listed here so they are not forgotten): - +At present the [[post-commit]] hook support is implemented but only partially tested. - - -* At the moment there are no links to display diffs between revisions. It shouldn't be hard to add links to a [ViewMTN](http://grahame.angrygoats.net/moinmoin/ViewMTN) instance, but it hasn't been done yet. - -* The [[post-commit]] hook support, so that Ikiwiki sends change notifications when people commit using Monotone rather than the web interface, is partially implemented and untested. - -* Documentation (this page) could be improved. - - - There is also a mismatch between the way Ikiwiki handles conflicts and the way Monotone handles conflicts. At present, if there is a conflict, then Ikiwiki will commit a revision with conflict markers before presenting it to the user. This is ugly, but there is no clean way to fix it at present. - Index: doc/ikiwiki.setup - =================================================================== - --- doc/ikiwiki.setup (revision 4252) - +++ doc/ikiwiki.setup (working copy) - @@ -46,6 +46,8 @@ - # Monotone stuff - #rcs => "monotone", - #mtnkey => "web\@machine.company.com", - + #historyurl => "http://viewmtn.company.com/", - + #diffurl => "http://viewmtn.company.com/revision/diff/[[r1]]/with/[[r2]]/[[file]]", - # Set if you want the wiki to sync on update and commit. - #mtnsync => 0, - # The path to your workspace (defaults to the srcdir itself) - @@ -88,6 +90,16 @@ - # # Enable mail notifications of commits. - # notify => 1, - #}, - + #{ - + # # The monotone netsync revision received wrapper. - + # # Note that you also need to install a lua - + # # hook into monotone to make this work - + # # see: http://ikiwiki.info/rcs/monotone/ - + # wrapper => "/usr/local/bin/ikiwiki-netsync-hook", - + # wrappermode => "04755", - + # # Enable mail notifications of commits. - + # notify => 1, - + #}, - ], - - # Generate rss feeds for blogs? - +> We handled this patchset by mail, I applied the still-relevant parts. --[[Joey]] -- cgit v1.2.3 From 749c1e36d90998043c1988a49894d9ee23e60ec4 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Sun, 3 Feb 2008 18:14:39 -0500 Subject: * monotone changes by Brian May: - On commits, replace "mtn sync" bidirectional with "mtn push" single direction. No need to pull changes when doing a commit. mtn sync is still called in rcs_update. - Support for viewing differences via patches using viewmtn. --- IkiWiki/Rcs/monotone.pm | 28 ++++++-- debian/changelog | 5 ++ doc/bugs/Monotone_rcs_support.mdwn | 134 ++++++++++++++++--------------------- doc/ikiwiki.setup | 2 + doc/rcs/monotone.mdwn | 19 ++++-- 5 files changed, 98 insertions(+), 90 deletions(-) (limited to 'doc/bugs') diff --git a/IkiWiki/Rcs/monotone.pm b/IkiWiki/Rcs/monotone.pm index 0ae2c1a32..a6c850f0d 100644 --- a/IkiWiki/Rcs/monotone.pm +++ b/IkiWiki/Rcs/monotone.pm @@ -342,10 +342,10 @@ sub rcs_commit ($$$;$$) { #{{{ return $conflict; } if (defined($config{mtnsync}) && $config{mtnsync}) { - if (system("mtn", "--root=$config{mtnrootdir}", "sync", + if (system("mtn", "--root=$config{mtnrootdir}", "push", "--quiet", "--ticker=none", "--key", $config{mtnkey}) != 0) { - debug("monotone sync failed"); + debug("monotone push failed"); } } @@ -431,10 +431,28 @@ sub rcs_recentchanges ($) { #{{{ my @changed_files = get_changed_files($automator, $rev); my $file; + my ($out, $err) = $automator->call("parents", $rev); + my @parents = ($out =~ m/^($sha1_pattern)$/); + my $parent = $parents[0]; + foreach $file (@changed_files) { - push @pages, { - page => pagename($file), - } if length $file; + next unless length $file; + + if (defined $config{diffurl} and (@parents == 1)) { + my $diffurl=$config{diffurl}; + $diffurl=~s/\[\[r1\]\]/$parent/g; + $diffurl=~s/\[\[r2\]\]/$rev/g; + $diffurl=~s/\[\[file\]\]/$file/g; + push @pages, { + page => pagename($file), + diffurl => $diffurl, + }; + } + else { + push @pages, { + page => pagename($file), + } + } } push @ret, { diff --git a/debian/changelog b/debian/changelog index 1266666e3..a1100500f 100644 --- a/debian/changelog +++ b/debian/changelog @@ -22,6 +22,11 @@ ikiwiki (2.31) UNRELEASED; urgency=low * aggregate: Lots of changes; aggregation can now run without locking the wiki, and there is a separate aggregatelock to prevent multiple concurrent aggregation runs. + * monotone changes by Brian May: + - On commits, replace "mtn sync" bidirectional with "mtn push" single + direction. No need to pull changes when doing a commit. mtn sync + is still called in rcs_update. + - Support for viewing differences via patches using viewmtn. -- Joey Hess Sat, 02 Feb 2008 23:36:31 -0500 diff --git a/doc/bugs/Monotone_rcs_support.mdwn b/doc/bugs/Monotone_rcs_support.mdwn index 866805348..d5cc37c27 100644 --- a/doc/bugs/Monotone_rcs_support.mdwn +++ b/doc/bugs/Monotone_rcs_support.mdwn @@ -1,78 +1,56 @@ -#Ikiwiki plugin for the Monotone revision control system. - -I've just made a patch to the ikiwiki code that allows it to use the [[rcs/Monotone]] revision control system. It is available at: - - - -At the moment it is basically complete. At present rcs_notify() is implemeted but untested, the rest is implemented and tested. - -The current version of the patch handles conflicts through the web interface. It is still not perfect as it will break if there is a rename that conflicts with a web change (but so will the other Rcs plugins I think). It also commits a revision with conflict markers if there is a conflict requiring such markers... ick. - -Note: This patch requires a rather recent Monotone perl module (18 August 2007 or later). It is available from the monotone repository here: . - -> The setup instructions to add 40 lines of code to monotonerc is pretty frightning stuff. -> Is there some way this can be automated? --[[Joey]] - ->> I've committed a bunch of this to monotone so that in future it could be removed. ->> I've also just fixed this so it is in a separate, automagically generated, rc file. - ->>> Fair enough. Didn't realize you were a monotone committer. :-) - ->>>> I am, but still a little newish. Feedback is good. In particular, this is my first major bit of PERL. - -> Having rcs_commit return a warning message when there's an unresolved conflict -> isn't right; that message will populate the page edit box. You might want -> to use the error() function here? - ->> It should never reach that case, so I have changed that to error. - -> There'an incomplete comment ending with "note, this relies on the fact that" - ->> erg... sorry, fixed. - -[[tag patch]] - ->> I've [[accepted|done]] this patch, thank you! - ->>> Thanks for committing it. I hate keeping my own diffs. :) - ->> I did make a few changes. Please review, and make sure it still works ->> (a test case like we have for some of the other RCSes would be nice..) - ->>> Tested. It still works at least as well as it did. I'll try to get to a test case soon. ->>> In checking the source I noticed a few bogus comments I left in when editing, ->>> and a bug in page adding. ->>> Here is a small patch for them: - ->>>> applied - -Here is another patch. It fixes a FIXME you added. I was using $file within backticks because -I was getting an error trying to do it right. I've figured out the error, and now do it right. This -should also speed things up (very slightly) - -> applied - ->> BTW, will all the monotone output parsing work if LANG != C? - ->>> It should (he says crossing fingers). ->>> In the places where I do any complex parsing I'm using a special ->>> version of the mtn commands designed for scripting. They have a ->>> stable, easy to parse, output that doesn't get translated (I think). - ->> Do monotone post-commit hooks actually use REV? - ->>> Monotone post-commit hooks are written in Lua and can do ->>> what they please. Setting the REV environment var before ->>> calling Ikiwiki seems reasonable, but I've not written the ->>> Lua hook. - ->>>> So the rcs_notify support is not just untested, but can't work ->>>> at all w/o further development. - -I've just done this further development... The following patch adds support for diffurls. -I've also partially tested the commit message support. I was unable to get Ikiwiki to send -change emails at all (cgi or otherwise), so I tested by adding warn() calls. There were a -few things that needed to be fixed. Support is much closer now (including a simple default -monotone lua hook). - -> We handled this patchset by mail, I applied the still-relevant parts. --[[Joey]] +The Monotone module still lacks support for setting up a post-commit hook, +so commits made via monotone will not automatically update the wiki. + +Here for future reference is the most recent version of support for +that I've been sent. It's not yet working; there are path issues. --[[Joey]] + +
+diff --git a/IkiWiki/Rcs/monotone.pm b/IkiWiki/Rcs/monotone.pm
+index cde6029..34f8f96 100644
+--- a/IkiWiki/Rcs/monotone.pm
++++ b/IkiWiki/Rcs/monotone.pm
+@@ -186,8 +186,9 @@ sub rcs_update () { #{{{
+ 	check_config();
+ 
+ 	if (defined($config{mtnsync}) && $config{mtnsync}) {
++		check_mergerc();
+ 		if (system("mtn", "--root=$config{mtnrootdir}", "sync",
+-		           "--quiet", "--ticker=none", 
++		           "--quiet", "--ticker=none", "--rcfile", $config{mtnmergerc},
+ 		           "--key", $config{mtnkey}) != 0) {
+ 			debug("monotone sync failed before update");
+ 		}
+@@ -604,4 +605,9 @@ __DATA__
+ 	           return true
+ 	      end
+ 	}
++	function note_netsync_revision_received(new_id, revision, certs, session_id)
++	    if (program_exists_in_path("ikiwiki-netsync-hook")) then
++	        execute("ikiwiki-netsync-hook", new_id)
++	    end
++	end
+ EOF
+diff --git a/IkiWiki/Wrapper.pm b/IkiWiki/Wrapper.pm
+index 2103ea5..cff718c 100644
+diff --git a/doc/ikiwiki.setup b/doc/ikiwiki.setup
+index 1377315..0cbe27e 100644
+--- a/doc/ikiwiki.setup
++++ b/doc/ikiwiki.setup
+@@ -88,6 +88,16 @@ use IkiWiki::Setup::Standard {
+ 		#	# Enable mail notifications of commits.
+ 		#	notify => 1,
+ 		#},
++		#{
++		#	# The monotone netsync revision received wrapper.
++		#	# Note that you also need to install a lua
++		#	# hook into monotone to make this work
++		#	# see: http://ikiwiki.info/rcs/monotone/
++		#	wrapper => "/usr/local/bin/ikiwiki-netsync-hook",
++		#	wrappermode => "04755",
++		#	# Enable mail notifications of commits.
++		#	notify => 1,
++		#},
+ 	],
+ 
+ 	# Generate rss feeds for blogs?
+
diff --git a/doc/ikiwiki.setup b/doc/ikiwiki.setup index f808be2c2..059485d38 100644 --- a/doc/ikiwiki.setup +++ b/doc/ikiwiki.setup @@ -50,6 +50,8 @@ use IkiWiki::Setup::Standard { # Monotone stuff #rcs => "monotone", #mtnkey => "web\@machine.company.com", + #historyurl => "http://viewmtn.example.com/", + #diffurl => "http://viewmtn.example.com/revision/diff/[[r1]]/with/[[r2]]/[[file]]", # Set if you want the wiki to sync on update and commit. #mtnsync => 0, # The path to your workspace (defaults to the srcdir itself) diff --git a/doc/rcs/monotone.mdwn b/doc/rcs/monotone.mdwn index 1d3cd2bc4..f9f474291 100644 --- a/doc/rcs/monotone.mdwn +++ b/doc/rcs/monotone.mdwn @@ -1,15 +1,20 @@ -[monotone](http://monotone.ca/) is a distributed revision control system. -Ikiwiki supports storing a wiki in Monotone and editing it using the [[cgi]] interface. -It will use the Monotone logs to generate the [[RecentChanges]] page. +[Monotone](http://monotone.ca/) is a distributed revision control system. +Ikiwiki supports storing a wiki in a Monotone repository and editing it +using the [[cgi]] interface. It will use the Monotone logs to generate the +[[RecentChanges]] page. -The monotone support requires the Monotone perl module (from the contrib/ directory -in the monotone source) to be installed. In particular, it needs version 0.03 or higher of that module. +The monotone support in ikiwiki requires the Monotone perl module to be +installed. (It's available from the contrib/ directory in the monotone +source.) In particular, it needs version 0.03 or higher of that module. The module is available from the monotone source repository at: Monotone support works, but there are still a few minor missing bits (listed here so they are not forgotten): -* At the moment there are no links to display diffs between revisions. It shouldn't be hard to add links to a [ViewMTN](http://grahame.angrygoats.net/moinmoin/ViewMTN) instance, but it hasn't been done yet. +* The [[post-commit]] hook support is not yet completly implemented. * Documentation (this page) could be improved. -There is also a mismatch between the way Ikiwiki handles conflicts and the way Monotone handles conflicts. At present, if there is a conflict, then Ikiwiki will commit a revision with conflict markers before presenting it to the user. This is ugly, but there is no clean way to fix it at present. +There is also a mismatch between the way Ikiwiki handles conflicts and the +way Monotone handles conflicts. At present, if there is a conflict, then +Ikiwiki will commit a revision with conflict markers before presenting it +to the user. This is ugly, but there is no clean way to fix it at present. -- cgit v1.2.3