summaryrefslogtreecommitdiff
path: root/IkiWiki/Rcs/Stub.pm
blob: e408d5ac3c975e0c8409af513f4cd5310bc6bbf4 (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 list of recent changes.
  29. # The data structure returned for each change is:
  30. # {
  31. # user => # name of user who made the change,
  32. # committype => # either "web" or the name of the rcs,
  33. # when => # time when the change was made,
  34. # message => [
  35. # { line => "commit message line" },
  36. # { line => "commit message line" },
  37. # # etc,
  38. # ],
  39. # pages => [
  40. # {
  41. # page => # name of page changed,
  42. # diffurl => # optional url to a diff showing
  43. # # the changes,
  44. # },
  45. # # repeat for each page changed in this commit,
  46. # ],
  47. # }
  48. }
  49. sub rcs_notify () {
  50. # This function is called when a change is committed to the wiki,
  51. # and ikiwiki is running as a post-commit hook from the RCS.
  52. # It should examine the repository to somehow determine what pages
  53. # changed, and then send emails to users subscribed to those pages.
  54. }
  55. sub rcs_getctime ($) {
  56. # Optional, used to get the page creation time from the RCS.
  57. error "getctime not implemented";
  58. }
  59. 1