helpSavannah Administration - Support: sr #108411, Enable commit mails including...


sr #108411: Enable commit mails including diffs for GNU AUCTeX

Submitted by:  Tassilo Horn <tsdh>
Submitted on:  Tue 08 Oct 2013 12:42:37 PM UTC  
Category:  Source code repositories - developer access Priority:  5 - Normal
Severity:  3 - Normal Status:  Done
Assigned to:  Bob Proulx <rwp> Operating System:  None
Open/Closed:  Closed

Add a New Comment (Rich Markup)

You are not logged in

Please log in, so followups can be emailed to you.


( Jump to the original submission)

Mon 14 Oct 2013 07:25:28 PM UTC, comment #6: 

Good deal!  Thanks for the feedback.  Closing out the ticket as done.

Bob Proulx <rwp>
Site AdministratorIn charge of this item.
Mon 14 Oct 2013 09:56:47 AM UTC, comment #5: 

Hi Bob.  I've just committed and pushed some changes, and I can confirm that the setup now works as requested.  Thanks a lot!

Feel free to close the request.

Tassilo Horn <tsdh>
Fri 11 Oct 2013 04:44:30 AM UTC, comment #4: 

Done.  Tested on a vicitim repository.  Transfered to auctex.  I think it all should be working.  I will monitor the -commit and -diffs lists and check to verify that they are working.

For reference I basically did this to get multiple hook scripts.

while read oldrev newrev refname; do
  echo $oldrev $newrev $refname | /usr/local/bin/git-post-receive-hook
  echo $oldrev $newrev $refname | hooks/post-receive-mail-local

Bob Proulx <rwp>
Site AdministratorIn charge of this item.
Fri 11 Oct 2013 01:48:15 AM UTC, comment #3: 

Okay.  Let me tinker something together for you.

In CVS this is fully supported natively.  In git this isn't as nice since git supports only one hook out of the box.  (Did I actually say that git wasn't as nice as cvs?  No one is more shocked than myself!)  The git hook has stdin piped into it and the script interprets it.  Therefore to run multiple hooks you need to save off stdin into a temporary file and then hand it to each hook script in turn.  Or the equivalent.  And to try to keep from breaking things I will need to test in a victim location.  So please give me just a little bit of tinker time to get it all tested and implemented.  Again this would be useful for other projects too.

I looks to me like someone already tried to set up multiple hook scripts for the auctex project.  The existing hook script was calling run-parts on a .d subdirectory.  It worked because there was only one script in the .d directory.  But it would not have worked if there were two.  Or rather the second one would not have gotten any of the normal expected input.  Pretty sure anyway. :-)

Bob Proulx <rwp>
Site AdministratorIn charge of this item.
Thu 10 Oct 2013 08:28:20 AM UTC, comment #2: 

Hi Bob,

indeed we want the want the latter solution, that is, short commit mails to auctex-commit and full diffs to auctex-diffs, so two post-receive-email hook scripts are needed with different values of hooks.mailinglist and hooks.showrev as you've said.

That's how it has been since forever, and we have user requests that want to keep that split.  (It seems that auctex-commit is mostly tracked by users just interested in new features/fixes while auctex-diffs is mostly tracked by packagers.)

Tassilo Horn <tsdh>
Wed 09 Oct 2013 11:42:55 PM UTC, comment #1: 

Hmm...  Doing both of those things seems not completely trivial.  Let me explain.

Currently git projects all have a common hook script that reads the git config file for the hooks.mailinglist value.  For auctex that value was  So the git commits have been going to that list.

I can trivially change the list name to auctex-diffs.  Then all of the commit notifications would go there.  They would not go to auctex-commit anymore.  Done.

I can trivially make the hooks.showrev change and then the custom showrev would be in effect.  Done.

I have done the above.  This might be enough for you.  Let me know.

I can trivially add another email address to hooks.mailinglist and then the email would go both places.  I did not do this.  I am simply mentioning the capability.

In order to have both the current short commit notifications going to the auctex-commit list and the full diffs going to the auctex-diffs list we will need to split or duplicate the post-receive-email hook script so that it runs twice.  Each run would have different values of hooks.showrev.  I would leave one standard and then simply hack the other for the local showrev value.

I will stop here and wait for your feedback.  Let me know if the above is sufficient.  I can pretty easily clone the hook script and make a local copy that continues to send the current notifications to the auctex-commit list.  If that is still desired.

Bob Proulx <rwp>
Site AdministratorIn charge of this item.
Tue 08 Oct 2013 12:42:37 PM UTC, original submission:  

This is a follow up to

One thing we had forgotten is that we'd like to have commit mails containing full diffs to the -email is unavailable- mailinglists in addition to the short commit messages that are sent to

Basically, you can just copy the hook-script that does the short commit messages right now and change these values:

  hooks.mailinglist = ""
  hooks.showrev = "git show -C %s; echo"

Tassilo Horn <tsdh>


(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:

No files currently attached


Depends on the following items: None found

Items that depend on this one: None found


Carbon-Copy List
  • -email is unavailable- added by rwp (Posted a comment)
  • -email is unavailable- added by tsdh (Submitted the item)
  • -email is unavailable- added by tsdh

    Do you think this task is very important?
    If so, you can add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.




    Follow 5 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2013-10-14 rwp Open/ClosedOpen => Closed
    2013-10-11 rwp StatusIn Progress => Done
    2013-10-09 rwp StatusNone => In Progress
        Assigned toNone => rwp
    2013-10-08 tsdh Carbon-Copy- => Added

    Back to the top

    Powered by Savane 3.5