Projects
New Ticket     Wiki     Browse Source     Timeline     Roadmap     Bug Reports     Search

Ticket #12593 (closed enhancement: fixed)

Opened 15 months ago

Last modified 7 months ago

svn post-revprop-change hook

Reported by: jmpp@… Owned by: wsiegrist@…
Priority: Normal Milestone:
Component: server/hosting Version:
Keywords: post-revprop, commit hook Cc: macports-mgr@…, ryandesign@…
Port:

Description

From time to time we see ourselves in the need of editing svn revprops like svn:log to amend mistakes. It would be great to have a post-revprop-change hook to perform a number of actions once these are committed to the repo, like mailing the macports-changes mailing list with the edit and updating the trac db to reflect the new property, just like the current post-commit hook does.

I'll see about writing the hook myself and attaching it here to this ticket, so that the only thing necessary to make it work is installing it on svn.macports.org

-jmpp

Change History

Changed 15 months ago by jmpp@…

  • keywords post-revprop, commit hook added

Changed 15 months ago by ryandesign@…

  • cc ryandesign@… added

We currently use SVN::Notify to send out commit mails, but I'm not sure SVN::Notify provides a way to send revprop-change mails. Many other Subversion mailing packages do.

Changed 15 months ago by jmpp@…

Subversion installs some template hooks by default at repo-creation time, one of them being post-revprop-change.tmpl, which I'm thinking we could adapt to meet the functionality we seek. I haven't been able to look into it in any detail yet, though, so if you have any other suggestions please do list them here.

-jmpp

Changed 15 months ago by ryandesign@…

The post-revprop-change.tmpl only shows you how you can run a script:

propchange-email.pl "$REPOS" "$REV" "$USER" "$PROPNAME" watchers@example.org

The postchange-email.pl script referenced by this example used to be part of Subversion, but for 1.4.0 the functionality was absorbed by commit-email.pl. I will inform the Subversion folks that they need to fix their post-revprop-change.tmpl to mention commit-email.pl instead of postchange-email.pl.

My point was that we probably want the post-revprop-change email to be formatted similarly to the post-commit email, which means they should probably be sent by the same tool. But as far as I can tell, SVN::Notify, the tool we currently use to send out post-commit mails, does not offer a mode by which it could send out post-revprop-change mails. We may wish to contact the author of SVN::Notify and ask if there is a hidden option to do this or if this feature is being developed and will be released soon, or we may wish to switch to other Subversion email notification scripts which are already known to support both modes, such as commit-email.pl.

Changed 15 months ago by ryandesign@…

The Subversion team has fixed the post-revprop-change.tmpl for Subversion 1.5. This changeset shows how we could use commit-email.pl to send a post-revprop-change email. Alternately, I understand that mailer.py is another popular mailer script.

Changed 12 months ago by wsiegrist@…

  • status changed from new to closed
  • resolution set to fixed

Fixed with commit-email.pl. Same email settings as the post-commit and svnnotify.

Changed 11 months ago by jmpp@…

  • status changed from closed to reopened
  • version 1.5.0 deleted
  • resolution fixed deleted

I'm reopening this ticket to track its current status, as it still needs some implementation improvements:

  • The "Author" field of the mail body should hold the original author of the revision that's having its revprops edited, not the author editing the revprop itself, as it actually stands now;
  • The "New Property Value" field holds the new revprop that was entered (as expected), so it would be great if an "Old Property Value" field right above the former could hold the original revprop that was edited, in order to properly compare old and new values.

Thanks!

-jmpp

Changed 9 months ago by wsiegrist@…

  • owner changed from kvv@… to wsiegrist@…
  • status changed from reopened to new

Changed 9 months ago by wsiegrist@…

  • status changed from new to assigned

Changed 7 months ago by wsiegrist@…

The revprop change emails now contain a unified diff instead of the "new value".

I disagree on your Author point. I realize that the email gets addressed from the person making the changes, but wont it be confusing to see the email stating the original author along side changes they didnt actually make?

Changed 7 months ago by wsiegrist@…

  • status changed from assigned to closed
  • resolution set to fixed

I added a (original author: foo@macports) to the Author line of the email. I believe this satisfies the ticket, so I'm going to close it.

Note: See TracTickets for help on using tickets.