With the logfile.txt attached!
-----Message d'origine-----
De : Gaël de MONNERON [mailto:[EMAIL PROTECTED]
Envoyé : vendredi 8 décembre 2006 11:41
À : 'Kristis Makris'
Cc : '[email protected]'
Objet : when you change a variable in 'Reply-To', the 'From' table is also
modified.
Hi all,
Let's present my analysis more clearly:
(cf http://bugzilla.mkgnu.net/show_bug.cgi?id=890)
In original release of ScmBug 0-18-3, in Integration.pm and at the end of
the get_mailing_list() function, the sender is added by initialized the
{ values }->{ From } variable.
Next, If the email should also appear to have been sent from the SCM user,
the user is added at a higher priority in the 'From' hash.
At least, The 'Reply-To' variable is initialized by $mailing_list->{ >From }
And that's the point that makes me confused!
Indeed, by logging this variable, I noticed:
'From' => $VAR1->{'Reply-To'}
(Have a look on the attached logfile.txt)
First thing, you wrote in source code:
if ( $request->{ policies }->{ mail_also_appears_from_scm_user } == ...
instead of :
if ( $request->{ policies }->{mail_on_success}->
{ mail_also_appears_from_scm_user } == ...
Then, in step 2, the problem I noticed at the beginning of my purpose:
'From' => $VAR1->{'Reply-To'}
Last in step 3,
if ( $request->{ policies }->{mail_on_success}->{
mail_also_appears_from_scm_user } == 0) {
$mailing_list->{ 'Reply-To' }->{ $scm_user_email } = 0;
}
This instruction changes the 'Reply-To' variable but also the 'From' one.
Because 'From' variable points on 'Reply-To' variable.
Do you agree with my analysis?
So, is it normal or not?
In my previous patch, I wanted to clearly separate the 'Reply-To' and 'From'
variable initialization.
Have a good week end
Gaël
# In glue.conf :
# From => 'Svn admin <[EMAIL PROTECTED]>',
# Source code executed :
# # If the email should also appear to have been sent from the SCM
# # user, add that user first in the From list. He is added at a
# # higher priority (value 0)
# if ( $request->{ policies }->{ mail_also_appears_from_scm_user } == 1) {
# $mailing_list->{ From }->{ $scm_user_email } = 0;
# }
# open THEFILE, ">> C:/logfile.txt";
# print THEFILE "\n STEP 1 mailing_list is " . Dumper( $mailing_list );
close THEFILE;
#
# # Setup the 'Reply-to' list. Email should always be replied to the
# # entire From List.
# $mailing_list->{ 'Reply-To' } = $mailing_list->{ From };
#
# open THEFILE, ">> C:/logfile.txt";
# print THEFILE "\n STEP 2 mailing_list is " . Dumper( $mailing_list );
close THEFILE;
# # But if the SCM user was not set in From, it should also be
# # replied to the SCM user first.
# if ( $request->{ policies }->{ mail_also_appears_from_scm_user } == 0) {
# $mailing_list->{ 'Reply-To' }->{ $scm_user_email } = 0;
# }
# open THEFILE, ">> C:/logfile.txt";
# print THEFILE "\n STEP 3 mailing_list is " . Dumper( $mailing_list );
close THEFILE;
#
# Result in log file :
STEP 1 mailing_list is $VAR1 = {
'To' => {
'[EMAIL PROTECTED]' => 1,
'[EMAIL PROTECTED]' => 1
},
'From' => {
'Svn admin <[EMAIL PROTECTED]>' => 1
}
};
STEP 2 mailing_list is $VAR1 = {
'Reply-To' => {
'Svn admin <[EMAIL PROTECTED]>' => 1
},
'To' => {
'[EMAIL PROTECTED]' => 1,
'[EMAIL PROTECTED]' => 1
},
'From' => $VAR1->{'Reply-To'}
};
STEP 3 mailing_list is $VAR1 = {
'Reply-To' => {
'Svn admin <[EMAIL PROTECTED]>' => 1,
'[EMAIL PROTECTED]' => 0
},
'To' => {
'[EMAIL PROTECTED]' => 1,
'[EMAIL PROTECTED]' => 1
},
'From' => $VAR1->{'Reply-To'}
};
_______________________________________________
scmbug-users mailing list
[email protected]
http://lists.mkgnu.net/cgi-bin/mailman/listinfo/scmbug-users