FEB
15
2012

KDEPIM Git Resource

KDEPIM Git Resource

You can now monitor any git repository with KMail. Commits will appear as e-mails in the message list.

KMail configuration:

Resource configuration:

Message list:

It will do a git fetch every 5 minutes or so.

This is still a playground project, so it has some limitations:
- Only master is supported yet
- If authentication is needed for the git-fetch, you must run ssh-add
in the same terminal where you're going to start akonadi. ( ssh-add && akonadictl restart )

While not needing to depend on commitfilter.kde.org or other external notification services is great, this wasn't my primary reason for creating this resource.

I did it because we can, or rather "since KDEPIM>4.4 we can".

Thanks to the new KDEPIM architecture, the application is now really decoupled from the data and that opens us a world of possibilities.

The git resource took me only 8 hours of coding, without needing to touch a single line of KMail code, therefore not introducing any regressions.

The barrier to contribute new features to kontact has never been so low.

--
git clone git://anongit.kde.org/akonadi-git-resource

Comments

I love it!


By pascal_a at Thu, 02/16/2012 - 10:39

Great job!


By gergap at Thu, 02/16/2012 - 14:43

...with lots of repositories I have:

QInotifyFileSystemWatcherEngine::addPaths: inotify_add_watch failed: No such file or directory
QFileSystemWatcher: failed to add paths: /home/rudd-o/Projects/Third-party/zfs/.git/refs/remotes/origin/master
Agent instance created in separate process.
Known subscriber "AkonadiAgentServer" subscribes again
Known subscriber "akonadi_imap_resource_2" subscribes again
Database "akonadi" opened using driver "QMYSQL"
Known subscriber "akonadi_calendarsearch_agent" subscribes again
Database "akonadi" opened using driver "QMYSQL"
QInotifyFileSystemWatcherEngine::addPaths: inotify_add_watch failed: No such file or directory
QFileSystemWatcher: failed to add paths: /home/rudd-o/Projects/Third-party/akonadi-git-resource/.git/refs/remotes/origin/master

(There is only refs/remotes/origin/HEAD there)

Also, you did not document anywhere that the only version of libgit2 this works with, is 0.15, and they changed the ABI / API in the later versions.

Also, it does not work with remote git repositories -- only with local ones. That kind of defeats the purpose, as I can just as easily fetch the repo locally by hand, and then simply git log the aaaaaa..bbbbbb incoming changes.

Also, it should provide all the local branches and remote branches as a tree of folders.

Also, it should provide the patches as inline attachments with diff MIME type, so that kmail can colorize them. Files listed in the change set should be clickable URLs that let me see the files directly.

Also, it does not work if installed in /usr/local


By rudd-o at Thu, 02/16/2012 - 15:20

I will keep tabs on this project. This should be higher priority since the use case you present is a real problem that is useful for developers and is trivially solvable given a little more effort.


By rudd-o at Thu, 02/16/2012 - 15:21