RT SVN Integration PullUpdate.html unknown user error

I’ve successfully installed the RT::SVN::Integration options, setup
everything appropriately according to the README, and I’m getting the
following errors with it dying on line 44 when trying to use curl and
the webpath, as an unknown user:

error: Unknown user at /opt/rt3/share/html/SVN/PullUpdate.html line 44.
context:

40: $user->LoadByCols( Gecos => $actor );
41: }
42:
43: unless ( $user->id ) {
44: die “Unknown user”;
45: }
46:
47: my $ticket;
48: my $update_msg = ‘’;

code stack: /opt/rt3/share/html/SVN/PullUpdate.html:44
/opt/rt3/share/html/autohandler:215

I have setup a privileged user from within RT as said in the README. If
I call svn from a command line, say: /usr/bin/svn log http://svn/repos/
-r 112, all goes well and it returns what it’s supposed to. I also have
the proper configurations in RT_SiteConfig as:

RT-Subversion

Set($PathToSvn, ‘/usr/bin/svn’);
Set($SvnRepository, ‘http://svn/repos/’);

I’m calling it just normally with the post-commit hook:
curl “http://rt/rt/SVN/PullUpdate.html?user=user&pass=password&rev=$REV” &

I’m supplying the correct username and password that the user has been
setup from within RT as, with the same format as the README. Is this
something strictly with an RT configuration, RT and Apache
configurations, or am I just plainly missing something simple? Thanks.

Max

Oooh, hey, I didn’t even realize that this existed!

It seems to work for me, but the link it adds to ticket updates is
less than completely helpful, e.g.:

| Tue Oct 04 13:28:38 2005 nmehl - Reference to http://source/@6229 added
| Tue Oct 04 13:28:38 2005 nmehl - Comments added
|
| Subversion update http://source/@6229
|
| Just testing…

Is the http://repo/@revision syntax supposed to hook in to SVN::Web or
some other repo browser? It certainly doesn’t seem to do anything
with the default mod_dav_svn interface…

-n

------------------------------------------------------------memory@blank.org
"What a depressing, predictable arc. YAY LOOK AT US FLYING UP INTO THE SKY!!!
HONK!!! THE TOILET. HELP!!! HURKGLGHLGPTHGLHGLBHLGPTH FLUSH NEXT."
(–www.leisuretown.com)
http://blank.org/memory/>----------------------------------------------------

Oooh, hey, I didn’t even realize that this existed!

It seems to work for me, but the link it adds to ticket updates is
less than completely helpful, e.g.:

| Tue Oct 04 13:28:38 2005 nmehl - Reference to http://source/@6229 added
| Tue Oct 04 13:28:38 2005 nmehl - Comments added
|
| Subversion update http://source/@6229
|
| Just testing…

Is the http://repo/@revision syntax supposed to hook in to SVN::Web or
some other repo browser? It certainly doesn’t seem to do anything
with the default mod_dav_svn interface…

That’s correct. In the latest RT-Integration-SVN, we have hooks for
pointing to your svnweb or equivalent.

In the immortal words of Jesse Vincent (jesse@bestpractical.com):

That’s correct. In the latest RT-Integration-SVN, we have hooks for
pointing to your svnweb or equivalent.

By “latest” meaning later-than-0.03? :slight_smile:

BTW, wouldn’t it make more sense to put the RT-Foo stuff in svn
metadata, specficallly the bugtraq:* elements?

(Am I thinking that I can avoid having to deploy FogBugz here? Yes,
yes I am. :slight_smile:

-n

---------------------------------------------------memory@blank.org
Just remember. Abraham Lincoln didn’t die in vain.
He died in Washington, D.C.
http://blank.org/memory/-------------------------------------------

In the immortal words of Jesse Vincent (jesse@bestpractical.com):

That’s correct. In the latest RT-Integration-SVN, we have hooks for
pointing to your svnweb or equivalent.

By “latest” meaning later-than-0.03? :slight_smile:

Whatever’s current on CPAN Should have it.

BTW, wouldn’t it make more sense to put the RT-Foo stuff in svn
metadata, specficallly the bugtraq:* elements?

Pointer to docs on bugtraq: svn metadata? I’ve never this hack. Also, I
detest the spelling.

In the immortal words of Jesse Vincent (jesse@bestpractical.com):

Whatever’s current on CPAN Should have it.

0.03 is current on cpan, but the docs make no mention. UTSL, I guess?

BTW, wouldn’t it make more sense to put the RT-Foo stuff in svn
metadata, specficallly the bugtraq:* elements?

Pointer to docs on bugtraq: svn metadata? I’ve never this hack. Also, I
detest the spelling.

http://tortoisesvn.tigris.org/source/browse/tortoisesvn/trunk/doc/issuetrackers.txt?rev=3982&view=markup

The spelling is lame, but support for it already exists in
TortoiseSVN, which is VERY handy, e.g.:

http://www.fogcreek.com/FogBugz/docs/40/Articles/SourceControl/TortoiseSVN.html

-n

------------------------------------------------------------memory@blank.org
"Zombies are the liberal nightmare. Here you have the masses, whom you would
love to love, appearing at your front door and their faces falling off; and
you’re trying to be as humane as you possibly can, but they are, after all,
eating the cat. And the fear of mass activity, of mindlessness on a national
scale, underlies my fear of zombies.’ (–Clive Barker)
http://blank.org/memory/----------------------------------------------------

BTW, wouldn’t it make more sense to put the RT-Foo stuff in svn
metadata, specficallly the bugtraq:* elements?

Pointer to docs on bugtraq: svn metadata? I’ve never this hack. Also, I
detest the spelling.

http://tortoisesvn.sourceforge.net/docs/release/TortoiseSVN_en/help-onepage.html#tsvn-DUG-bugtracker

It’s a TortoiseSVN thing. Those keywords will only help you generate a
well-formed log message and then linkfy the log message. They won’t do
anything to help update RT with the contents of the log message.

It’s possible to use those keywords without any changes to
RT::Integration::SVN.

Michael
Michael S. Liebman m-liebman@northwestern.edu
http://msl521.freeshell.org/
“I have vision and the rest of the world wears bifocals.”
-Paul Newman in “Butch Cassidy & the Sundance Kid”

In the immortal words of Michael S. Liebman (m-liebman@northwestern.edu):

It’s possible to use those keywords without any changes to
RT::Integration::SVN.

Oh, heh, sure enough:

Property Value


bugtraq:url http://rt.example.org/Ticket/Display.html?id=%BUGID%
bugtraq:label Ticket Number
bugtraq:message RT-Ticket: %BUGID%
bugtraq:warnifnoissue yes

…works like a charm. The only limitation is that tsvn doesn’t
appear to support multiline bugtraq:messages, so by default any svn
comments will be appended to the ticket as a comment rather than as a
correspond… but that’s probably trivial to change if anyone needs to.

-n

------------------------------------------------------------memory@blank.org
"It has occurred to me that if people really knew how software got written,
I’m not sure if they’d give their money to a bank or get on an airplane ever
again." (–Ellen Ullman)
http://blank.org/memory/----------------------------------------------------

Nathan J. Mehl wrote:

Oooh, hey, I didn’t even realize that this existed!

It seems to work for me, but the link it adds to ticket updates is
less than completely helpful, e.g.:

| Tue Oct 04 13:28:38 2005 nmehl - Reference to http://source/@6229 added
| Tue Oct 04 13:28:38 2005 nmehl - Comments added
|
| Subversion update http://source/@6229
|
| Just testing…

Is the http://repo/@revision syntax supposed to hook in to SVN::Web or
some other repo browser? It certainly doesn’t seem to do anything
with the default mod_dav_svn interface…

Did you just create an RT user within RT? I’m confused as to what I’m
doing differently than everyone else.

Max

In the immortal words of Max (btmanmeh@verizon.net):

Did you just create an RT user within RT? I’m confused as to what I’m
doing differently than everyone else.

Yup, created an “svn” user in RT. That was pretty much it.

-n

------------------------------------------------------------memory@blank.org
"When I was in college, there were certain words you couldn’t say in front of
a girl. Now you can say them, but you can’t say ‘girl.’" (-- Tom Lehrer)
http://blank.org/memory/----------------------------------------------------

Nathan J. Mehl wrote:

In the immortal words of Max (btmanmeh@verizon.net):

Did you just create an RT user within RT? I’m confused as to what I’m
doing differently than everyone else.

Yup, created an “svn” user in RT. That was pretty much it.

I’m still fighting with mine. Logs are showing my rt-svn user logging in
successfully when I call the curl http location, however it’s dumping
the error I had originally posted as an unknown user. Is it possible for
the code to be cached somewhere that it’s calling and messing me up?

Any other ideas?

Max

Max wrote:

Nathan J. Mehl wrote:

In the immortal words of Max (btmanmeh@verizon.net):

Did you just create an RT user within RT? I’m confused as to what
I’m doing differently than everyone else.

Yup, created an “svn” user in RT. That was pretty much it.

I’m still fighting with mine. Logs are showing my rt-svn user logging
in successfully when I call the curl http location, however it’s
dumping the error I had originally posted as an unknown user. Is it
possible for the code to be cached somewhere that it’s calling and
messing me up?

Try deleting rtdir/var/mason_data/*

Any other ideas?

Max


http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users

Be sure to check out the RT Wiki at http://wiki.bestpractical.com

Buy your copy of our new book, RT Essentials, today!
Download a free sample chapter from http://rtbook.bestpractical.com

Drew Barnes
Applications Analyst
Raymond Walters College
University of Cincinnati

Drew Barnes wrote:

Try deleting rtdir/var/mason_data/*

That got rid of the cached code it’s calling, because a change I had
made to PullUpdate.html for a test popped up. It’s still bitching about
the unknown user error though. Is it possible there’s something messed
up with the user I created within RT?

Max

Max wrote:

I’ve successfully installed the RT::SVN::Integration options, setup
everything appropriately according to the README, and I’m getting the
following errors with it dying on line 44 when trying to use curl and
the webpath, as an unknown user:

error: Unknown user at /opt/rt3/share/html/SVN/PullUpdate.html line 44.
context:

40: $user->LoadByCols( Gecos => $actor );
41: }
42:
43: unless ( $user->id ) {
44: die “Unknown user”;
45: }
46:
47: my $ticket;
48: my $update_msg = ‘’;

code stack: /opt/rt3/share/html/SVN/PullUpdate.html:44
/opt/rt3/share/html/autohandler:215

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

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 = ;
my $data = ;
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