summaryrefslogtreecommitdiff
path: root/IkiWiki/Rcs/Stub.pm
blob: ffd9e18650d7effc87e17e4c02e3fd4d9fe24a6d (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. }
  27. sub rcs_recentchanges ($) {
  28. # Examine the RCS history and generate a data structure for
  29. # the recentchanges page.
  30. # This structure is a list of items, each item is a hash reference
  31. # representing one change to the repo.
  32. # The hash has keys user (a link to the user making the change),
  33. # committype (web or the name of the rcs), when (when the change
  34. # happened, relative to the current time), message (a reference
  35. # to an array of lines for the commit message), and pages (a
  36. # reference to an array of links to the pages that were changed).
  37. }
  38. sub rcs_notify () {
  39. # This function is called when a change is committed to the wiki,
  40. # and ikiwiki is running as a post-commit hook from the RCS.
  41. # It should examine the repository to somehow determine what pages
  42. # changed, and then send emails to users subscribed to those pages.
  43. }
  44. sub rcs_getctime ($) {
  45. # Optional, used to get the page creation time from the RCS.
  46. error "getctime not implemented";
  47. }
  48. 1