Download & Extend

Get the log parser finished. Really.

Project:Version Control API -- Git backend
Version:6.x-2.x-dev
Component:Code
Category:task
Priority:critical
Assigned:marvil07
Status:closed (fixed)
Issue tags:git phase 2, git sprint 4, git sprint 5

Issue Summary

We've done a ton of work already to get the versioncontrol_git log parser, but we've made more changes to the entities API and need to get the log parser back up to date.

Ideally, we'll start working on this during the second week of the sprint (Nov 15th), after we've firmed up the API change-related tickets. If that's the case, then the goal of this ticket will be getting the log parser in basically "releasable" shape, fully implementing and exercising the API.

Comments

#1

this is a starter patch far from been completed that:

use insert() method instead of the deprecated ensure()
use locking mechanism.
minor: renaming variables for readability.
minor: remove FIXME, deleting branches before commits is ok
minor: avoid unrelevant parameter from _versioncontrol_git_log_parse_and_insert_commit
AttachmentSize
update-log-parser-v0.patch 6.07 KB

#2

Status:active» postponed

I found a dependency: #972058: Complete removing of {versioncontrol_operation_items} table

#3

Another patch, with more stuff, but still needs work and depend on the other issue too.

handle correctly the _versioncontrol_git_log_get_commits_in_branch() parameter.
fix typo
Fix _versioncontrol_git_log_attach_branch_to_commits(): no more label entity.
Use the right branches variables on _versioncontrol_git_log_update_repository().
minor: various doc addings and minor fixes
AttachmentSize
update-log-parser-v1.patch 9.25 KB

#4

Status:postponed» needs work

Took your patches and made some additions, changes, and ensured that it worked with #879858: Unify entity C(R)UD . So, well, we've got an incremental commit, anyway (http://drupal.org/cvs?commit=453332). But there's more to do. So marking needs work.

#5

Issue tags:+git sprint 5

Tagging for git sprint 5. Marco will commit when he's satisfied, without review, and this issue can be closed. Any problems will be opened as discreet issues.

#6

This is taking more than I expected.

So I am attaching the new things until now(some more work on local but not really ready to go out :-p):

    - Process commits before tags.
      A tag in git in a reference to a commit, so we should process new commits
      to before to make sure we can process the tags correctly.
   
    - Remove no more used _versioncontrol_git_log_get_commit() function.
   
    - Add type to commit operation objects.
   
    - Pass parameter to VersioncontrolGitBackend constructor as it parent.
   
    - Pass --reverse on commit fetching to process commits in a more natural way.
AttachmentSize
update-log-parser-v2.patch 5.22 KB

#7

A new update with the parser actually working :-), but still needs minor tweaks to avoid some unnecessary database interaction.

BTW: I committed some stuff to versioncotrol module to actually get to this point: http://drupal.org/cvs?commit=456280

What is new in this patch:

    - Overwrite VersioncontrolItem::determineSourceItemRevisionID() to include git logic about which items can be considered equal.
    - minor: New way to access backend outside child class context.
    - Reorganize _versioncontrol_git_log_parse_and_insert_commit()
        - Make clear(avoid reusing) which data arrays are passed to each entity build() method.
        - Pass backend at entities creation.
        - Use nested save at VersioncontrolOperation::itemRevisions saving.
    - Minor touches to _versioncontrol_git_parse_items().
        - Pass backend to item constructor.
        - Add a type to created item objects before save.
        - Call _versioncontrol_git_fill_source_item() again.
    - Re-work _versioncontrol_git_fill_source_item().
        - Now VCS API assumes there is only one source item, so merges can not be
          tracked propertly there, and we are neither tracking on git backend for
          now.
        - Use git-log instead of git-rev-list because it can see file
          copies/moves by using --follow.
        - Detect merges only until 4 parents, anyway merging with more than 4
          parents is not usual and it is almost insane :-p
        - Include logic to avoid duplicates. This is probably going to be removed
          in favour of plain nested saving soon.
   
AttachmentSize
update-log-parser-v3.patch 13.23 KB

#8

Status:needs work» needs review

I removed several lines no more needed :-) (less inserts/updates on nested CRUD), but actually to let this work, I am also depending on #983202: Stop passing the same $options parameter in cascade on operation and item entity CRUD methods..

Ok, finally I think this is ready to be reviewed!

So, waiting for sdboyer opinion before committing it.

AttachmentSize
update-log-parser-v4.patch 12.61 KB

#9

I thought you were just going to commit this and we'd solve problems as they came up?

#10

Status:needs review» fixed

Sure :-), finally iscommittted \o/

I am changing the status, but probably we are going to need a follow up if there is something more.

#11

Status:fixed» closed (fixed)

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

nobody click here