summaryrefslogtreecommitdiff
path: root/IkiWiki/Rcs/Stub.pm
blob: d94daf8bc9522b31db221c162bab410a5e16a2ed (plain)
  1. #!/usr/bin/perl
  2. # Stubs for no revision control.
  3. use warnings;
  4. use strict;
  5. use IkiWiki;
  6. package IkiWiki;
  7. sub rcs_update () {
  8. # Update working directory to current version.
  9. # (May be more complex for distributed RCS.)
  10. }
  11. sub rcs_prepedit ($) {
  12. # Prepares to edit a file under revision control. Returns a token
  13. # that must be passed into rcs_commit when the file is ready
  14. # for committing.
  15. # The file is relative to the srcdir.
  16. return ""
  17. }
  18. sub rcs_commit ($$$;$$) {
  19. # Tries to commit the page; returns undef on _success_ and
  20. # a version of the page with the rcs's conflict markers on failure.
  21. # The file is relative to the srcdir.
  22. return undef # success
  23. }
  24. sub rcs_add ($) {
  25. # Add a file. The filename is relative to the root of the srcdir.
  26. # Note that this should not check the new file in, it should only
  27. # prepare for it to be checked in when rcs_commit is called.
  28. }
  29. sub rcs_recentchanges ($) {
  30. # Examine the RCS history and generate a list of recent changes.
  31. # The data structure returned for each change is:
  32. # {
  33. # rev => # the RCSs id for this commit
  34. # user => # name of user who made the change,
  35. # committype => # either "web" or the name of the rcs,
  36. # when => # time when the change was made,
  37. # message => [
  38. # { line => "commit message line" },
  39. # { line => "commit message line" },
  40. # # etc,
  41. # ],
  42. # pages => [
  43. # {
  44. # page => # name of page changed,
  45. # diffurl => # optional url to a diff showing
  46. # # the changes,
  47. # },
  48. # # repeat for each page changed in this commit,
  49. # ],
  50. # }
  51. }
  52. sub rcs_diff ($) {
  53. # Optional, used to get diffs for recentchanges.
  54. # The parameter is the rev from rcs_recentchanges.
  55. return "";
  56. }
  57. sub rcs_getctime ($) {
  58. # Optional, used to get the page creation time from the RCS.
  59. error gettext("getctime not implemented");
  60. }
  61. 1