Hi everybody,

I'm experiencing some problems with mason and the subversion bindings
for perl.
I have a webinterface written in mason which is able to checkout and
commit information from/to a subversion repository. I'm using the
subversion bindings for perl for this (SVN::Base, SVN::Client,...). I do
not have any problems with the subversion part, since checkout and
commit work properly.

My problem is that if a subversion action is invoked through the
webinterface, a connection to the svnserve process is established and
never gets closed. This issue _only_ occurs with mason scripts. If i put
the same functionality into a cgi script, the scripts exits and the
connection terminates.

I'm not so sure why this problem occurs and if I have misunderstood
something in the concept of mason, but I cannot locate the problem.
The connections to svnserve only get closed when restarting apache or by
manually killing the processes/threads.

Thanks in advance for your help,
regards

Matthias


Here's some sample code I'm using:

<%args>
$workid;
</%args>
<!-- some HTML code -->
<%init>
#use File::Basename;
#use SVN::Client;
#use TestBed::Session;

my $rere = $m->comp("/mason/getworkingcopy", workid => "$workid");
my $ctx = new SVN::Client();
my $calling = $m->request_comp->{dir_path};
my $revision = "HEAD";
my $recursive = "1";
my $get_all = "1";
my $update = "1";
my %status = ();
my @status = ();
my $status_func = sub {
        no strict 'refs';
        my $path = shift;
        my $stat = shift;
        my $ts = $stat->text_status();
        foreach my $stri ( keys %SVN::Wc::Status:: ) {
                my $wert2 = ${"SVN::Wc::Status::${stri}"};
                push (@{$status{$stri}}, $path) if ( "$wert2" eq "$ts");
        }
};

# get the current revision Number.
# Connection opened
my $wiedersehung = $ctx->status($workid, $revision, $status_func,
$recursive, $get_all, $update,0);
#
# and never gets closed
</%init>




-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642
_______________________________________________
Mason-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mason-users

Reply via email to