Alex, You may want to take a look at:
http://bugzilla.mkgnu.net/show_bug.cgi?id=1118 In the next Scmbug release there will be a couple of web pages supported. One of which will take a bug ID and generate a list of files touched by that bug and supplies ViewVC links to the given versions. Screenshots are attached to the bug, direct link is: http://bugzilla.mkgnu.net/attachment.cgi?id=325 Hopefully this will do what you require without having to change what actually gets stored in the bug itself (Which will be used to integrate with other tools etc [Codestriker integration coming in the next Scmbug and Codestriker releases]) Rob > -----Original Message----- > From: [EMAIL PROTECTED] [mailto:scmbug-users- > [EMAIL PROTECTED] On Behalf Of Alex Obradovic > Sent: 20 April 2008 17:43 > To: [email protected] > Subject: [scmbug-users] help with adding a new feature to Scmbug, viewvc > link > > 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 _______________________________________________ scmbug-users mailing list [email protected] http://lists.mkgnu.net/cgi-bin/mailman/listinfo/scmbug-users
