Hello,

I am integrating Bugzilla and Subversion through Scmbug. I am also
trying to extend Scmbug functionality a little, so that instead of
just embedding version numbers in Bugzilla log, it would embed links
to ViewVC.  Bugzilla users would click on those links and would be led
to file details in ViewVC. The following outlines my attempt which is
currently hanging the scmbug_activity.pl process. I would appreciate
if you can point me in the right direction. Basically when I implement
my changes outlined below, the commit process never finishes and gets
stuck in a process that looks like this:

www-data 15908  0.0  0.2   6836  5264 ?        S    03:43   0:00
/usr/bin/perl -I /var/repository/easyaccounting/hooks/lib/scmbug
/var/repository/easyaccounting/hooks/bin/scmbug_activity.pl
/var/repository/easyaccounting/hooks/etc/scmbug/glue.conf
activity_verify /var/repository/easyaccounting 12-1


Here is my goal: The following is a comment from a Bugzilla log. It
adds tracebility links so that users can go directly to the old file,
modified version of the files, or go directly to the repository.

[BEGIN SNIP]

 ------- Comment  #11 From Alex Obradovic  2008-04-20 01:11:58  [reply] -------

Branching trunk to version 1.1


Branch:        branches/EasyAccounting_RELEASE_1-1-0
Affected files:
---------------
9 --> 11 Easy Accounting:branches/EasyAccounting_RELEASE_1-1-0/
******
TRACEBILITY LINKS:

Download version 9:
http://adp.alexe.org/viewvc/branches/EasyAccounting_RELEASE_1-1-0/?revision=9
Download version 11:
http://adp.alexe.org/viewvc/branches/EasyAccounting_RELEASE_1-1-0/?revision=11
Repository view:
http://adp.alexe.org/viewvc/branches/EasyAccounting_RELEASE_1-1-0/?view=log

[END SNIP]

In order for this occur, These are the changes I planned out:
1) Add a new property in policies section of the glue.conf file, such as:


policies => {

   [some policies]

    viewvc => 'http://adp.alexe.org/viewvc/easyaccounting/',

   [ rest of the policies ]
}


2) That property is to be passed to Connection.

In "process_policies_common" we can add

   $request .= $policies->{ viewvc } . "\n";

Towards the end of the method.

3) Process module would pick up the new property in
"process_connection_policies",

    $line = <$socket>;
    $line =~ s/\n$//g;
    $request->{ policies }->{ viewvc } = $line;


then we can use that property in "prepare_log_message", for each file loop:

       [SNIP]

        $request->{ log_message } .= $NEW_VERSION_TO_FILENAME_TOKEN;
        $request->{ log_message } .= $request->{ product_name} .
$PRODUCT_AFFECTED_FILES_PRODUCT_FILE_TOKEN . $file;

#insert tracebility code
        my $viewvcdownload=$request->{ policies }->{ viewvc }  .
"{FILE}?revision={REVISION}";
        $viewvcdownload =~ s/{REVISION}/$oldversion/g;
        $viewvcdownload =~ s/{FILE}/$file/g;
        $request->{ log_message } .= "\n******\nTRACEBILITY
LINKS:\n\nDownload version $oldversion: $viewvcdownload";

       $viewvcdownload=$request->{ policies }->{ viewvc } . "{FILE}?view=log";
        $viewvcdownload =~ s/{REVISION}/$newversion/g;
        $viewvcdownload =~ s/{FILE}/$file/g;
        $request->{ log_message } .= "\nDownload version $newversion:
$viewvcdownload";
        my $repositoryview=$VIEWVC_REPOSITORY;
        $repositoryview =~ s/{FILE}/$file/g;
        $request->{ log_message } .= "\nRepository view: $repositoryview";
        $request->{ log_message } .= "\n\n\n";

#end insert tracebility code
[END SNIP]


So after making all these changes, something is causing my process to
hang and never finish:

www-data 15908  0.0  0.2   6836  5264 ?        S    03:43   0:00
/usr/bin/perl -I /var/repository/easyaccounting/hooks/lib/scmbug
/var/repository/easyaccounting/hooks/bin/scmbug_activity.pl
/var/repository/easyaccounting/hooks/etc/scmbug/glue.conf
activity_verify /var/repository/easyaccounting 12-1

I'd appreciate any guidance with this problem.

Thanks,

Alex
_______________________________________________
scmbug-users mailing list
[email protected]
http://lists.mkgnu.net/cgi-bin/mailman/listinfo/scmbug-users

Reply via email to