Sunday, May 22, 2011

Using Savannah with Mylyn

The GNU software I maintain, Source-Highlight, Gengetopt and Gengen, are hosted on Savannah, which has its own bug tracking system. Recently I've started to use the wonderful Mylyn tool under Eclipse for but and feature tracking (in general, "tasks"), and I wanted to use it also with Savannah, but since there is no specific connector, we can use the generic web connector (actually, having a specific connector would be better, but for the moment, that's better than nothing ;)

Since there is not a template ready to use for accessing Savannah from Mylyn, I thought I could blog about my experience, hoping that it's useful to others.

First of all, you need mylyn in eclipse together with its ui functionalities (but if you downloaded an eclipse distribution you'll likely have it already); then you need to install the Web Templates Connector, from the update site http://download.eclipse.org/tools/mylyn/update/incubator (add a repository)



Then, after you restarted eclipse, open the Task Repositories View, choose Add Task Repository, and select Web Template,


For this tutorial I will use my GNU project Source-Highlight as an example:

  • Server: https://savannah.gnu.org/bugs/?group=src-highlite
  • Label: choose a label to represent your task repository
  • put your savannah username and password
  • Additional Settings
    • Add two parameters:
      • group with value the name of the project on savannah (in my case it's src-highlite)
      • tracker with the specific kind of tasks you want to follow on savannah (e.g., bugs, or patches, etc.)
  • Advanced Configuration
    • Task URL: https://savannah.gnu.org/${tracker}/?
    • New Task URL: ${serverUrl}&func=additem
    • Query Request Pattern: ${serverUrl}&chunksz=150&report_id=100
    • Query Pattern:
      <td.*?#({Id}[0-9]+).*?/td>\n<td ><a.*?>({Description}.*?)</a></td>


When you click Finish, also accepts to add a query for the repository.

In the query properties dialog you can check whether all the inserted parameters for the task repository are correct, by clicking on the preview button (you should see a list of bugs, otherwise the dialog should tell you that query is not correct and cannot produce results)


Now, if you open the view Task List, you should see the bugs related to your query.


Now clicking on a bug will open a browser editor window in eclipse and you access that bug page. Remember that, since you access the savannah repository through a generic web connector you won't be able to enjoy the typical Mylyn rich editor for bugs, like the ones for bugzilla and trac). However, you'll still have the context tab and the private tab.


Hope this helps :)

6 comments:

Youri said...

Cool ! Was looking for this for ages.

I'm having troubles logging in though. I've tried entering the login settings for savannah, but no luck :( Also tried putting the login url in the tracker url (with uri=/bugs/?group=xxxxx). Still doesn't work.

Any ideas ?

betto said...

Youri, as far as I know with web connectors the login has still to be performed using the corresponding login web page: if you open a bug in the eclipse web browser, then click on the login link in the browser and there you can login (this will be kept for the current eclipse section).

Please let me know whether this works :)

Youri said...

Hey thanks for responding so fast ;)

I tried logging in using the eclipse browser, but apperantly mylyn doesn't use the saved session. I even tried to keep the window open, but still no luck :\

Maybe it's some kind of setting in eclipse ...

betto said...

Hi

you successfully logged in savannah right?

after that, have you tried to reopen a task from mylyn? at that point you should be logged... it works for me...

Youri said...

Yes, I logged into savannah in the eclipse browser. But when I press the Preview button in my query properties, I'm seeing "Permission denied".

What OS are you using ? I'm on ubuntu 10.04 using eclipse 3.6 Helios.

betto said...

I'm using kubuntu natty...

the preview problem might be due to the configuration you used for the repository I guess...