Come together with the global Drupal community in Rotterdam, 28 Sept – 1 Oct 2026. Sessions, contribution, connection, and Early Bird savings until 8 June.
I suppose this is going to significantly complicate things since each view_set will have to implement these. As for now this is currently blocked on #1024960: Need view for individual commit message since each item in the RSS should probably link to the individual commit view.
Here a patch that actually works for commitlog_global_commit.
To implement this, I had to use a fake path on feed display,and then overwrite it on run-time(I end up there after asking merlinofchaos).
So, this still needs some work, but the basic case is working! :-)
What's new:
Theme the rss item for operations.
decreasing the number of FIXMEs
Add a feed display to commitlog_global_commits
PS: Please note that as mentioned by mikey_p this need to be done for each view set. I am excluding individual commit view since I do not see any use of one-item/non-changeable rss feed. We also need to change views on other projects that are using views_set feature to overwrite behaviour: aka change versioncontrol_project views. (git backend only changes individual commit, so not change required there)
Ok, this took me a while, but I have a re-viewable patch now!
What's new:
Make sure we have the needed fields, aka no more TODOs on row plugin handler.
Add a views argument handler for repo_id to be able to set the title propertly.
Rework commitlog_operations_page() to use our custom views_embed_view, versioncontrol_render_commitlog_view.
Add feeds to commitlog_repository_commits and commitlog_user_commits views.
What needs to be done before committing this:
Attach feeds to displays manually before rendering. I am not attaching them through views, since in that way I can not overwrite the path for the feed. That's needed because we want to support different feed displays of views on the same path(based on the view set). Please note that this problem appeared because there is not a way to declare a feed without an associated path in views.
Bringing back and answering the comment on #1056568-3: Provide rss on commitlog views (here is the main patch, the one on the other issue is just a follow-up after this will be applied, so responding here)
First and most important, I think you disabled vfv query aggregation. Because I'm seeing a bunch of these queries being run in sequence:
SELECT versioncontrol_item_revisions.item_revision_id AS item_revision_id,
versioncontrol_repositories.name AS versioncontrol_repositories_name,
versioncontrol_item_revisions.path AS versioncontrol_item_revisions_path,
versioncontrol_repositories.vcs AS versioncontrol_repositories_vcs,
versioncontrol_repositories.repo_id AS versioncontrol_repositories_repo_id,
versioncontrol_item_revisions.line_changes_added AS versioncontrol_item_revisions_line_changes_added,
versioncontrol_item_revisions.line_changes_removed AS versioncontrol_item_revisions_line_changes_removed,
versioncontrol_operations.vc_op_id AS versioncontrol_operations_vc_op_id
FROM versioncontrol_item_revisions versioncontrol_item_revisions
INNER JOIN versioncontrol_repositories versioncontrol_repositories ON versioncontrol_item_revisions.repo_id = versioncontrol_repositories.repo_id
INNER JOIN versioncontrol_operations versioncontrol_operations ON versioncontrol_item_revisions.vc_op_id = versioncontrol_operations.vc_op_id
WHERE versioncontrol_operations.vc_op_id IN (960909);
# Time: 2011-02-12T21:24:57
# User@Host: git_dev[git_dev] @ stagingvm.drupal.org:38330 []
# Query_time: 0.000000 Lock_time: 0.000000 Rows_sent: 0 Rows_examined: 0
use git_dev;
SELECT versioncontrol_item_revisions.item_revision_id AS item_revision_id,
versioncontrol_repositories.name AS versioncontrol_repositories_name,
versioncontrol_item_revisions.path AS versioncontrol_item_revisions_path,
versioncontrol_repositories.vcs AS versioncontrol_repositories_vcs,
versioncontrol_repositories.repo_id AS versioncontrol_repositories_repo_id,
versioncontrol_item_revisions.line_changes_added AS versioncontrol_item_revisions_line_changes_added,
versioncontrol_item_revisions.line_changes_removed AS versioncontrol_item_revisions_line_changes_removed,
versioncontrol_operations.vc_op_id AS versioncontrol_operations_vc_op_id
FROM versioncontrol_item_revisions versioncontrol_item_revisions
INNER JOIN versioncontrol_repositories versioncontrol_repositories ON versioncontrol_item_revisions.repo_id = versioncontrol_repositories.repo_id
INNER JOIN versioncontrol_operations versioncontrol_operations ON versioncontrol_item_revisions.vc_op_id = versioncontrol_operations.vc_op_id
WHERE versioncontrol_operations.vc_op_id IN (959434);
# Time: 2011-02-12T21:24:59
# User@Host: git_dev[git_dev] @ stagingvm.drupal.org:38330 []
# Query_time: 0.000000 Lock_time: 0.000000 Rows_sent: 0 Rows_examined: 0
use git_dev;
SELECT versioncontrol_item_revisions.item_revision_id AS item_revision_id,
versioncontrol_repositories.name AS versioncontrol_repositories_name,
versioncontrol_item_revisions.path AS versioncontrol_item_revisions_path,
versioncontrol_repositories.vcs AS versioncontrol_repositories_vcs,
versioncontrol_repositories.repo_id AS versioncontrol_repositories_repo_id,
versioncontrol_item_revisions.line_changes_added AS versioncontrol_item_revisions_line_changes_added,
versioncontrol_item_revisions.line_changes_removed AS versioncontrol_item_revisions_line_changes_removed,
versioncontrol_operations.vc_op_id AS versioncontrol_operations_vc_op_id
FROM versioncontrol_item_revisions versioncontrol_item_revisions
INNER JOIN versioncontrol_repositories versioncontrol_repositories ON versioncontrol_item_revisions.repo_id = versioncontrol_repositories.repo_id
INNER JOIN versioncontrol_operations versioncontrol_operations ON versioncontrol_item_revisions.vc_op_id = versioncontrol_operations.vc_op_id
WHERE versioncontrol_operations.vc_op_id IN (959714);
# Time: 2011-02-12T21:25:01
# User@Host: git_dev[git_dev] @ stagingvm.drupal.org:38330 []
# Query_time: 1.000000 Lock_time: 0.000000 Rows_sent: 0 Rows_examined: 0
use git_dev;
SELECT versioncontrol_item_revisions.item_revision_id AS item_revision_id,
versioncontrol_repositories.name AS versioncontrol_repositories_name,
versioncontrol_item_revisions.path AS versioncontrol_item_revisions_path,
versioncontrol_repositories.vcs AS versioncontrol_repositories_vcs,
versioncontrol_repositories.repo_id AS versioncontrol_repositories_repo_id,
versioncontrol_item_revisions.line_changes_added AS versioncontrol_item_revisions_line_changes_added,
versioncontrol_item_revisions.line_changes_removed AS versioncontrol_item_revisions_line_changes_removed,
versioncontrol_operations.vc_op_id AS versioncontrol_operations_vc_op_id
FROM versioncontrol_item_revisions versioncontrol_item_revisions
INNER JOIN versioncontrol_repositories versioncontrol_repositories ON versioncontrol_item_revisions.repo_id = versioncontrol_repositories.repo_id
INNER JOIN versioncontrol_operations versioncontrol_operations ON versioncontrol_item_revisions.vc_op_id = versioncontrol_operations.vc_op_id
WHERE versioncontrol_operations.vc_op_id IN (959889);
# Time: 2011-02-12T21:25:03
# User@Host: git_dev[git_dev] @ stagingvm.drupal.org:38330 []
# Query_time: 0.000000 Lock_time: 0.000000 Rows_sent: 0 Rows_examined: 0
use git_dev;
SELECT versioncontrol_item_revisions.item_revision_id AS item_revision_id,
versioncontrol_repositories.name AS versioncontrol_repositories_name,
versioncontrol_item_revisions.path AS versioncontrol_item_revisions_path,
versioncontrol_repositories.vcs AS versioncontrol_repositories_vcs,
versioncontrol_repositories.repo_id AS versioncontrol_repositories_repo_id,
versioncontrol_item_revisions.line_changes_added AS versioncontrol_item_revisions_line_changes_added,
versioncontrol_item_revisions.line_changes_removed AS versioncontrol_item_revisions_line_changes_removed,
versioncontrol_operations.vc_op_id AS versioncontrol_operations_vc_op_id
FROM versioncontrol_item_revisions versioncontrol_item_revisions
INNER JOIN versioncontrol_repositories versioncontrol_repositories ON versioncontrol_item_revisions.repo_id = versioncontrol_repositories.repo_id
INNER JOIN versioncontrol_operations versioncontrol_operations ON versioncontrol_item_revisions.vc_op_id = versioncontrol_operations.vc_op_id
WHERE versioncontrol_operations.vc_op_id IN (960404);
# Time: 2011-02-12T21:25:05
# User@Host: git_dev[git_dev] @ stagingvm.drupal.org:45330 []
# Query_time: 0.000000 Lock_time: 0.000000 Rows_sent: 0 Rows_examined: 0
use git_dev;
SELECT data, item_id FROM queue q WHERE expire = 0 AND name = "versioncontrol_git_repo_activity_stream" ORDER BY created ASC LIMIT 0, 1;
# Time: 2011-02-12T21:25:07
# User@Host: git_dev[git_dev] @ stagingvm.drupal.org:38330 []
# Query_time: 0.000000 Lock_time: 0.000000 Rows_sent: 0 Rows_examined: 0
use git_dev;
SELECT versioncontrol_item_revisions.item_revision_id AS item_revision_id,
versioncontrol_repositories.name AS versioncontrol_repositories_name,
versioncontrol_item_revisions.path AS versioncontrol_item_revisions_path,
versioncontrol_repositories.vcs AS versioncontrol_repositories_vcs,
versioncontrol_repositories.repo_id AS versioncontrol_repositories_repo_id,
versioncontrol_item_revisions.line_changes_added AS versioncontrol_item_revisions_line_changes_added,
versioncontrol_item_revisions.line_changes_removed AS versioncontrol_item_revisions_line_changes_removed,
versioncontrol_operations.vc_op_id AS versioncontrol_operations_vc_op_id
FROM versioncontrol_item_revisions versioncontrol_item_revisions
INNER JOIN versioncontrol_repositories versioncontrol_repositories ON versioncontrol_item_revisions.repo_id = versioncontrol_repositories.repo_id
INNER JOIN versioncontrol_operations versioncontrol_operations ON versioncontrol_item_revisions.vc_op_id = versioncontrol_operations.vc_op_id
WHERE versioncontrol_operations.vc_op_id IN (960799);
# Time: 2011-02-12T21:25:09
# User@Host: git_dev[git_dev] @ stagingvm.drupal.org:38330 []
# Query_time: 1.000000 Lock_time: 0.000000 Rows_sent: 0 Rows_examined: 0
use git_dev;
SELECT versioncontrol_item_revisions.item_revision_id AS item_revision_id,
versioncontrol_repositories.name AS versioncontrol_repositories_name,
versioncontrol_item_revisions.path AS versioncontrol_item_revisions_path,
versioncontrol_repositories.vcs AS versioncontrol_repositories_vcs,
versioncontrol_repositories.repo_id AS versioncontrol_repositories_repo_id,
versioncontrol_item_revisions.line_changes_added AS versioncontrol_item_revisions_line_changes_added,
versioncontrol_item_revisions.line_changes_removed AS versioncontrol_item_revisions_line_changes_removed,
versioncontrol_operations.vc_op_id AS versioncontrol_operations_vc_op_id
FROM versioncontrol_item_revisions versioncontrol_item_revisions
INNER JOIN versioncontrol_repositories versioncontrol_repositories ON versioncontrol_item_revisions.repo_id = versioncontrol_repositories.repo_id
INNER JOIN versioncontrol_operations versioncontrol_operations ON versioncontrol_item_revisions.vc_op_id = versioncontrol_operations.vc_op_id
WHERE versioncontrol_operations.vc_op_id IN (960869);
Not really, that queries are now executed by the views render method on the rss plugin. And I see what is the problem, I am not using fields on the plugin, so I am rendering the individual commit view for ech operation at render level, that's the problem.
But, that should not be modifying the default display, only the feed display. If that's not the case please confirm it.
and things are really noticeably slower.
Second, the only output that's coming out for anything is
Mmm.. I am looking the right feed as output for feed display, so maybe you need to clear views cache or something like that?
What's the garbage path for?
Please take a look to the menu callback changes. There you can see why. In summary:
Views do not allow create feed displays without assigning a path.
We are dynamically choosing which view to use on a menu callback, and attaching a feed related with that page, so the feed display is also dynamically picked.
We can not rely on that paths, so instead I am overriding the path at display time.
I see no drupal_add_feed() for node/{project-node}/commits
Also I'd like to note that we need some solution for redirecting from old-style URLs like http://drupal.org/cvs?rss=true&nid=3060&branch=HEAD - probably we need to update all out subscriptions in all out aggregators ... hard work but I see no other way
Also I'd like to note that we need some solution for redirecting from old-style URLs like http://drupal.org/cvs?rss=true&nid=3060&branch=HEAD - probably we need to update all out subscriptions in all out aggregators ... hard work but I see no other way
Is this the standard way of doing things? Seems like views/the display should take care of it. Is it not because of the wonky way we're directly rendering the view?
Could you point me to the reference implementation you used for this so I can compare?
Overall, very nearly ready to go in. As with the other patch, I'd like this pushed into a topic branch. If you have the full local commit history and could push that up (rather than just a single squashed commit), that would be handy.
Is this the standard way of doing things? Seems like views/the display should take care of it. Is it not because of the wonky way we're directly rendering the view?
I think so, I actually asked for it on #drupal-views for suggestions.
It feels to me like needing this option points to poor architecture on our part. I'm not really in a Views mindset while writing this, though...
WFM, it's not that bad ;-)
Could you point me to the reference implementation you used for this so I can compare?
Overall, very nearly ready to go in. As with the other patch, I'd like this pushed into a topic branch. If you have the full local commit history and could push that up (rather than just a single squashed commit), that would be handy.
So, I think it has been so much time and so many changes, that at some point I just used one of the patches, so I do not have history anymore. Anyway I like independent commits but only when they are stable, if not it's a complete pain to use git bisect, so that's why I think it's ok for this patch to get in as one commit.
So, I think this is mature enough, so after re-checking it on top of current 6.x-2.x I am pushing this, so one release blocker left :-)
I know 12 files changed, 1745 insertions(+), 77 deletions(-) is a lot for one commit, but as explained before, this patch comes from CVS times, and it has changed too much from the beginning, and after the change of remotes (from my old-manual-cvsimport-git-repo to the shiny d.o migrated CVS one) I lost track of the branch. So I hope to not do this again, now on git times(tm).
Comments
Comment #1
mikey_p commentedI suppose this is going to significantly complicate things since each view_set will have to implement these. As for now this is currently blocked on #1024960: Need view for individual commit message since each item in the RSS should probably link to the individual commit view.
Comment #2
mikey_p commentedComment #3
mikey_p commented#1024960: Need view for individual commit message is in now.
Comment #4
eliza411 commentedTesting Issue #1042574: No RSS feeds on commit views
Comment #5
marvil07 commentedOk, I tried to start this, but it is no so really close to be finished.
Please take a look to FIXMEs and TODOs in the patch :-)
Comment #6
marvil07 commentedLet's iterate over this again.
Comment #7
marvil07 commentedHere a patch that actually works for commitlog_global_commit.
To implement this, I had to use a fake path on feed display,and then overwrite it on run-time(I end up there after asking merlinofchaos).
So, this still needs some work, but the basic case is working! :-)
What's new:
PS: Please note that as mentioned by mikey_p this need to be done for each view set. I am excluding individual commit view since I do not see any use of one-item/non-changeable rss feed. We also need to change views on other projects that are using views_set feature to overwrite behaviour: aka change versioncontrol_project views. (git backend only changes individual commit, so not change required there)
Comment #8
marvil07 commentedOk, this took me a while, but I have a re-viewable patch now!
What's new:
What needs to be done before committing this:
Comment #9
marvil07 commentedI just realized that this is a deployment blocker, so marking as it as mentioned on #1042574-3: No RSS feeds on commit views
Comment #10
marvil07 commented\o/, it was easier than I though, thanks to hefox for helping me with the last bit!
Comment #11
marvil07 commentedI am working on the related issue at versioncontrol_project #1056568: Provide rss on commitlog views
Comment #12
sdboyer commentedSee the comments in the other issue
Comment #13
marvil07 commentedBringing back and answering the comment on #1056568-3: Provide rss on commitlog views (here is the main patch, the one on the other issue is just a follow-up after this will be applied, so responding here)
Not really, that queries are now executed by the views render method on the rss plugin. And I see what is the problem, I am not using fields on the plugin, so I am rendering the individual commit view for ech operation at render level, that's the problem.
But, that should not be modifying the default display, only the feed display. If that's not the case please confirm it.
Mmm.. I am looking the right feed as output for feed display, so maybe you need to clear views cache or something like that?
Please take a look to the menu callback changes. There you can see why. In summary:
Comment #14
marvil07 commentedThis patch avoid the design problem I had done in the last patch by rendering by hand a individual commit view on each row :-/
BTW the row plugin has become really a generic plugin, but there is not one like that on views AFAIK.
What is missing here:
Comment #15
marvil07 commentedOk, finally the review-able version!
What's new here:
Naturally, now we need to update the patch for versioncontrol_project.
Comment #16
marvil07 commentedHard code-freeze left this out.
Comment #17
andypostI see no drupal_add_feed() for node/{project-node}/commits
Also I'd like to note that we need some solution for redirecting from old-style URLs like http://drupal.org/cvs?rss=true&nid=3060&branch=HEAD - probably we need to update all out subscriptions in all out aggregators ... hard work but I see no other way
Comment #18
marvil07 commentedYep, that's because those views are on versioncontrol_project, see #1056568: Provide rss on commitlog views for the patch that do that.
That should be handled on #780342: Handle linkrot from CVS commit browser.
Comment #19
marvil07 commentedRe-roll, after #1066160: Group entity loading in views handlers this is not applying fine.
Comment #20
damienmckennaThis is a dependency of #1072762: Change for git.
Comment #21
gregglesSubscribe.
Comment #22
marvil07 commentedsdboyer: It would be great to receive your review here.
Comment #23
sdboyer commentedPretty close here.
Is this the standard way of doing things? Seems like views/the display should take care of it. Is it not because of the wonky way we're directly rendering the view?
Nit:
Just 'All commit messages' or 'All commits' would be more consistent with what we've got elsewhere.
Nit:
It feels to me like needing this option points to poor architecture on our part. I'm not really in a Views mindset while writing this, though...
Could you point me to the reference implementation you used for this so I can compare?
Overall, very nearly ready to go in. As with the other patch, I'd like this pushed into a topic branch. If you have the full local commit history and could push that up (rather than just a single squashed commit), that would be handy.
Powered by Dreditor.
Comment #24
marvil07 commentedI think so, I actually asked for it on #drupal-views for suggestions.
WFM, it's not that bad ;-)
Sure, it's actually the only one rss row plugin on views ;-)
So, I think it has been so much time and so many changes, that at some point I just used one of the patches, so I do not have history anymore. Anyway I like independent commits but only when they are stable, if not it's a complete pain to use git bisect, so that's why I think it's ok for this patch to get in as one commit.
Attaching ta patch with the nitpick changed.
Comment #25
webchickSubscriiiiiibe.
Comment #26
sumitk commentedsubscribing
Comment #27
rwohlebsubscribe
Comment #28
tobiasbThere are feeds example for drupal project http://drupalcode.org/project/drupal.git/rss , 8.x Branch http://drupalcode.org/project/drupal.git/rss/refs/heads/8.x.
Comment #29
wim leersSubscribing.
Comment #30
marvil07 commentedYep, gitweb produces feeds, but the issue here is about getting drupal side feeds for commits, getting the data from versioncontrol information.
Comment #31
marvil07 commentedtagging
Comment #32
mrfelton commentedsubscribing
Comment #33
marvil07 commentedSo, I think this is mature enough, so after re-checking it on top of current 6.x-2.x I am pushing this, so one release blocker left :-)
I know
12 files changed, 1745 insertions(+), 77 deletions(-)is a lot for one commit, but as explained before, this patch comes from CVS times, and it has changed too much from the beginning, and after the change of remotes (from my old-manual-cvsimport-git-repo to the shiny d.o migrated CVS one) I lost track of the branch. So I hope to not do this again, now on git times(tm).Comment #34
andypostSo where are this feeds could be found now?
EDIT http://drupal.org/node/3060/commits still has no feeds attached
Comment #35
marvil07 commented@andypost: fixed does not mean deployed on d.o :-/
Comment #36
gregglesWe can tag for that.
Comment #37
johnnycastrup commentedsubscribing
Comment #38
sdboyer commentedAfter some ugliness with another drupal.org deployment earlier this week, I'm holding off on deploying new vcapi stuff for a few more days.
Comment #40
cweagansDid this ever get deployed? This is a blocker for getting http://drupal.org/project/activitystream_drupalcode working again.
Comment #41
gregglesIf it still has this tag then it's not deployed.
Comment #42
marvil07 commentedChanging state again. AFAIK(see drumm comment) that tag is independent from the issue status.
Comment #43
glass.dimly commentedhey all,
I'm interested in seeing this issue committed. What needs to happen to see this move forward? Anything I can test or do?
Peace,
Jeremy
Comment #44
damienmckennaThis is still unavailable, e.g. there's no indication on http://drupal.org/node/943786/commits or http://drupal.org/user/108450/track/code of an RSS feed being available.
Comment #45
marvil07 commentedAs mentioned on comment 35:
and on comment 42:
Comment #46
marvil07 commentedIt has just been deployed!
Comment #47
cweagansOf interest to this thread: #1703452: Provide argument titles on provided default views.