Filter commit log by repo
neptunix - March 30, 2009 - 10:46
| Project: | Version Control API |
| Version: | 6.x-1.0-beta5 |
| Component: | Commit Log |
| Category: | feature request |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | closed |
| Issue tags: | Novice |
Jump to:
Description
The only way to filter commit log messages by repository is to add ?repo=id to the query string. This works good except drupal menu does not understand query parameters. In my example I've got 3 commit log links in the menu (?repo=1, ?repo=2, ?repo=3) and clicking on any highlights the first entry in the menu.
Could be great to access different repos by a full path: commitlog/1, commitlog/2, etc.

#1
This week I'm too busy to do Version Control API work, but this stuff is easy as cooking Palatschinken: The cvs.module compatibility module in the CVS backend does pretty much exactly the same thing, so all that's needed is to copy-n-paste some code from that module and adapt the menu paths and menu callback names. Then submit a patch, and you're done!
I'd prefer if the path also contains the filter name so that filters other than the repository are possible too, e.g. "commitlog/repo/1", "commitlog/uid/56020", or "commitlog/id/33031".
#2
Pancakes seems to be much easier for me, sorry :(
If I was familiar with drupal syntax :(
#3
Ok ok ok, here you are: implemented in commit #191308.
This must be the most straightforward feature request I ever implemented for Version Control API. (Not that there were that many feature requests yet.)
It reuses hook_commitlog_constraints() so every (singular) constraint that works with request attributes (e.g. "repo", "id", "uid", "message", ...) will work as path argument after "commitlog". Only a single filter is possible though. As schemed in my previous comment, the path for a repository is consequently "commitlog/repo/[repo_id]".
Will appear in the release after 6.x-1.0-beta5 (I think that will be a release candidate already).
#4
Got cvs version. Works great. However using commitlog/id/123 does not make sense when you have more then one repository (as it always uses shows commits from the first repo). Anyway, thanks!
#5
Automatically closed -- issue fixed for 2 weeks with no activity.