In the rush to get views ready for the demo I've only updated the views that override the vc_project items since that what we'll usually be using.

Comments

mikey_p’s picture

This should include a vc_git specific version of the individual commit view.

mikey_p’s picture

Issue tags: +git phase 2, +git sprint 9

Tagging

mikey_p’s picture

Issue tags: +git sprint 9
eliza411’s picture

Assigned: Unassigned » mikey_p
Issue tags: -git sprint 9

assigning to mikey_p

marvil07’s picture

Status: Active » Needs review
StatusFileSize
new40.79 KB

I do not understand why we need to make default views that have data about project in the git backend. And in the specific case of individual commit view, IMHO is ok to use the base view.

So, here a patch that removes views that assumes project* modules are there.

IMHO that views should live at versioncontrol_project, so that views would be added on versioncontrol_ project.

I have also removed $defaultViews data member from git backend class, so it is going to inherit versioncontrol module defaults.

I'm waiting some feedback before committing this, and hopefully then move this issue to versioncontrol_project.

marvil07’s picture

mikey_p’s picture

marvil07, this won't work since project and default views cannot assume we are using git, so extra information such as diffstat, lines added/removed, file blob etc.

Adding parent to this list

marvil07’s picture

Status: Needs review » Needs work

Well, I understand, but that's exactly the same reason why I do not want that versioncontrol_git module(that do not depends on project or versioncontrol_project) have any view that assumes that any project* module is there.

So, the only solution I see for now is create a submodule(that depends on the right modules), something like versioncontrol_git_project that impement those views.

@mikey_p: Are you ok with that?

mikey_p’s picture

That's fine, but these views are only defined as defaults for plugins defined in vc_project. If we go with the approach you're proposing then vc_project is going to have git specific views. This issue is about adding default views that will be the git specific versions of the views_sets plugins defined in vc_api in addition to providing git specific versions of the views_sets defined in vc_project.

sdboyer’s picture

Full, clean separation requires submodules, whether they're in vc_project or vc_git. Both are awkward. This is a problem no matter what, which I anticipated in creating views_sets. To help with it a bit, I allow views set plugin classes to specify the default views that should be used by different backends, so they can implement the view for the backend and it's only used if it's available. That seemed cleaner to me because while it's guaranteed that there will be backends that extend vcapi, there's no guarantee that if/what third-party module is being built on top. So better to make the assumptions in the third-party module.

I've attached a patch that demonstrates how to do this (now that I've fixed the functionality that enables it in core versioncontrol), so all it should take is applying this patch and moving all the project-specific default views out of vc_git and into vc_project.

sdboyer’s picture

BTW I'm giving that patch instead of just applying it because I cannot get this stuff to work locally to save my life. I keep getting odd errors...not the least of which are due to some annoying bugs in commitlog. Which also need fixing. But no time for that before the build I need to trip off tonight.

marvil07’s picture

Title: Add views for views_sets in vc_api » Add default views for views_sets for git
Project: Version Control API -- Git backend » Version Control / Project* integration

Moving to the vc_project queue, but probably is going to end up in a versioncontrol_project_git submodule.

sdboyer’s picture

No, vc_project is where it belongs. See #10.

mikey_p’s picture

Assigned: mikey_p » Unassigned
sdboyer’s picture

Assigned: Unassigned » sdboyer
sdboyer’s picture

Status: Needs work » Fixed

OK, they've officially been moved.

Status: Fixed » Closed (fixed)
Issue tags: -git phase 2, -git sprint 9

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