From 7ba0f7d297e7d3e833756016b635ffa0cc78200e Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Mon, 11 Oct 2010 20:30:14 -0400 Subject: [PATCH] monotone: Fix recentchanges page when the srcdir is not at the top of the monotone workspace. Thanks, tommyd. --- IkiWiki/Plugin/monotone.pm | 13 ++++++++++++- debian/changelog | 2 ++ ...e_backend_does_not_support_srcdir_in_subdir.mdwn | 2 ++ 3 files changed, 16 insertions(+), 1 deletion(-) diff --git a/IkiWiki/Plugin/monotone.pm b/IkiWiki/Plugin/monotone.pm index 95fbcee76..75bf2f458 100644 --- a/IkiWiki/Plugin/monotone.pm +++ b/IkiWiki/Plugin/monotone.pm @@ -252,9 +252,20 @@ sub get_changed_files ($$) { my @ret; my %seen = (); - + + # we need to strip off the relative path to the source dir + # because monotone outputs all file paths absolute according + # to the workspace root + my $rel_src_dir = $config{'srcdir'}; + $rel_src_dir =~ s/^\Q$config{'mtnrootdir'}\E\/?//; + $rel_src_dir .= "/" if length $rel_src_dir; + while ($changes =~ m/\s*(add_file|patch|delete|rename)\s"(.*?)(? Wed, 29 Sep 2010 11:58:23 -0400 diff --git a/doc/bugs/monotone_backend_does_not_support_srcdir_in_subdir.mdwn b/doc/bugs/monotone_backend_does_not_support_srcdir_in_subdir.mdwn index 9e1924472..35f624f78 100644 --- a/doc/bugs/monotone_backend_does_not_support_srcdir_in_subdir.mdwn +++ b/doc/bugs/monotone_backend_does_not_support_srcdir_in_subdir.mdwn @@ -1,3 +1,5 @@ The [[rcs/monotone]] backend does not currently support putting the ikiwiki srcdir in a subdirectory of the repository. It must be at the top. Git has special code to handle this case. --[[Joey]] + +[[done]] -- 2.32.0.93.g670b81a890