Can't get vcsapi deployed onto d.o until we get the commit log's Views integration all up and really working.

Comments

mitchell’s picture

sdboyer’s picture

At some point, maybe. But for right now, writing a different query backend is serious overkill.

dww’s picture

We don't want views to be trying to query Git directly for this data. That'd be a complete nightmare for performance. We want to mirror Git commit activity into the DB (which is what vcapi is already doing) and then provide decent views support to be able to build pages/feeds/blocks of that data directly out of the DB.

sdboyer’s picture

@dww - sorry, I should have made that clear in my initial response: nothing in the phase 2 implementation would be querying git directly, ever. There's a possibility that in the distant future, for some as-yet-unforeseen feature, we might want to write a query backend that interfaces directly with git - but given the experience we've had with CVS, it's not likely.

git is a _lot_ faster than CVS, of course, so it could be worth experimenting with - but again, phase 3+. And even then only in tandem with some smart (views) caching systems.

dww’s picture

@sdboyer: Sorry, I should have made it clear I was talking to opensanta, not you. ;)

sdboyer’s picture

You are just too bloody considerate :P

loganfsmyth’s picture

Status: Active » Needs review
StatusFileSize
new11.32 KB

Here is a start to the views integration. I've put it all in a submodule for now, not sure if we should just put it right in the main code.

This provides a default view that mimics the commitlog output. For the moment, this has a dependency on commitlog because I am using it's theming code to render the views. It is probably best to migrate all of that code into the versioncontrol_views module and ditch the commitlog. There is also a bit of code in the main versioncontrol module that uses "module_exists('commitlog')", so all of that code will need to be updated as well.

We'll also want to get the versioncontrol_project module working and add views support in there to join everything together.

Thoughts so far?

loganfsmyth’s picture

StatusFileSize
new7.01 KB

Here is a newer version. Pretty much the same as the last post, but fixes a typo and something I forgot to delete.

cweagans’s picture

Okay, so what's the next step here? I've tested the code in #8 and it works nicely and looks good.

sdboyer’s picture

If it works, go ahead and commit it. We really need it, especially if #854926: Replace admin/project/versioncontrol-repositories/list with Views-driven UI is to happen.

dww’s picture

I'm opposed to separate modules to provide views support. Views is already so nicely structured that there's a cost of about 4 lines of code in the main .module file to tell views where to look for the rest of the code. It seems dumb to make site admins manually enable a separate module to provide views support since modules can just do that automatically. I'd rather this code was just merged into the main versioncontrol directory tree instead of as a stand-alone module.

cweagans’s picture

Title: Proper Views integration » Merge views module into the main versioncontrol module
Status: Needs review » Needs work

http://drupal.org/cvs?commit=399602

It's in the repo for more eyes to see. We can still merge it in, but the code is there at least.

cweagans’s picture

Wow, I suck at remembering things. I had this patch ready to go for the 1.x branch a little while ago: http://drupal.org/node/369262#comment-2281946

