SVN::Web::Diff(3p)

NAME
SVN::Web::Diff - SVN::Web action to show differences between file revisions

SYNOPSIS
In config.yaml

  actions:
    ...
    diff:
      class: SVN::Web::Diff
    ...

DESCRIPTION
Returns the difference between two revisions of the same file.

OPTIONS

rev1
    The first revision of the file to compare.

rev2
    The second revision of the file to compare.

revs
    A list of two or more revisions. If present, the smallest number in the list is assigned to "rev1" (overriding any given "rev1" value) and the largest number in the list is assigned to "rev2" (overriding any given "rev2" value).

    In other words:

        ...?rev1=5;rev2=10

    is equal to:

        ...?revs=10;revs=5

    This supports the "diff between arbitrary revisions" functionality.

mime
    The desired output format. The default is "html" for an HTML, styled diff using Text::Diff::HTML. The other allowed value is "text", for a plain text unified diff.

context
    The number of lines of context to show around each change. Uses the global default if not set.

TEMPLATE VARIABLES

rev1
    The first revision of the file to compare. Corresponds with the "rev1" parameter, either set explicitly, or extracted from "revs".

rev2
    The second revision of the file to compare. Corresponds with the "rev2" parameter, either set explicitly, or extracted from "revs".

In addition, if "mime" is "html" then raw HTML is returned for immediate insertion in to the template. If "mime" is "text" then the template is bypassed and plain text is returned.

EXCEPTIONS

(path %1 does not exist in revision %2)
    The given path is not present in the repository at the given revision.

(directory diff requires svk)
    Showing the difference between two directories needs the SVN::DiffEditor module.

(two revisions must be provided)
    No revisions were given to diff against.

(rev1 and rev2 must be different)
    Either only one revision number was given, or several were given, but they're the same number.