(no commit message)
[ikiwiki] / doc / todo / Add_instructive_commit_messages_for_add__47__edit_pages.mdwn
1 When I added or edited a page, no commit message was written out (Mercurial backend, though I guess it shouldn't matter). This was done for e.g. the `rename` plugin. I made a naive but seemingly working change to `editpage.pm` to add a message.
2
3 I modeled the message on `rename.pm`, which used a lowercase initial letter and imperative form of the verb. This is not the case for e.g. the `comment` plugin, which says "Added a comment: ", so I guess there is no strict rule on style in this case.
4
5 Diff follows. --[[Daniel Andersson]]
6
7 [[!tag patch]]
8
9 ---
10
11         diff -r ee177ca9bf36 Plugin/editpage.pm
12         --- a/Plugin/editpage.pm        Fri Jul 15 17:58:04 2011 +0200
13         +++ b/Plugin/editpage.pm        Sat Jul 16 03:01:13 2011 +0200
14         @@ -405,6 +405,10 @@
15                         if ($config{rcs}) {
16                                 if (! $exists) {
17                                         rcs_add($file);
18         +                               $message = "add $file";
19         +                       }
20         +                       else {
21         +                               $message = "edit $file";
22                                 }
23          
24                                 # Prevent deadlock with post-commit hook by