summaryrefslogtreecommitdiff
path: root/IkiWiki/Rcs/Stub.pm
blob: 375591c96ce6883a7e4eeadf3862fce768191580 (plain)
  1. #!/usr/bin/perl
  2. # Stubs for no revision control.
  3. package IkiWiki;
  4. use warnings;
  5. use strict;
  6. use 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_remove ($) {
  30. # Remove a file. The filename is relative to the root of the srcdir.
  31. # Note that this should not check the removal in, it should only
  32. # prepare for it to be checked in when rcs_commit is called.
  33. }
  34. sub rcs_recentchanges ($) {
  35. # Examine the RCS history and generate a list of recent changes.
  36. # The data structure returned for each change is:
  37. # {
  38. # rev => # the RCSs id for this commit
  39. # user => # name of user who made the change,
  40. # committype => # either "web" or the name of the rcs,
  41. # when => # time when the change was made,
  42. # message => [
  43. # { line => "commit message line" },
  44. # { line => "commit message line" },
  45. # # etc,
  46. # ],
  47. # pages => [
  48. # {
  49. # page => # name of page changed,
  50. # diffurl => # optional url to a diff showing
  51. # # the changes,
  52. # },
  53. # # repeat for each page changed in this commit,
  54. # ],
  55. # }
  56. }
  57. sub rcs_diff ($) {
  58. # Optional, used to get diffs for recentchanges.
  59. # The parameter is the rev from rcs_recentchanges.
  60. # Should return a list of lines of the diff (including \n) in list
  61. # context, and the whole diff in scalar context.
  62. }
  63. sub rcs_getctime ($) {
  64. # Optional, used to get the page creation time from the RCS.
  65. error gettext("getctime not implemented");
  66. }
  67. 1