From 4e0a7c563e38c8f3e9cd8071d2ded5774a930719 Mon Sep 17 00:00:00 2001
From: Marco Villegas <marvil07@gmail.com>
Date: Sat, 20 Nov 2010 19:20:33 -0500
Subject: [PATCH] #976130: Add # of lines added/removed to commitlog views.

---
 commitlog/includes/commitlog.views_default.inc |   90 ++++++++++++++++++++----
 1 files changed, 77 insertions(+), 13 deletions(-)

diff --git commitlog/includes/commitlog.views_default.inc commitlog/includes/commitlog.views_default.inc
index 1cb5ed1..4ffc445 100644
--- commitlog/includes/commitlog.views_default.inc
+++ commitlog/includes/commitlog.views_default.inc
@@ -5,15 +5,14 @@
  * @file
  *   Provide default views for use by the commitlog module.
  */
- 
+
 /**
  * Implementation of hook_views_default_views().
  */
 function commitlog_views_default_views() {
   $views = array();
-  /*
-   * View 'commitlog_author_commits'
-   */
+
+  // View 'commitlog_author_commits'
   $view = new view;
   $view->name = 'commitlog_author_commits';
   $view->description = 'VersionControl Commits By Author';
@@ -363,6 +362,7 @@ function commitlog_views_default_views() {
   ));
   $views[$view->name] = $view;
 
+  // View 'commitlog_commit_items'
   $view = new view;
   $view->name = 'commitlog_commit_items';
   $view->description = 'VersionControl Commit Items';
@@ -489,6 +489,76 @@ function commitlog_views_default_views() {
       'field' => 'nothing',
       'relationship' => 'none',
     ),
+    'line_changes_added' => array(
+      'label' => 'Lines Added',
+      'alter' => array(
+        'alter_text' => 0,
+        'text' => '',
+        'make_link' => 0,
+        'path' => '',
+        'link_class' => '',
+        'alt' => '',
+        'prefix' => '',
+        'suffix' => '',
+        'target' => '',
+        'help' => '',
+        'trim' => 0,
+        'max_length' => '',
+        'word_boundary' => 1,
+        'ellipsis' => 1,
+        'html' => 0,
+        'strip_tags' => 0,
+      ),
+      'empty' => '',
+      'hide_empty' => 0,
+      'empty_zero' => 0,
+      'set_precision' => FALSE,
+      'precision' => 0,
+      'decimal' => '.',
+      'separator' => ',',
+      'prefix' => '',
+      'suffix' => '',
+      'exclude' => 0,
+      'id' => 'line_changes_added',
+      'table' => 'versioncontrol_item_revisions',
+      'field' => 'line_changes_added',
+      'relationship' => 'none',
+    ),
+    'line_changes_removed' => array(
+      'label' => 'Lines Removed',
+      'alter' => array(
+        'alter_text' => 0,
+        'text' => '',
+        'make_link' => 0,
+        'path' => '',
+        'link_class' => '',
+        'alt' => '',
+        'prefix' => '',
+        'suffix' => '',
+        'target' => '',
+        'help' => '',
+        'trim' => 0,
+        'max_length' => '',
+        'word_boundary' => 1,
+        'ellipsis' => 1,
+        'html' => 0,
+        'strip_tags' => 0,
+      ),
+      'empty' => '',
+      'hide_empty' => 0,
+      'empty_zero' => 0,
+      'set_precision' => FALSE,
+      'precision' => 0,
+      'decimal' => '.',
+      'separator' => ',',
+      'prefix' => '',
+      'suffix' => '',
+      'exclude' => 0,
+      'id' => 'line_changes_removed',
+      'table' => 'versioncontrol_item_revisions',
+      'field' => 'line_changes_removed',
+      'relationship' => 'none',
+    ),
   ));
   $handler->override_option('arguments', array(
     'vc_op_id' => array(
@@ -566,9 +636,7 @@ function commitlog_views_default_views() {
   ));
   $views[$view->name] = $view;
 
-  /*
-   * View 'commitlog_global_commits'
-   */
+  // View 'commitlog_global_commits'
   $view = new view;
   $view->name = 'commitlog_global_commits';
   $view->description = 'Commitlog Global Commit Log';
@@ -816,9 +884,7 @@ function commitlog_views_default_views() {
   ));
   $views[$view->name] = $view;
 
-  /*
-   * View 'commitlog_repository_commits'
-   */
+  // View 'commitlog_repository_commits'
   $view = new view;
   $view->name = 'commitlog_repository_commits';
   $view->description = 'A per-repository commit log.';
@@ -1112,9 +1178,7 @@ function commitlog_views_default_views() {
   ));
   $views[$view->name] = $view;
 
-  /*
-   * View 'commitlog_user_commits'
-   */
+  // View 'commitlog_user_commits'
   $view = new view;
   $view->name = 'commitlog_user_commits';
   $view->description = 'A per-user commit log.';
-- 
1.7.2.3

