diff options
author | Joey Hess <joey@kodama.kitenet.net> | 2008-03-03 15:53:34 -0500 |
---|---|---|
committer | Joey Hess <joey@kodama.kitenet.net> | 2008-03-03 15:53:34 -0500 |
commit | d93aaed7919f0449d387aed6c6ee3aaff85a12eb (patch) | |
tree | f31e998cae4b6ec478d366f7997b0a892d89a328 /IkiWiki/Rcs/tla.pm | |
parent | 59379d0205fdbdb90553d1f5cef666e7e72a8927 (diff) | |
download | ikiwiki-d93aaed7919f0449d387aed6c6ee3aaff85a12eb.tar ikiwiki-d93aaed7919f0449d387aed6c6ee3aaff85a12eb.tar.gz |
* Add recentchangesdiff plugin that adds diffs to the recentchanges feeds.
* rcs_diff is a new function that rcs modules should implement.
* Implemented rcs_diff for git, svn, and tla (tla version untested).
Mercurial and monotone still todo.
Diffstat (limited to 'IkiWiki/Rcs/tla.pm')
-rw-r--r-- | IkiWiki/Rcs/tla.pm | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/IkiWiki/Rcs/tla.pm b/IkiWiki/Rcs/tla.pm index 231496445..2890ff8c7 100644 --- a/IkiWiki/Rcs/tla.pm +++ b/IkiWiki/Rcs/tla.pm @@ -160,6 +160,20 @@ sub rcs_recentchanges ($) { return @ret; } +sub rcs_diff ($) { #{{{ + my $rev=shift; + 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]; + return scalar `tla diff -d $config{srcdir} $revminusone`; +} #}}} + sub rcs_getctime ($) { #{{{ my $file=shift; eval q{use Date::Parse}; |