You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Kevin Pilch-Bisson <ke...@pilch-bisson.net> on 2003/11/16 00:03:26 UTC

URL's in commit mails?

I was thinking today when I saw a commit to the sounds mailbox, that it
might be nice to be able to specify a URL for the repository in
mailer.py, so that users can browse to (at least) the root of the
repository easily.

What do others think?



--
Kevin Pilch-Bisson - kevin@pilch-bisson.net
http://www.pilch-bisson.net



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: URL's in commit mails?

Posted by "C. Michael Pilato" <cm...@collab.net>.
Julian Foad <ju...@btopenworld.com> writes:

> > If we're really going to go this route, then folks, it's time to break
> > out the MIME dual HTML/plaintext mail generation code.
> 
> Yes, but that's probably too complex for a quick fix.  I think all
> the original poster wanted was some quick way of getting from the
> commit mail to the repository, so I preferred my second idea of a
> link to a ViewCVS server for it ... but that probably doesn't exist
> in the required form, so ...

So, I'm willing to entertain (though, not code, at least not right
now) two new configuration options for mailer.py:

  repos_url = [Canonical URL of repository]
  viewcvs_url = [Canonical URL of ViewCVS view of repository]

For each of these, if it is present in a config block, the end of the
mail will have links to that URL.  Though, for the ViewCVS one, the
link will actually be:

  http://server/path/to/viewcvs/repos?view=rev&rev=REV

This will display ViewCVS's new "revision view", from which folks can
see colored diffs and such, very much like the output from mailer.py
itself.  See http://svn.collab.net/viewcvs-dev/svn/?view=rev for an
example.


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: URL's in commit mails?

Posted by Julian Foad <ju...@btopenworld.com>.
C. Michael Pilato wrote:
> Julian Foad <ju...@btopenworld.com> writes:
> 
>>>If we're really going to go this route, then folks, it's time to break
>>>out the MIME dual HTML/plaintext mail generation code.
>>
>>Yes, but that's probably too complex for a quick fix.  I think all
>>the original poster wanted was some quick way of getting from the
>>commit mail to the repository, so I preferred my second idea of a
>>link to a ViewCVS server for it ... but that probably doesn't exist
>>in the required form, so ...
> 
> The original poster is Kevin Pilch-Bisson, a more-than-competent
> programmer who, if he really needed this info, could hack it into
> mailer.py in 15 minutes flat, I'm betting. :-)

:-)  When I said "that probably doesn't exist in the required form" I meant that a ViewCVS server probably doesn't exist (I couldn't find reference on Subversion's web site to one that views the Subversion repository) in a form that can display a Subversion-style commit as an entity containing log message and a list of changed files.

But eleven minutes later, C. Michael Pilato wrote:
> 
>   http://server/path/to/viewcvs/repos?view=rev&rev=REV
> 
> This will display ViewCVS's new "revision view", from which folks can
> see colored diffs and such, very much like the output from mailer.py
> itself.  See http://svn.collab.net/viewcvs-dev/svn/?view=rev for an
> example.

Cool!  I assumed that ViewCVS hadn't got this ability yet.

- Julian


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: URL's in commit mails?

Posted by "C. Michael Pilato" <cm...@collab.net>.
Julian Foad <ju...@btopenworld.com> writes:

> > If we're really going to go this route, then folks, it's time to break
> > out the MIME dual HTML/plaintext mail generation code.
> 
> Yes, but that's probably too complex for a quick fix.  I think all
> the original poster wanted was some quick way of getting from the
> commit mail to the repository, so I preferred my second idea of a
> link to a ViewCVS server for it ... but that probably doesn't exist
> in the required form, so ...

The original poster is Kevin Pilch-Bisson, a more-than-competent
programmer who, if he really needed this info, could hack it into
mailer.py in 15 minutes flat, I'm betting. :-)

Also, most decent mailing list software lets you custimize the header
and footers of outbound mails -- that's a prime place to put the
canonical repository URL for the repository in question (though, yes,
I know, not everyone is going to be using a mailing list per repos, or
even a mailing list at all).

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

RE: URL's in commit mails?

Posted by Kevin Pilch-Bisson <ke...@pilch-bisson.net>.
This is actually pretty much exactly what I was thinking of.

--
~~~~~~~~~~~~~~~~~~~~
 Kevin Pilch-Bisson
~~~~~~~~~~~~~~~~~~~~

