]> sipb.mit.edu Git - ikiwiki.git/blob - IkiWiki/Rcs/Stub.pm
web commit by JoshTriplett: Use semantic markup (valid in XHTML 1.0 this time) in...
[ikiwiki.git] / IkiWiki / Rcs / Stub.pm
1 #!/usr/bin/perl
2 # Stubs for no revision control.
3
4 use warnings;
5 use strict;
6 use IkiWiki;
7
8 package IkiWiki;
9
10 sub rcs_update () {
11         # Update working directory to current version.
12         # (May be more complex for distributed RCS.)
13 }
14
15 sub rcs_prepedit ($) {
16         # Prepares to edit a file under revision control. Returns a token
17         # that must be passed into rcs_commit when the file is ready
18         # for committing.
19         # The file is relative to the srcdir.
20         return ""
21 }
22
23 sub rcs_commit ($$$;$$) {
24         # Tries to commit the page; returns undef on _success_ and
25         # a version of the page with the rcs's conflict markers on failure.
26         # The file is relative to the srcdir.
27         return undef # success
28 }
29
30 sub rcs_add ($) {
31         # Add a file. The filename is relative to the root of the srcdir.
32 }
33
34 sub rcs_recentchanges ($) {
35         # Examine the RCS history and generate a list of recent changes.
36         # The data structure returned for each change is:
37         # {
38         #       user => # name of user who made the change,
39         #       committype => # either "web" or the name of the rcs,
40         #       when => # time when the change was made,
41         #       message => [
42         #               { line => "commit message line" },
43         #               { line => "commit message line" },
44         #               # etc,
45         #       ],
46         #       pages => [
47         #               {
48         #                       page => # name of page changed,
49         #                       diffurl => # optional url to a diff showing 
50         #                                  # the changes,
51         #               },
52         #               # repeat for each page changed in this commit,
53         #       ],
54         # }
55 }
56
57 sub rcs_notify () {
58         # This function is called when a change is committed to the wiki,
59         # and ikiwiki is running as a post-commit hook from the RCS.
60         # It should examine the repository to somehow determine what pages
61         # changed, and then send emails to users subscribed to those pages.
62 }
63
64 sub rcs_getctime ($) {
65         # Optional, used to get the page creation time from the RCS.
66         error gettext("getctime not implemented");
67 }
68
69 1