summaryrefslogtreecommitdiff
path: root/IkiWiki/Rcs/Stub.pm
blob: 19ecfa88df571bd2ca4553c4c9bbc0690ba12188 (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. # user => # name of user who made the change,
  34. # committype => # either "web" or the name of the rcs,
  35. # when => # time when the change was made,
  36. # message => [
  37. # { line => "commit message line" },
  38. # { line => "commit message line" },
  39. # # etc,
  40. # ],
  41. # pages => [
  42. # {
  43. # page => # name of page changed,
  44. # diffurl => # optional url to a diff showing
  45. # # the changes,
  46. # },
  47. # # repeat for each page changed in this commit,
  48. # ],
  49. # }
  50. }
  51. sub rcs_notify () {
  52. # This function is called when a change is committed to the wiki,
  53. # and ikiwiki is running as a post-commit hook from the RCS.
  54. # It should examine the repository to somehow determine what pages
  55. # changed, and then send emails to users subscribed to those pages.
  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