> -----Original Message-----
> From: Julian Foad [mailto:julianfoad@btopenworld.com]
> Sent: Monday, November 17, 2003 11:19 AM
> To: C. Michael Pilato
> Cc: Kevin Pilch-Bisson; kfogel@collab.net; dev@subversion.tigris.org
> Subject: Re: URL's in commit mails?
> 
> C. Michael Pilato wrote:
> > Julian Foad <ju...@btopenworld.com> writes:
> >
> >>C. Michael Pilato wrote:
> >>
> >>>There is no information that I aware of which could be used by the
> >>>mailer to determine the right schema.  Further, only the http://
and
> >>>https:// URLs are "browsable" -- you can't fire up Mozilla and
expect
> >>>to see the right stuff at file:// or svn:// URLs.
> >>>So, mailer.py would be limited probably to either display some URL
as
> >>>defined statically in mailer.conf (which is keyed on the basename
of
> >>>the repository, I think), or displaying nothing at all.
> >>
> >>Sure - it can't work automatically for every situation.  Perhaps we
just
> want (first) something that works for svn@subversion.tigris.org.
> >>
> >>For each of the paths listed at the top of the mail as "Added" or
> "Modified" it could prepend a statically-configured prefix: default
"",
> but for us "http://svn.collab.net/repos/svn/".  This would give:
> >>
> >>Modified:
> >>
http://svn.collab.net/repos/svn/trunk/subversion/include/svn_error.h
> >>
http://svn.collab.net/repos/svn/trunk/subversion/svnversion/main.c
> >
> > Please, no.  Two reasons:
> >
> >   1.  You're dangerously close to exceeding 80 characters, and those
> >       paths aren't *nearly* the deepest in our tree.
> >   2.  You just prepended half a line of info that is redundant
across
> >       the set of all such lines.
> 
> I agree.
> 
> > If we're really going to go this route, then folks, it's time to
break
> > out the MIME dual HTML/plaintext mail generation code.
> 
> Yes, but that's probably too complex for a quick fix.  I think all the
> original poster wanted was some quick way of getting from the commit
mail
> to the repository, so I preferred my second idea of a link to a
ViewCVS
> server for it ... but that probably doesn't exist in the required
form, so
> ...
> 
> ... just put a single additional URL at the top, formed from
> "http://svn.collab.net/repos/svn/" plus the common parent path that is
> already generated for use in the Subject line.
> 
> Or whatever.
> 
> - Julian
> 
> 



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: URL's in commit mails?

Posted by Julian Foad <ju...@btopenworld.com>.
C. Michael Pilato wrote:
> Julian Foad <ju...@btopenworld.com> writes:
> 
>>C. Michael Pilato wrote:
>>
>>>There is no information that I aware of which could be used by the
>>>mailer to determine the right schema.  Further, only the http:// and
>>>https:// URLs are "browsable" -- you can't fire up Mozilla and expect
>>>to see the right stuff at file:// or svn:// URLs.
>>>So, mailer.py would be limited probably to either display some URL as
>>>defined statically in mailer.conf (which is keyed on the basename of
>>>the repository, I think), or displaying nothing at all.
>>
>>Sure - it can't work automatically for every situation.  Perhaps we just want (first) something that works for svn@subversion.tigris.org.
>>
>>For each of the paths listed at the top of the mail as "Added" or "Modified" it could prepend a statically-configured prefix: default "", but for us "http://svn.collab.net/repos/svn/".  This would give:
>>
>>Modified:
>>   http://svn.collab.net/repos/svn/trunk/subversion/include/svn_error.h
>>   http://svn.collab.net/repos/svn/trunk/subversion/svnversion/main.c
> 
> Please, no.  Two reasons:
> 
>   1.  You're dangerously close to exceeding 80 characters, and those
>       paths aren't *nearly* the deepest in our tree.
>   2.  You just prepended half a line of info that is redundant across
>       the set of all such lines.

I agree.

> If we're really going to go this route, then folks, it's time to break
> out the MIME dual HTML/plaintext mail generation code.

Yes, but that's probably too complex for a quick fix.  I think all the original poster wanted was some quick way of getting from the commit mail to the repository, so I preferred my second idea of a link to a ViewCVS server for it ... but that probably doesn't exist in the required form, so ...

... just put a single additional URL at the top, formed from "http://svn.collab.net/repos/svn/" plus the common parent path that is already generated for use in the Subject line.

Or whatever.

- Julian


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: URL's in commit mails?

Posted by "C. Michael Pilato" <cm...@collab.net>.
Julian Foad <ju...@btopenworld.com> writes:

> C. Michael Pilato wrote:
> > "Kevin Pilch-Bisson" <ke...@pilch-bisson.net> writes:
> >
> >>Sorry, I forgot to mention that this would be something that would have
> >>to be configured, probably keyed off the ${REPOS} which is already
> >>passed to the post-commit script.
> > There is no information that I aware of which could be used by the
> > mailer to determine the right schema.  Further, only the http:// and
> > https:// URLs are "browsable" -- you can't fire up Mozilla and expect
> > to see the right stuff at file:// or svn:// URLs.
> > So, mailer.py would be limited probably to either display some URL as
> > defined statically in mailer.conf (which is keyed on the basename of
> > the repository, I think), or displaying nothing at all.
> 
> Sure - it can't work automatically for every situation.  Perhaps we just want (first) something that works for svn@subversion.tigris.org.
> 
> For each of the paths listed at the top of the mail as "Added" or "Modified" it could prepend a statically-configured prefix: default "", but for us "http://svn.collab.net/repos/svn/".  This would give:
> 
> Modified:
>    http://svn.collab.net/repos/svn/trunk/subversion/include/svn_error.h
>    http://svn.collab.net/repos/svn/trunk/subversion/svnversion/main.c

