[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: [PATCH] Limit size of emails sent using commit-email.pl

From: <kfogel_at_collab.net>
Date: 2005-01-20 17:08:18 CET

"C. Michael Pilato" <cmpilato@collab.net> writes:
> That's purty simple.
>
> http://.../ROOT_NAME/?view=rev&rev=REV
>
> where ROOT_NAME is the name given that repository in viewcvs.conf (or
> the physical basename of the repository directory if using a
> SVNParentPath-like setup), and REV is the revision number.

Ah, thanks. Works for me:

   http://svn.collab.net/viewcvs/svn/?view=rev&rev=12798

> That said, I still oppose going the route of integrations between
> Subversion's scripts and third-party tools until we as a community do
> the due diligence to make sure that every new integration doesn't
> require yet another custom tweak.

Okay, does the below count as due diligence?

This proposal would be sufficient given *any* system that can display
changes in response to a request in a certain format, such as a URL:

   1. Have a diff-size limit (or body-size limit) on post-commit
      emails. Some reasonable default would be built-in, but it could
      be overridden from the command line, e.g.,

      $ commit-email.pl --diff-limit=256k

   2. Take a new parameter with value, --diff-alternative. If the
      diff limit is exceeded, *none* of the diff is included inline,
      and the value of the --diff-alternative is used instead, e.g.:

      $ commit-email.pl --diff-limit=256k \
                        --diff-alternative='http://.../?view=rev&rev=12798'

Where did that URL with its revision number come from? Simple: it's
the responsibility of the caller to construct the entire URL,
including the revnum and whatever other information is needed. That
is, no tool-specific knowledge would be encoded into commit-email.pl.
There's not even any requirement that the diff alternative be a URL
(though surely it would be in 99% of cases).

If the diff limit were exceeded, the text given in the commit email
would be something like this:

   http://svn.collab.net/viewcvs/svn/?view=rev&rev=12798

   (Diff too large to include in this mail. Please see above.)

And if the diff limit were not exceeded, we would *still* include the
diff-alternative, because it might be handy for people to pass around:

   http://svn.collab.net/viewcvs/svn/?view=rev&rev=12798

   Index: doc/translations/spanish/book/ch08.xml
   ===================================================================
   --- doc/translations/spanish/book/ch08.xml (revision 12797)
   +++ doc/translations/spanish/book/ch08.xml (revision 12798)
   @@ -875,34 +875,38 @@
   [...]

The only logic encoded into commit-email.pl would be the discovery of
the size of the diff, and the consequent decision of which of the
above two forms to use.

Thoughts?

-Karl

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Thu Jan 20 17:17:44 2005

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.