]> sipb.mit.edu Git - ikiwiki.git/blob - IkiWiki/Rcs/Stub.pm
fix encoding issues with link conversion
[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         my ($file, $message, $rcstoken, $user, $ipaddr) = @_;
28         return undef # success
29 }
30
31 sub rcs_commit_staged ($$$) {
32         # Commits all staged changes. Changes can be staged using rcs_add,
33         # rcs_remove, and rcs_rename.
34         my ($message, $user, $ipaddr)=@_;
35         return undef # success
36 }
37
38 sub rcs_add ($) {
39         # Add a file. The filename is relative to the root of the srcdir.
40         # Note that this should not check the new file in, it should only
41         # prepare for it to be checked in when rcs_commit is called.
42         # Note that the file may be in a new subdir that is not yet added
43         # to version control; the subdir can be added if so.
44 }
45
46 sub rcs_remove ($) {
47         # Remove a file. The filename is relative to the root of the srcdir.
48         # Note that this should not check the removal in, it should only
49         # prepare for it to be checked in when rcs_commit is called.
50         # Note that the new file may be in a new subdir that is not yet added
51         # to version control; the subdir can be added if so.
52 }
53
54 sub rcs_rename ($$) {
55         # Rename a file. The filenames are relative to the root of the srcdir.
56         # Note that this should not commit the rename, it should only
57         # prepare it for when rcs_commit is called.
58         # The new filename may be in a new subdir, that is not yet added to
59         # version control. If so, the subdir will exist already, and should
60         # be added to revision control.
61 }
62
63 sub rcs_recentchanges ($) {
64         # Examine the RCS history and generate a list of recent changes.
65         # The data structure returned for each change is:
66         # {
67         #       rev => # the RCSs id for this commit
68         #       user => # name of user who made the change,
69         #       committype => # either "web" or the name of the rcs,
70         #       when => # time when the change was made,
71         #       message => [
72         #               { line => "commit message line" },
73         #               { line => "commit message line" },
74         #               # etc,
75         #       ],
76         #       pages => [
77         #               {
78         #                       page => # name of page changed,
79         #                       diffurl => # optional url to a diff showing 
80         #                                  # the changes,
81         #               },
82         #               # repeat for each page changed in this commit,
83         #       ],
84         # }
85 }
86
87 sub rcs_diff ($) {
88         # Optional, used to get diffs for recentchanges.
89         # The parameter is the rev from rcs_recentchanges.
90         # Should return a list of lines of the diff (including \n) in list
91         # context, and the whole diff in scalar context.
92 }
93
94 sub rcs_getctime ($) {
95         # Optional, used to get the page creation time from the RCS.
96         error gettext("getctime not implemented");
97 }
98
99 1