Specto Svn Watch

243 views
Skip to first unread message

pabloB

unread,
Apr 22, 2009, 3:56:41 PM4/22/09
to Specto
Hi,

I would like to develop a new watch for svn repositories, similar to
the one for Bazaar. Any advice or anybody working on this ?.

Thanks

Wout Clymans

unread,
Apr 23, 2009, 1:46:26 AM4/23/09
to spe...@googlegroups.com
Hello,

Thank you for wanting to contribute to specto! :)

If you want to write a new watch you MUST use the bzr version from specto that can be found here: https://code.launchpad.net/~specto/specto/main

On our download page there are instructions on how to get the source from launchpad.

Writing a new plugin is a simple as adding a new file to the "plugins" folder in the "spectlib" directory but there are some things that you have to be very careful about (i'm going to take the bzr watch as an example):

1) the filename has to be something like watch_vc_svn (vc = category, svn = your watch)
2) there have to be these lines:
type = "Watch_vc_bazaar" --> has to be the name of the class!
type_desc = _("Bazaar") --> the description that will come in the add-menu
icon = 'bazaar' --> the icon (specto looks if it is available in the theme, if not it will search in data/icons/ for an icon called bazaar.svg)
category = _("Version control") --> the category (the first level in the add menu)

so i attached a basic svn example to help you get started :)

i also attached an icon called subversion.svg (it is actually i png but specto only checks the svg extension but it should work fine).

so put the watch_vc_svn file in the plugins folder and subversion.svg in data/icons and you will have a new entry in your add menu :)

if your plugin is not loading anymore or there are errors you have to take a look at ~/.config/specto/error.log

good luck and don't hesitate to ask a question! we are here to help you!

Best regards,
Wout
subversion.svg
watch_vc_svn.py

Jeff Fortin

unread,
Apr 24, 2009, 10:56:58 AM4/24/09
to spe...@googlegroups.com
It's great to hear that you want to make a svn watch! Happy hacking :)
...I guess we just need someone to show up and do a git watch someday, and that will corner most VCS repositories out there.

Pablo Bustamente

unread,
May 11, 2009, 11:04:40 AM5/11/09
to spe...@googlegroups.com
Hello,

Attached is the patch for Subversion monitoring by specto, please test it and let me know if there is anything that needs to be modified. I also changed watch.py because the error message that came from svn lib had a break line (\n) and therefore killed the app and the logging, not sure if it is best to solve it in the plugin or in the specto "watch.py".
--
Pablo Bustamante
subversion_watch.patch

Wout Clymans

unread,
May 12, 2009, 9:30:00 AM5/12/09
to spe...@googlegroups.com
Thanks for your new watch!

I will try to test this as fast as possible and if all is ok, we will include your patch in main.

And I would also like to hear from you how difficult it was to write a new watch...any big obstacles...things you would like to see different,....

Best regards,
Wout
Reply all
Reply to author
Forward
0 new messages