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.

Comments

jpetso’s picture

Issue tags: +Novice

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".

neptunix’s picture

Pancakes seems to be much easier for me, sorry :(
If I was familiar with drupal syntax :(

jpetso’s picture

Status: Active » Fixed

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).

neptunix’s picture

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!

Status: Fixed » Closed (fixed)
Issue tags: -Novice

Automatically closed -- issue fixed for 2 weeks with no activity.

  • Commit 649581d on 6.x-1.x, repository-families, drush-vc-sync-unlock by jpetso:
    #418086: Add a path providing a single filter that works without $...

  • Commit 649581d on 6.x-1.x, repository-families by jpetso:
    #418086: Add a path providing a single filter that works without $...