Friday, May 23, 2008

Showing diffs

codenotifier diff
Codenotifier is able now to show commit diffs. If commit looks interesting you can tell codenotifier to load and show the changeset by clicking 'Fetch diff'. Diff fetch is asynchronous so the same page without diff will likely be returned; diff should appear there in about 10 seconds (this really depends on server load and remote repository availability and timings). In most cases you'll get the diff after you click Refresh on the same page.

Here's an axample of already fetched diff. Btw this is when I knew Python language name origin!

See, there are permalinks to each diffed file and to each line of diff. I think ability to comment diff lines, like excellent GitHub feature, might be useful also..

Just in case, I also extracted code converting unified diff to HTML to a Ruby gem.

Previously codenotifier gave link to Trac's changeset screen for commit of project with Trac, but not every project is on Trac, and not every Trac instance (beleive it or not!) is integrated with SVN.

Saturday, May 10, 2008

Commits search

codenotifier search

Codenotifier now has seach function. It searches over projects and commits, so if you enter 'rails' you'll get 'rails' project, 'railstree' (because simple queries are automaticaly suffixed with *), and all the commits in different projects that have 'rails' in (start of) their commit message, user name or project name. Some more examples:
  • You can see how given technology is spread or just mentioned over projects, e.g. flickr, twitter, facebook.
  • In opensource projects people are often rather creative in commit messages, so you can test it with queries like "moon" or "yeah"
  • You can limit your search results to specific project, e.g. "hadoop grid*" Here we see that project name is also searched in commits search.
  • When someone's patch is included in opensourc project it's usually commited by someone else, but author is often mentioned in commit message. For such cases we can see his traces in different projects by query like this: vestbø
  • Individual fields can be queried too, e.g. we can have a list of sri's commits: author:"sri". Available fields are author, project_name and description. No field specification means everywhere. And everything can be combined: (google !project_name:a*) OR author:dant*.
  • Plain old search for some specific problem, like cache store_headers. Or you can limit it to single project: cache store_headers "httpd". Or to several projects: cache (mediawiki OR webkit). Or exclude some project: scal* -scala
In commits search project name, author and message all are searched over. And Lucene/Google search syntax works, like 'x AND y', 'x OR y', 'x y' (same as 'x AND y'), "x y" (double qoutes makes query be interpreted as complete phrase), 'x y -z', '(x OR y) -z' and so on.

For more detailed query help please see Lucene query help page. It mostly applies but have some differences, e.g. in codenotifier words are joined with AND by default; '!' works as NOT; may be something else, please comment if you find something.

Results are given in (reverse) chronological order.

Asterisk can be used in any place as a mask but can make search sometimes slow. It's added automatically to the end of query when Codenotifier thinks it's simple; and it leaves it as is if it looks advanced, i.e. contains asterisk, doublequote, AND or OR.

The search is powered by excellent Ferret and acts_as_ferret libraries, big thanks to their authors!

Tuesday, March 11, 2008

Links in commit messages

It's quite common to have a link to defect/request ticket in SVN commit message, e.g. like in Lucene project: http://www.codenotifier.com/projects/29.
Codenotifier now shows such ticket references as links. For this there is a 'bugtracking' section at New/Edit Project screens. In that screen you can specify project bugtracking type, url and ticket reference patterns as they are used in commit messages.

What's more, Trac bugtracking system is able to show pretty-formatted source difference for given commit. So, for Trac projects Codenotifier now shows 'diff' link for any commit. Example: Rails commits.

What I didn't see before, a lot of projects commit messages refer to another commits numbers, like in this Piston commit. They are now resolved too.

File items in commit changesets now have link 'try', this is a link to the file in source repository. It's called 'try' because files presence is quite volatile in source repositories: given file might have been moved or deleted long ago. Also this link will open HEAD version of that file, not the revision of commit in which it's shown.

What else.. while integrating with Trac changesets I appreciated the fact that it has natural IDs in URLs: it has commit revisions rather than PK of commit in Trac's database. Trac is said to not have a database of commits but that's another story :)
So I decided to make primary URLs for commit pages also use natural IDs. Example, revision 632879 of Lucene.
was: http://www.codenotifier.com/commits/473109
now: http://www.codenotifier.com/projects/29/commits/632879
It now has codenotifier's internal ID of Lucene in URL but that's seem to be not a problem.

Next thing I gonna add is Git support as most non-SVN projects I wanted to add are on Git; and there's also a trend to move existing repositories from SVN to Git. Looked to it briefly; surprised that there's no way to get project changelog without checking the source out (unlike Subversion). Wonder if my hosting HDD limit (10G) will work with it.

Sunday, February 17, 2008

Entry for feedback

Feel free to leave your comments on Codenotifier here.

Hello Codenotifier

I'd like to announce a new tool I just created: Codenotifier. It's a tool that provides RSS feeds for code changes in open source projects of your interest. I created it to satisfy my own need in such site; hope you'll like it too.
Currently only Subversion repositories are supported; Git and others are planned. There's a lot of field for statistics and charts there; I hope to add them too.