Closed (fixed)
Project:
Version Control API -- Git backend
Version:
6.x-2.x-dev
Component:
Code
Priority:
Critical
Category:
Task
Assigned:
Issue tags:
Reporter:
Created:
14 Feb 2010 at 18:51 UTC
Updated:
26 Mar 2014 at 15:02 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
sdboyer commentedThe log parser is one of those things that should ultimately be based on our gitlib/cligit implementation...although I know from doing this with versioncontrol_svn that integration isn't SO tight that it can't be pretty easily refactored in later. However, it does seem like more work to need to refactor later...I'd kinda rather see cligit done first?
Comment #2
CorniI commentedwell, it's nearly done ;)
The code should be pretty clear now, and extracting the parts we need for a libgit should be easy. Also, for phase 1, do we need anything more than a log parser?
The next step is imho writing a post-recieve (I think) hook which inserts the pushed commits into the db as well, using some extra information like for branch creation/deletion.
Comment #3
sdboyer commentedFair enough, we don't need it for phase 1 - not for this, or anything else. And that it's nearly done is the most important thing anyway.
Yup, I was just looking this morning to see if we had any post-receive hooks. Don't think we do, and that's definitely the next step.
Comment #4
CorniI commentedSo, i did this. marvil07 reviewed the patch already and is fine with it. The attached patch is against the oop branch and fixes some issues the port had as well.
This doesn't break any existing functionality (at least by intention :D) but doesn't add more than branch deletion.
Comment #5
CorniI commentedComment #6
marvil07 commentedI just notice Druplicon message on IRC, we need auto-lists for notify isssues to maintainers :-)
Well, yep, I review the changes, and I just re-rolled the patch against the DRUPAL-6--2 branch to make it easy to try.
Please note that, since there was the vcs api bug #714198: VersioncontrolRepository::getLabels is broken, you need the last dev tarball to try it.
Maybe a sdboyer try before the commit? :-)
Comment #7
CorniI commentedHere is the patch i really meant to attach, it only has minor changes and should apply cleanly on marvil07's oop branch. Please note that i've got some additional commits in my oop branch which aren't in marvil07's but which are in this patch. They are only minor, though.
Comment #8
marvil07 commentedmarking as need review again to avoid forget re-reading it :-)
Comment #9
sdboyer commentedneed this for phase 2 of the migration
Comment #10
CorniI commentedwell given that this patch is ready in my opinion and just awaits your review...
marvil should be fine by doing a diff of my new patch to the patch he already reviewed...
Comment #11
sdboyer commentedyeah, it's on me :) i'll get to it ASAP
Comment #12
sdboyer commentedThis is _awesome_. So glad I went through this. I've incorporated it locally into my changes, so marking it fixed, though I can't commit back to CVS for the next couple days until the corresponding entity changes in the main versioncontrol branch get stable, too.
Comment #13
sdboyer commentedNevermind, just gonna put this in straightaway since it applies well to the pre-entities work.
Comment #15
sdboyer commented@CorniI Now that I've finally gone through most of all this in considerable detail, I finally figured out what's been bothering me about it. I found the way you broke up some of the logic in the log parser to be counterintuitive. I liked that there was a clean, easily-readable top-level function (versioncontrol_git_log_update_repository()) that called lots of secondary functions (e.g., versioncontrol_git_log_parse_and_insert_commit()). But there was another level beyond that second one, which is where it started to get irksome. I don't mind deep nesting in general - the problem I was having here was that most of these functions contain important logical components, like invoking the git binary to retrieve some data. Removing that logic from the main flow of code forced me to switch between the main function and subfunction repeatedly, which made for a difficult grokking experience. So again, while I'm all for breaking up code into logical segments, moving data retrieval too far away from data manipulation can lead to confusion.