summaryrefslogtreecommitdiff
path: root/IkiWiki/Rcs/Stub.pm
blob: ab80a9a474b211abd8202c4bbb53ec57b68bf90b (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_notify () {
  53. # This function is called when a change is committed to the wiki,
  54. # and ikiwiki is running as a post-commit hook from the RCS.
  55. # It should examine the repository to somehow determine what pages
  56. # changed, and then send emails to users subscribed to those pages.
  57. }
  58. sub rcs_getctime ($) {
  59. # Optional, used to get the page creation time from the RCS.
  60. error gettext("getctime not implemented");
  61. }
  62. 1