[rt-users] RT SVN Integration PullUpdate.html unknown user error

Barry L. Kline blkline at attglobal.net
Mon Oct 10 20:04:02 EDT 2005


Barry L. Kline wrote:

> 
> I've isolated this problem to something interesting.  I added the 
> following line in the PullUpdate.html file:
> 
> $RT::Logger->error("Rev: $rev   Actor: $actor");    <-------- Added
> my $user = RT::CurrentUser->new($actor);
> unless ( $user->id ) {
>     $user->LoadByCols( Gecos => $actor );
> }
> 
> unless ( $user->id ) {
>     die "Unknown user";
> }
> 
> and in the log am getting the following:
> 
> Oct 10 19:16:45 rt RT: Rev: 114   Actor: klinebl 
> (/opt/rt3/share/html/SVN/PullUpdate.html:39)
> 
> 
> The $actor variable contains the name of the user (me) who commited the 
> change... not the "RT-SVN" user that Max created.  Since klinebl is not 
> an RT user the error message "Unknown user" is correct.  The version of
> subversion is:  subversion-1.1.1-2.1, compiled for RHEL 4.
> 
> Does this point to the problem?
> 
> Barry

I know that it's rude to reply to your own post, but I've done another 
experiment.  I created a user in RT called "klinebl", commited another 
change and voila!  It worked fine.  Which brings me to this code:

open( SVNLOOK, "$LOOK log $REPO -r $rev|" ) || die $@;

my $dashes = <SVNLOOK>;
my $data   = <SVNLOOK>;
my ( $revision, $actor, $foo );
if ( $data =~ /^r(\d+)\s*\|\s*(.*?)\s*\|/ ) {
     $revision = $1;
     $actor    = $2;

}


Since the code is clearly parsing the data returned from the "svn log"
it is impossible for this to work if the "actor" (the person who 
committed the changes) is not an RT user.  My guess is that everyone who 
has been successful with this so far has been so because the userid that 
they use to commit to SVN is also present as an RT user.

This is the pertinent svn log data:

------------------------------------------------------------------------
r123 | klinebl | 2005-10-10 19:35:00 -0400 (Mon, 10 Oct 2005) | 5 lines

RT-Ticket: 37


As a last experiment I filled in my Unix login field on my RT profile 
with the Unix login field on my development box, then renamed my test 
profile listed above.  Once again, success!  RT is smart enough to look 
for the user based on Unix login name.  The bottom line:  Ensure that 
the "Unix login" field in RT is filled in for the appropriate user with 
the login used for development.  But this begs the question... what do I 
do with the *other* user profile under which I develop?  Can I insert 
more than one Unix login into the field?

Jesse -- perhaps this needs to be added to the README file included with 
the integration module.

BK



More information about the rt-users mailing list