Please, no.  Two reasons:

  1.  You're dangerously close to exceeding 80 characters, and those
      paths aren't *nearly* the deepest in our tree.
  2.  You just prepended half a line of info that is redundant across
      the set of all such lines.

If we're really going to go this route, then folks, it's time to break
out the MIME dual HTML/plaintext mail generation code.  You can make
short paths be links to long URLs, etc.  Pretty graphics.  I'm talking
Java FS history node graphs.  Flash animations, blinking text, CSS,
DHTML, and ROTFL ...

If you don't stop me, I'll be forced to stop myself.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: URL's in commit mails?

Posted by Julian Foad <ju...@btopenworld.com>.
C. Michael Pilato wrote:
> "Kevin Pilch-Bisson" <ke...@pilch-bisson.net> writes:
> 
>>Sorry, I forgot to mention that this would be something that would have
>>to be configured, probably keyed off the ${REPOS} which is already
>>passed to the post-commit script.
> 
> There is no information that I aware of which could be used by the
> mailer to determine the right schema.  Further, only the http:// and
> https:// URLs are "browsable" -- you can't fire up Mozilla and expect
> to see the right stuff at file:// or svn:// URLs.
> 
> So, mailer.py would be limited probably to either display some URL as
> defined statically in mailer.conf (which is keyed on the basename of
> the repository, I think), or displaying nothing at all.

Sure - it can't work automatically for every situation.  Perhaps we just want (first) something that works for svn@subversion.tigris.org.

For each of the paths listed at the top of the mail as "Added" or "Modified" it could prepend a statically-configured prefix: default "", but for us "http://svn.collab.net/repos/svn/".  This would give:

Modified:
   http://svn.collab.net/repos/svn/trunk/subversion/include/svn_error.h
   http://svn.collab.net/repos/svn/trunk/subversion/svnversion/main.c

instead of

Modified:
   trunk/subversion/include/svn_error.h
   trunk/subversion/svnversion/main.c

Hmmm... not so easy to read, but nice for single-click browsing to take a quick look at the file.

Better, if there is a ViewCVS server available, and if it has a "commit summary" for each commit, just give the single link to that.

- Julian


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: URL's in commit mails?

Posted by "C. Michael Pilato" <cm...@collab.net>.
"Kevin Pilch-Bisson" <ke...@pilch-bisson.net> writes:

> Sorry, I forgot to mention that this would be something that would have
> to be configured, probably keyed off the ${REPOS} which is already
> passed to the post-commit script.

There is no information that I aware of which could be used by the
mailer to determine the right schema.  Further, only the http:// and
https:// URLs are "browsable" -- you can't fire up Mozilla and expect
to see the right stuff at file:// or svn:// URLs.

So, mailer.py would be limited probably to either display some URL as
defined statically in mailer.conf (which is keyed on the basename of
the repository, I think), or displaying nothing at all.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

RE: URL's in commit mails?

Posted by Kevin Pilch-Bisson <ke...@pilch-bisson.net>.
Sorry, I forgot to mention that this would be something that would have
to be configured, probably keyed off the ${REPOS} which is already
passed to the post-commit script.

--
~~~~~~~~~~~~~~~~~~~~
 Kevin Pilch-Bisson
~~~~~~~~~~~~~~~~~~~~

> -----Original Message-----
> From: kfogel@newton.ch.collab.net [mailto:kfogel@newton.ch.collab.net]
On
> Behalf Of kfogel@collab.net
> Sent: Sunday, November 16, 2003 8:42 PM
> To: Kevin Pilch-Bisson
> Cc: dev@subversion.tigris.org
> Subject: Re: URL's in commit mails?
> 
> "Kevin Pilch-Bisson" <ke...@pilch-bisson.net> writes:
> > I was thinking today when I saw a commit to the sounds mailbox, that
it
> > might be nice to be able to specify a URL for the repository in
> > mailer.py, so that users can browse to (at least) the root of the
> > repository easily.
> >
> > What do others think?
> 
> How would you implement that?  (How would post-commit know, for
> example, what schema or hostname to put in the URL?  Or is this
> something the admin would have to configurate?)
> 
> 



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: URL's in commit mails?

Posted by kf...@collab.net.
"Kevin Pilch-Bisson" <ke...@pilch-bisson.net> writes:
> I was thinking today when I saw a commit to the sounds mailbox, that it
> might be nice to be able to specify a URL for the repository in
> mailer.py, so that users can browse to (at least) the root of the
> repository easily.
> 
> What do others think?

How would you implement that?  (How would post-commit know, for
example, what schema or hostname to put in the URL?  Or is this
something the admin would have to configurate?)


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org