]> sipb.mit.edu Git - ikiwiki.git/blob - IkiWiki/Rcs/Stub.pm
Merge commit 'origin/master' into tova
[ikiwiki.git] / IkiWiki / Rcs / Stub.pm
1 #!/usr/bin/perl
2 # Stubs for no revision control.
3
4 package IkiWiki;
5
6 use warnings;
7 use strict;
8 use 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         # Note that this should not check the new file in, it should only
33         # prepare for it to be checked in when rcs_commit is called.
34 }
35
36 sub rcs_remove ($) {
37         # Remove a file. The filename is relative to the root of the srcdir.
38         # Note that this should not check the removal in, it should only
39         # prepare for it to be checked in when rcs_commit is called.
40 }
41
42 sub rcs_recentchanges ($) {
43         # Examine the RCS history and generate a list of recent changes.
44         # The data structure returned for each change is:
45         # {
46         #       rev => # the RCSs id for this commit
47         #       user => # name of user who made the change,
48         #       committype => # either "web" or the name of the rcs,
49         #       when => # time when the change was made,
50         #       message => [
51         #               { line => "commit message line" },
52         #               { line => "commit message line" },
53         #               # etc,
54         #       ],
55         #       pages => [
56         #               {
57         #                       page => # name of page changed,
58         #                       diffurl => # optional url to a diff showing 
59         #                                  # the changes,
60         #               },
61         #               # repeat for each page changed in this commit,
62         #       ],
63         # }
64 }
65
66 sub rcs_diff ($) {
67         # Optional, used to get diffs for recentchanges.
68         # The parameter is the rev from rcs_recentchanges.
69         # Should return a list of lines of the diff (including \n) in list
70         # context, and the whole diff in scalar context.
71 }
72
73 sub rcs_getctime ($) {
74         # Optional, used to get the page creation time from the RCS.
75         error gettext("getctime not implemented");
76 }
77
78 1