Issue 1132: Gerrit won't send mail to reviewer using "git push --receive-pack..."
Status:  Submitted
Owner: ----
Closed:  Mar 2013
Reported by ethanzha...@gmail.com, Sep 15, 2011
Affected Version:
2.2.1
What steps will reproduce the problem?

1. git push --receive-pack='git receive-pack --reviewer=xxx@yeah.net' origin HEAD:refs/for/master

What is the expected output? What do you see instead?
-- reviwer should receive a mail notification

Please provide any additional information below.
-- Gerrit WebUI works well, I add a reviewer on Web UI, reviwer xxx@yeah.net can receive mail successfully.
-- The sshd_log tells me like that:

[2011-09-15 15:05:45,584 +0800] d6c5aa12 ethan a/2 LOGIN FROM 192.168.1.24
[2011-09-15 15:05:46,344 +0800] d6c5aa12 ethan a/2 'git receive-pack --reviewer=xxx@yeah.net '\''/test.git'\''' 9ms 747ms 0
[2011-09-15 15:05:46,382 +0800] d6c5aa12 ethan a/2 LOGOUT
-- It seems that the git receive-pack don't send mail because the mail log show nothing about it.
Nov 3, 2011
#1 dab...@gmail.com
This also seems to affect version 2.1.7.
May 25, 2012
#2 julien.p...@aptarism.com
Same problem with version 2.4
Aug 23, 2012
#4 zu.bruce.china@gmail.com
test on (2.4.2-650-gfe68e86) 

$ git push --receive-pack='git receive-pack --reviewer <email address>' origin  HEAD:refs/changes/13
Total 0 (delta 0), reused 0 (delta 0)
remote: Processing changes: updated: 1, refs: 1, done    
remote: (W) 73e0646: no files changed, message updated
To ssh://bruce.zu@localhost:29418/iceage/iceage4
 * [new branch]      HEAD -> refs/changes/13
$

result: 
 Chenk Gerrit WebUI:   reviewer is not there
 Check mail box:       no email.

Sep 4, 2012
#5 iwhi...@gmail.com
I find out this patch from google gerrit git log and patch this onto my gerrit source code.

        Fixed cleanup of propagated SshScopes
    
        The RequestScopePropagator handles RequestCleanup independently of
        the original context. However, SshScope.Context.subContext() was
        chaining the cleanup in the parent. This would cause an exception
        if the parent scope happened to finish before the sub-context. Since
        cleanup is already handled correctly by the RequestScopePropagator,
        don't register the continued contect with the original context cleanup.
    
        Change-Id: Ie508d1921050887b95dd18bc5806c17e4894391f
        REF: https://groups.google.com/forum/?fromgroups=#!topic/repo-discuss/3RV-vFW5Yu8

then I try this command "repo upload . --reviewer=xxx@xxx.xxx"

and found a notification mail at xxx@xxx.xxx mailbox
Mar 28, 2013
#6 sop@google.com
(No comment was entered for this change.)
Status: Submitted
Labels: FixedIn-2.6