X-Git-Url: http://git.vanrenterghem.biz/git.ikiwiki.info.git/blobdiff_plain/4e1d7d8ff281777c53805072978d4718b8532863..56b9b85e3332fbb920fb74b4dd30574fce6dc469:/IkiWiki/Rcs/mercurial.pm diff --git a/IkiWiki/Rcs/mercurial.pm b/IkiWiki/Rcs/mercurial.pm index bfe6ba49c..6452a0805 100644 --- a/IkiWiki/Rcs/mercurial.pm +++ b/IkiWiki/Rcs/mercurial.pm @@ -8,7 +8,27 @@ use IkiWiki; use Encode; use open qw{:utf8 :std}; -sub mercurial_log($) { +hook(type => "getsetup", id => "mercurial", call => sub { #{{{ + return + historyurl => { + type => "string", + default => "", + example => "http://example.com:8000/log/tip/[[file]]", + description => "url to hg serve'd repository, to show file history ([[file]] substituted)", + safe => 1, + rebuild => 1, + }, + diffurl => { + type => "string", + default => "", + example => "http://localhost:8000/?fd=[[r2]];file=[[file]]", + description => "url to hg serve'd repository, to show diff ([[file]] and [[r2]] substituted)", + safe => 1, + rebuild => 1, + }, +}); #}}} + +sub mercurial_log ($) { #{{{ my $out = shift; my @infos; @@ -52,7 +72,7 @@ sub mercurial_log($) { close $out; return @infos; -} +} #}}} sub rcs_update () { #{{{ my @cmdline = ("hg", "-q", "-R", "$config{srcdir}", "update"); @@ -92,6 +112,14 @@ sub rcs_commit ($$$;$$) { #{{{ return undef; # success } #}}} +sub rcs_commit_staged ($$$) { + # Commits all staged changes. Changes can be staged using rcs_add, + # rcs_remove, and rcs_rename. + my ($message, $user, $ipaddr)=@_; + + error("rcs_commit_staged not implemented for mercurial"); # TODO +} + sub rcs_add ($) { # {{{ my ($file) = @_; @@ -101,6 +129,18 @@ sub rcs_add ($) { # {{{ } } #}}} +sub rcs_remove ($) { # {{{ + my ($file) = @_; + + error("rcs_remove not implemented for mercurial"); # TODO +} #}}} + +sub rcs_rename ($$) { # {{{ + my ($src, $dest) = @_; + + error("rcs_rename not implemented for mercurial"); # TODO +} #}}} + sub rcs_recentchanges ($) { #{{{ my ($num) = @_;