mainSavannah Administration - Support: sr #108467, Please change GNU ELPA post...

 
 

sr #108467: Please change GNU ELPA post receive hook to new multimail email hook

Submitter:  Rüdiger Sonderfeld <ruediger>
Submitted:  Wed 08 Jan 2014 06:07:04 PM UTC
   
 
Category:  Source code repositories - developer access Priority:  5 - Normal
Severity:  1 - Wish Status:  Done
Privacy:  Public Assigned to:  rwp
Operating System:  None Open/Closed:  Closed
* Mandatory Fields

Add a New Comment Rich Markup
   

Jump to the original submission

Fri 31 Jan 2014 01:19:42 AM UTC, comment #13: 

You can also set multimailhook.emailPrefix if you want to override the default prefix added by git-multimail.

Bob Proulx <rwp>
Site Administrator
Fri 31 Jan 2014 01:07:25 AM UTC, comment #12: 

git_mutlimail.py seems to use the repo name as prefix if prefix is not set.  And the mailinglist manager then adds another prefix.

Adding

git_multimail.REF_CREATED_SUBJECT_TEMPLATE = (
    '%(refname_type)s %(short_refname)s created'
    ' (now %(newrev_short)s)'
    )
git_multimail.REF_UPDATED_SUBJECT_TEMPLATE = (
    '%(refname_type)s %(short_refname)s updated'
    ' (%(oldrev_short)s -> %(newrev_short)s)'
    )
git_multimail.REF_DELETED_SUBJECT_TEMPLATE = (
    '%(refname_type)s %(short_refname)s deleted'
    ' (was %(oldrev_short)s)'
    )

before the call to git_multimail.main(sys.argv[1:]) should fix this. (untested though)

Rüdiger Sonderfeld <ruediger>
Fri 31 Jan 2014 12:51:53 AM UTC, comment #11: 

The only thing left that seems a little spurious is that the mailing list adds a subject suffix and the notification adds a project suffix.  I think it would be quieter to reduce that to only one subject suffix not two.

And with that I think it is good to go.  I am closing the ticket.

I expect that all git notifications will use the process set up here.  Thanks to all for working together on this.

Bob Proulx <rwp>
Site Administrator
Wed 29 Jan 2014 12:48:22 AM UTC, comment #10: 

Nope.  You were right.  It did need to be in the hooks directory.  The cwd is definitely above it however.  I tested this by synthesizing a commit.  I think it should be good to go.

Bob Proulx <rwp>
Site Administrator
Wed 29 Jan 2014 12:19:30 AM UTC, comment #9: 

I think the hook script is called with a cwd of elpa.git and called like echo $oldrev $newrev $refname | ./hooks/post-receive and therefore the import needs to be relative to the elpa.git directory and not the hooks directory.

I could be wrong.  But I know that auctex.git is set up for the cwd above the hooks dir.  You can look there and see how it is configured for multiple hook scripts (I set that up not too long ago) and that the scripts are relative to the directory above hooks.

I will generate a synthetic test to verify.  (I admit I haven't tested this yet.)

Thanks for double checking these things!

Bob Proulx <rwp>
Site Administrator
Wed 29 Jan 2014 12:06:52 AM UTC, comment #8: 

Thanks.  But looking at http://git.savannah.gnu.org/r/emacs/elpa.git/ I think you put git_multimail.py in the wrong directory.  Shouldn't it be in http://git.savannah.gnu.org/r/emacs/elpa.git/hooks/ instead of elpa.git/?

Rüdiger Sonderfeld <ruediger>
Wed 29 Jan 2014 12:00:09 AM UTC, comment #7: 

I modified the post-receive hook as per this message:

http://lists.gnu.org/archive/html/emacs-devel/2014-01/msg01954.html

Bob Proulx <rwp>
Site Administrator
Tue 14 Jan 2014 09:29:56 PM UTC, comment #6: 

Looking at the result I think setting the from address is not as good as letting it default to the committer email as it had before.  I removed that setting.  The next commit will default to the submitter as it had before.

Initially I was thinking that setting it would allow the email through the mailing list through the whitelisted email without further approval.  But that really isn't much of a problem so shouldn't be solved.  And it hides the committer in the email summary of the commits.

Bob Proulx <rwp>
Site Administrator
Tue 14 Jan 2014 09:05:46 PM UTC, comment #5: 

I believe this should be working now.  I re-triggered this commit through the post-receive hook.  Please let me know about any details that should be changed.  There are several configuration options available for tweaking.

Also I set the from address to be the emacs-devel mailing list.  Please let me know if that should be a different mailing list.

Bob Proulx <rwp>
Site Administrator
Tue 14 Jan 2014 07:31:45 PM UTC, comment #4: 

Drat!  I will look at it.  (It was fine for me in a test on another system.)

Bob Proulx <rwp>
Site Administrator
Tue 14 Jan 2014 01:42:55 PM UTC, comment #3: 

Here's what I see when doing a push:

$ git push
Counting objects: 67, done.
Delta compression using up to 8 threads.
Compressing objects: 100% (53/53), done.
Writing objects: 100% (53/53), 8.80 KiB | 0 bytes/s, done.
Total 53 (delta 36), reused 0 (delta 0)
remote: /usr/bin/env: python2: No such file or directory
error: cannot run hooks/post-receive: No such file or directory
To git+ssh://git.sv.gnu.org/srv/git/emacs/elpa
   25219bd..e6d8543  master -> master

IOW, looks like there's a problem with PATH.

Dmitry Gutov <dgutov>
Mon 13 Jan 2014 12:22:00 PM UTC, comment #2: 

Thank you!  I guess just have to wait for a new commit to the elpa branch to check the format.

https://lists.gnu.org/archive/html/emacs-elpa-diffs/2014-01/threads.html

Rüdiger Sonderfeld <ruediger>
Sun 12 Jan 2014 05:43:36 AM UTC, comment #1: 

Done.  Sorry for the delay.  I needed to do some testing of the new hook script before I set it up live.  Let me know what you think of the new format.  I will leave the ticket open until then.

Bob Proulx <rwp>
Site Administrator
Wed 08 Jan 2014 06:07:04 PM UTC, original submission:  

Currently the GNU ELPA git repository uses git's old post-receive-email hook.  See http://git.savannah.gnu.org/r/emacs/elpa.git/hooks/post-receive.d/ and http://git.savannah.gnu.org/r/emacs/elpa.git/config.  Sadly this hook has a few short comings, as mentioned by Stefan Monnier on the emacs-devel mailinglist: https://lists.gnu.org/archive/html/emacs-devel/2014-01/msg00727.html

The new git-multimail hook seems to fix these problems.


Could you please switch the post-receive hook for GNU ELPA to git-multimail?

Rüdiger Sonderfeld <ruediger>

 

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

Attach Files:
   
   
Comment:
   

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 dgutov (Posted a comment)
  • -email is unavailable- added by rwp (Updated the item)
  • -email is unavailable- added by ruediger (Submitted the item)
  • -email is unavailable- added by ruediger
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only logged-in users can vote.

     

    Follow 7 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2014-01-31 rwp StatusIn Progress Done
        Open/ClosedOpen Closed
    2014-01-09 rwp StatusNone In Progress
        Assigned toNone rwp
    2014-01-08 ruediger Carbon-CopyRemoved ruediger -
    2014-01-08 ruediger Carbon-Copy- Added ruediger
        Carbon-Copy- Added -email is unavailable-

    Back to the top

    Powered by Savane 3.13-758e.
    Corresponding source code