It just needs ported to 2.x (dunno if there's any API changes that will affect this patch, though).

marvil07’s picture

subscribing

please take a look to entities patch: #831896: Refactor VC API to use DBTNG & an Entities-like system

that could impact this, and I think it is going to be committed soon

sdboyer’s picture

Progress here?

Hopefully the entities patch won't actually impact this much at all - the datastructure isn't changing, and that's most of what Views cares about. Some more advanced stuff might need to take advantage of it, but there's plenty to do before then.

webchick’s picture

Issue tags: +git low hanging fruit

Tagging. This might be a good task for a volunteer to work on.

tizzo’s picture

Assigned: sdboyer » tizzo
sdboyer’s picture

Issue tags: +git sprint 1

tagging this as part of the first git sprint.

sdboyer’s picture

Progress here, tizzo? I think I recall you saying you were hoping to do the merge in over the weekend.

FYI, I've postponed #879600: Meta: introduce an activity stream separate from commit logs until the next sprint, as there's just a little bit too much to do than can reasonably be gotten done this week.

tizzo’s picture

So sorry Sam! It has been a crazy week (one all nighter and one 13 hours (and counting)).

The merge is pretty much done but I'm cleaning up some of the remains that were a bit funky and testing everything. I'll try very hard to have a patch up tomorrow.

sdboyer’s picture

Great - thanks for keeping at it. I'll keep an eye out tomorrow.

tizzo’s picture

StatusFileSize
new1.82 MB

I haven't found a good way to add directories and files in a cvs patch (maybe someone could give me some pointers?) but attached is a version of version control with the views stuff merged back into the main version control module.

It still needs some love and there are a couple of things that are buggy, broken, or missing but I did fix a few bugs and reorganize this a lot. I also think I sort of get what needs to change generally to finish the necessary integration.

Will be creating some new tickets with things that need to change and/or what our options are shortly and will be posting more work on this issue as I get this a bit more tested and figure out what to do with some of the operations stuff that I have not yet merged.

sdboyer’s picture

Issue tags: +git sprint 2

gonna see if we can't finalize this during sprint 2

sdboyer’s picture

Reviewed this and mostly integrated it locally, will get the commit back into CVS this weekend. I haven't tested quite as thoroughly as I'd like (which is why it's not back in CVS yet), but it looks good so far. Marking this fixed as there's more to do, but this is just for merging it back in.

Thanks again, tizzo!

sdboyer’s picture

Status: Needs work » Fixed
marvil07’s picture

Status: Fixed » Needs work

@tizzo: I see that your last commit, actually do not include the new files, only modify the versioncontrol.module file.

tizzo’s picture

@marvil07 Sorry about that, CVS goof on my part. All committed now.

tizzo’s picture

@marvil07 Sorry about that, CVS goof on my part. All committed now.

tizzo’s picture

Status: Needs work » Fixed

setting status

sdboyer’s picture

woooohooo! thanks tizzo.

marvil07’s picture

Status: Fixed » Needs work
StatusFileSize
new47 KB

Sorry for re-opening this again, but I had to apply a patch to actually would be able to create verisoncontrol views.

It basically moves one missing function(that was on the versioncontrol_views module) and remove the old versioncontrol_views module.

@tizzo I am missing something?

tizzo’s picture

Ok... I'm just going to leave this one open for now... but I made that fix.

marvil07’s picture

Status: Needs work » Fixed

great, it is in :-)

There still work to do on views, but it's ok for this issue I think.

Status: Fixed » Closed (fixed)
Issue tags: -git phase 2, -git low hanging fruit, -git sprint 1, -git sprint 2

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

  • Commit 63e1d4b on repository-families, drush-vc-sync-unlock by cweagans:
    #782586 by loganfsmyth: Add views integration module.
    
    
  • Commit 6008d5c on repository-families, drush-vc-sync-unlock by tizzo:
    issue #782586, merging versioncontrol_views into the main versioncontrol...
  • Commit a5f97fe on repository-families, drush-vc-sync-unlock by tizzo:
    issue #782586, adding actual includes to merge versioncontrol_views into...
  • Commit bf09184 on repository-families, drush-vc-sync-unlock by tizzo:
    #782586, re-adding a necessary function for making views of cvs commit...
  • Commit 807e65b on repository-families, drush-vc-sync-unlock by tizzo:
    #782586 correcting a typo in the hook_views_data implementation
    
    

  • Commit 63e1d4b on repository-families by cweagans:
    #782586 by loganfsmyth: Add views integration module.
    
    
  • Commit 6008d5c on repository-families by tizzo:
    issue #782586, merging versioncontrol_views into the main versioncontrol...
  • Commit a5f97fe on repository-families by tizzo:
    issue #782586, adding actual includes to merge versioncontrol_views into...
  • Commit bf09184 on repository-families by tizzo:
    #782586, re-adding a necessary function for making views of cvs commit...
  • Commit 807e65b on repository-families by tizzo:
    #782586 correcting a typo in the hook_views_data implementation