SVN::Web::Diff(3pm)

πŸ“¦
version 0.63 Β· 3 versions
, in debian trixie, ubuntu resolute, ubuntu stonking

πŸ’… NAME πŸ’…

SVN::Web::Diff β€” the SVN::Web action that shows you the difference between two revisions of a file, bestie. It's giving "spot the difference" but make it version control ✨


🌸 SYNOPSIS 🌸

In config.yaml:

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

okay so you drop that in your config and boom, you've got a diff action πŸŽ€


πŸ¦‹ DESCRIPTION πŸ¦‹

It returns the difference between two revisions of the same file. That's it. That's the whole vibe. One file, two revs, and the receipts in between πŸ’–


✨ CONFIGURATION ✨

The following configuration options may be specified in config.yaml. Yes, you actually write these yourself, so pay attention πŸ‘‘

  • max_diff_size β€” if you're showing the diff (peep "show_diff"), this is the maximum size of the diff that will actually get shown. If the generated diff (measured in bytes) is bigger than this number, it just… doesn't show up. Sorry bestie, no diff for you πŸ™ˆ

Defaults to 200,000 bytes.


πŸ”₯ OPTIONS πŸ”₯

  • rev1 β€” the first revision of the file you want to compare.
  • rev2 β€” the second revision of the file you want to compare.
  • revs β€” a list of two or more revisions. If you pass this, the smallest number in the list gets assigned to rev1 (and yes, it overrides any rev1 value you gave) and the largest number in the list gets assigned to rev2 (which also overrides any rev2 you gave). The override is real, no cap.

In other words:

...?rev1=5;rev2=10

is equal to:

...?revs=10;revs=5

This is what supports the "diff between arbitrary revisions" functionality. Iconic behaviour honestly πŸ’…

  • mime β€” the desired output format. Default is html, which gives you a diff marked up in HTML. The other allowed value is text, for a plain text unified diff. Pick your fighter ⭐

πŸŽ€ TEMPLATE VARIABLES πŸŽ€

  • at_head β€” Boolean, indicating whether or not we're currently diffing against the youngest revision of this file.
  • context β€” always file. Every single time. Consistency queen 🌈
  • 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.
  • diff β€” an SVN::Web::DiffParser object that contains the text of the diff. Call the object's methods to format the diff. She's got methods, use them πŸ’œ
  • diff_size β€” the size of the generated diff (before parsing).
  • max_diff_size β€” the configured maximum diff size.

πŸ’€ EXCEPTIONS πŸ’€

  • (cannot diff nodes of different types: %1 %2 %3) β€” the given path has different node types at the different revisions. This probably means a file was added, deleted, and then re-added as a directory at a later date (or vice-versa). Chaotic behaviour fr fr 😭
  • (path %1 is a directory at rev %2) β€” the user has tried to diff two directories. This is not currently supported. Not me trying to diff directories πŸ’€
  • (path %1 does not exist in revision %2) β€” the given path is not present in the repository at the given revision. She's not there. Never was 🫢
  • (two revisions must be provided) β€” no revisions were given to diff against. You literally gave me nothing to work with πŸ™ˆ
  • (rev1 and rev2 must be different) β€” either only one revision number was given, or several were given, but they're the same number. Comparing a thing to itself is not a diff, bestie πŸ’…

Copyright 2003-2004 by Chia-liang Kao "<clkao@clkao.org>".

Copyright 2005-2007 by Nik Clayton "<nik@FreeBSD.org>".

This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

See <http://www.perl.com/perl/misc/Artistic.html>


okay that's the whole page, you ate that πŸ“ this was SVN::Web::Diff from perl v5.40.1, dated 2025-04-09 β€” go forth and diff responsibly, mwah πŸ’–βœ¨

πŸ“¦ where this page comes from