Index: versioncontrol.drush.inc
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/versioncontrol/versioncontrol.drush.inc,v
retrieving revision 1.9
diff -u -p -r1.9 versioncontrol.drush.inc
--- versioncontrol.drush.inc	6 Jan 2011 00:51:16 -0000	1.9
+++ versioncontrol.drush.inc	11 Jan 2011 02:36:05 -0000
@@ -20,7 +20,8 @@ function versioncontrol_drush_command() 
     ),
     'bootstrap' => DRUSH_BOOTSTRAP_DRUPAL_FULL,
   );
-  $items['vcapi-map-operations'] = array(
+  $items['vcapi-map-commits'] = array(
+    'aliases' => array('vcapi-map-operations'),
     'description' => "Attempt to map author & committer data in tracked commits/operations to Drupal users. By default, only unmapped operations will be attempted.",
     'arguments' => array(
       'repositories' => 'A comma-delimited list of repository ids or shortnames. Mixing and matching names and ids is fine.',
@@ -49,6 +50,7 @@ function versioncontrol_drush_help($sect
   switch ($section) {
     case 'drush:vcapi-parse-logs':
       return dt("This command will fetch all new activity in the repositories listed on the command line. If no repositories are given, log fetching will be triggered on all repositories.");
+    case 'drush:vcapi-map-commits':
     case 'drush:vcapi-map-operations':
       return dt("This command will attempt to map raw operation author/committer data to known Drupal accounts.");
   }
@@ -114,7 +116,7 @@ function drush_versioncontrol_vcapi_pars
   drush_backend_batch_process();
 }
 
-function drush_versioncontrol_vcapi_map_operations() {
+function drush_versioncontrol_vcapi_map_commits() {
   $repos = array();
   if ($discover = drush_get_option('discover', FALSE)) {
     $ids = db_select('versioncontrol_operations', 'vco')
Index: versioncontrol.info
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/versioncontrol/versioncontrol.info,v
retrieving revision 1.11
diff -u -p -r1.11 versioncontrol.info
--- versioncontrol.info	3 Jan 2011 16:09:20 -0000	1.11
+++ versioncontrol.info	11 Jan 2011 02:36:05 -0000
@@ -9,6 +9,7 @@ files[] = includes/VersioncontrolBackend
 files[] = includes/VersioncontrolBranch.php
 files[] = includes/VersioncontrolItem.php
 files[] = includes/VersioncontrolOperation.php
+files[] = includes/VersioncontrolCommit.php
 files[] = includes/VersioncontrolRepository.php
 files[] = includes/VersioncontrolTag.php
 files[] = includes/interfaces.inc
Index: versioncontrol.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/versioncontrol/versioncontrol.module,v
retrieving revision 1.193
diff -u -p -r1.193 versioncontrol.module
--- versioncontrol.module	10 Jan 2011 04:18:32 -0000	1.193
+++ versioncontrol.module	11 Jan 2011 02:36:05 -0000
@@ -87,7 +87,7 @@ define('VERSIONCONTROL_ITEM_DIRECTORY', 
  * Only used for items that don't exist in the repository (anymore), at least
  * not in the given revision. That is mostly the case with items that
  * were deleted by a commit and are returned as result by
- * VersioncontrolOperation::getItems(). A "deleted file" can also be
+ * VersioncontrolCommit::getItems(). A "deleted file" can also be
  * returned by directory listings for CVS, representing "dead files".
  */
 //@{
@@ -435,7 +435,7 @@ function _versioncontrol_get_fallback_au
  *   The repository that the items are located in.
  * @param $items
  *   An array of item arrays, for example as returned by
- *   VersioncontrolOperation::getItems().
+ *   VersioncontrolCommit::getItems().
  *
  * @return
  *   This function does not have a return value; instead, it alters the
@@ -541,7 +541,7 @@ function versioncontrol_fetch_source_ite
  *   The repository that the items are located in.
  * @param $items
  *   An array of item arrays, for example as returned by
- *   VersioncontrolOperation::getItems().
+ *   VersioncontrolCommit::getItems().
  *
  * @return
  *   This function does not have a return value; instead, it alters the
@@ -752,7 +752,7 @@ function theme_versioncontrol_account_us
  *
  * @param $statistics
  *   An array of statistics objects as returned by
- *   versioncontrol_get_operation_statistics(), grouped by at least uid and
+ *   versioncontrol_get_commit_statistics(), grouped by at least uid and
  *   optionally repo_id/username columns.
  * @param $options
  *   An array of optional further options. Currently, the only supported
@@ -766,14 +766,14 @@ function theme_versioncontrol_user_stati
   $rows = array();
 
   foreach ($statistics as $user_stats) {
-    $last_operation_date = t('!time ago', array(
-      '!time' => format_interval(time() - $user_stats->last_operation_date, 1),
+    $last_commit_date = t('!time ago', array(
+      '!time' => format_interval(time() - $user_stats->last_commit_date, 1),
     ));
-    $first_operation_date = t('!time ago', array(
-      '!time' => format_interval(time() - $user_stats->first_operation_date, 1),
+    $first_commit_date = t('!time ago', array(
+      '!time' => format_interval(time() - $user_stats->first_commit_date, 1),
     ));
-    $total_operations = format_plural(
-      $user_stats->total_operations, '1 commit', '@count commits'
+    $total_commits = format_plural(
+      $user_stats->total_commits, '1 commit', '@count commits'
     );
 
     if (isset($options['constraints']) && module_exists('commitlog')) {
@@ -784,14 +784,14 @@ function theme_versioncontrol_user_stati
       else {
         $options['constraints']['uids'] = array($user_stats->uid);
       }
-      $total_operations = l($total_operations, commitlog_get_url($options['constraints']));
+      $total_commits = l($total_commits, commitlog_get_url($options['constraints']));
     }
 
     $rows[] = array(
       theme('versioncontrol_user_statistics_account', $user_stats),
-      $last_operation_date,
-      $first_operation_date,
-      $total_operations,
+      $last_commit_date,
+      $first_commit_date,
+      $total_commits,
     );
   }
   return theme('table', $header, $rows);
@@ -803,7 +803,7 @@ function theme_versioncontrol_user_stati
  *
  * @param $statistics
  *   An array of statistics objects as returned by
- *   versioncontrol_get_operation_statistics(), grouped by at least uid and
+ *   versioncontrol_get_commit_statistics(), grouped by at least uid and
  *   optionally repo_id/username columns.
  */
 function theme_versioncontrol_user_statistics_item_list($statistics, $more_link = NULL) {
@@ -819,15 +819,15 @@ function theme_versioncontrol_user_stati
     $item .= t('!committer - !commit-count', array(
       '!committer' => theme('versioncontrol_user_statistics_account', $user_stats),
       '!commit-count' => '<span class="versioncontrol-commit-count">'
-        . format_plural($user_stats->total_operations, '1 commit', '@count commits')
+        . format_plural($user_stats->total_commits, '1 commit', '@count commits')
         . '</span>',
     ));
 
-    if (!empty($user_stats->first_operation_date)) { // has committed yet?
+    if (!empty($user_stats->first_commit_date)) { // has committed yet?
       $item .= '<div class="versioncontrol-commit-times">';
       $item .= t('last: !last_time ago, first: !first_time ago', array(
-        '!last_time' => format_interval(time() - $user_stats->last_operation_date, 1),
-        '!first_time' => format_interval(time() - $user_stats->first_operation_date, 1),
+        '!last_time' => format_interval(time() - $user_stats->last_commit_date, 1),
+        '!first_time' => format_interval(time() - $user_stats->first_commit_date, 1),
       ));
       $item .= '</div>';
     }
Index: includes/VersioncontrolBackend.php
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/versioncontrol/includes/VersioncontrolBackend.php,v
retrieving revision 1.14
diff -u -p -r1.14 VersioncontrolBackend.php
--- includes/VersioncontrolBackend.php	10 Jan 2011 04:35:30 -0000	1.14
+++ includes/VersioncontrolBackend.php	11 Jan 2011 02:36:05 -0000
@@ -74,6 +74,7 @@ abstract class VersioncontrolBackend {
       'repo'      => 'VersioncontrolRepositoryController',
       'account'   => 'VersioncontrolAccountController',
       'operation' => 'VersioncontrolOperationController',
+      'commit'    => 'VersioncontrolCommitController',
       'item'      => 'VersioncontrolItemController',
       'branch'    => 'VersioncontrolBranchController',
       'tag'       => 'VersioncontrolTagController',
@@ -84,6 +85,7 @@ abstract class VersioncontrolBackend {
       'repo'      => 'VersioncontrolRepository',
       'account'   => 'VersioncontrolAccount',
       'operation' => 'VersioncontrolOperation',
+      'commit'    => 'VersioncontrolCommit',
       'item'      => 'VersioncontrolItem',
       'branch'    => 'VersioncontrolBranch',
       'tag'       => 'VersioncontrolTag',
Index: includes/VersioncontrolBranch.php
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/versioncontrol/includes/VersioncontrolBranch.php,v
retrieving revision 1.9
diff -u -p -r1.9 VersioncontrolBranch.php
--- includes/VersioncontrolBranch.php	27 Nov 2010 19:07:55 -0000	1.9
+++ includes/VersioncontrolBranch.php	11 Jan 2011 02:36:05 -0000
@@ -64,7 +64,7 @@ class VersioncontrolBranch extends Versi
    */
   public function loadCommits($ids = array(), $conditions = array(), $options = array()) {
     $conditions['branches'] = array($this->label_id);
-    return $this->backend->loadEntities('operation', $ids, $conditions, $options);
+    return $this->backend->loadEntities('commit', $ids, $conditions, $options);
   }
 
   public function update($options = array()) {
Index: includes/VersioncontrolItem.php
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/versioncontrol/includes/VersioncontrolItem.php,v
retrieving revision 1.14
diff -u -p -r1.14 VersioncontrolItem.php
--- includes/VersioncontrolItem.php	3 Dec 2010 08:44:58 -0000	1.14
+++ includes/VersioncontrolItem.php	11 Jan 2011 02:36:05 -0000
@@ -164,7 +164,7 @@ abstract class VersioncontrolItem extend
    *   sorted in reverse chronological order, so the newest revision
    *   comes first. Each element has its (file-level) item revision as
    *   key, and a standard item object (as the ones retrieved by
-   *   VersioncontrolOperation::getItems()) as value. All items except
+   *   VersioncontrolCommit::getItems()) as value. All items except
    *   for the oldest one will also have the 'action' and 'source_items'
    *   properties filled in, the oldest item might or might not have
    *   them. (If they exist for the oldest item, 'action' will be
@@ -305,7 +305,7 @@ abstract class VersioncontrolItem extend
    *
    * When first retrieving an item, the selected label is initialized
    * with a sensible value - for example,
-   * VersioncontrolOperation::getItems() assigns the affected branch or
+   * VersioncontrolCommit::getItems() assigns the affected branch or
    * tag of that operation to all the items. (This is especially
    * important for version control systems like Subversion where there is
    * a need to specify the label per item and not per operation, as a
@@ -335,6 +335,7 @@ abstract class VersioncontrolItem extend
     // label.
     switch ($this->selected_label->get_from) {
     case 'operation':
+    case 'commit':
       $selected_label = $this->selected_label->operation->getSelectedLabel($this);
       break;
     case 'other_item':
Index: includes/VersioncontrolOperation.php
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/versioncontrol/includes/VersioncontrolOperation.php,v
retrieving revision 1.18
diff -u -p -r1.18 VersioncontrolOperation.php
--- includes/VersioncontrolOperation.php	3 Jan 2011 16:09:19 -0000	1.18
+++ includes/VersioncontrolOperation.php	11 Jan 2011 02:36:05 -0000
@@ -178,7 +178,7 @@ abstract class VersioncontrolOperation e
   public function insert($options = array()) {
     if (!empty($this->vc_op_id)) {
       // This is supposed to be a new commit, but has a vc_op_id already.
-      throw new Exception('Attempted to insert a Versioncontrol commit which is already present in the database.', E_ERROR);
+      throw new Exception('Attempted to insert a Versioncontrol operation which is already present in the database.', E_ERROR);
     }
 
     // Append default options.
@@ -201,7 +201,7 @@ abstract class VersioncontrolOperation e
     $this->backendInsert($options);
 
     // Everything's done, invoke the hook.
-    module_invoke_all('versioncontrol_entity_commit_insert', $this);
+    module_invoke_all('versioncontrol_entity_operation_insert', $this);
     return $this;
   }
 
@@ -217,7 +217,7 @@ abstract class VersioncontrolOperation e
   public function update($options = array()) {
     if (empty($this->vc_op_id)) {
       // This is supposed to be an existing branch, but has no vc_op_id.
-      throw new Exception('Attempted to update a Versioncontrol commit which has not yet been inserted in the database.', E_ERROR);
+      throw new Exception('Attempted to update a Versioncontrol operation which has not yet been inserted in the database.', E_ERROR);
     }
 
     // Append default options.
@@ -240,7 +240,7 @@ abstract class VersioncontrolOperation e
     $this->backendUpdate($options);
 
     // Everything's done, invoke the hook.
-    module_invoke_all('versioncontrol_entity_commit_update', $this);
+    module_invoke_all('versioncontrol_entity_operation_update', $this);
     return $this;
   }
 
@@ -300,7 +300,7 @@ abstract class VersioncontrolOperation e
 
     $this->backendDelete($options);
 
-    module_invoke_all('versioncontrol_entity_commit_delete', $this);
+    module_invoke_all('versioncontrol_entity_operation_delete', $this);
   }
 
   protected function deleteNested($options) {
Index: includes/VersioncontrolRepository.php
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/versioncontrol/includes/VersioncontrolRepository.php,v
retrieving revision 1.26
diff -u -p -r1.26 VersioncontrolRepository.php
--- includes/VersioncontrolRepository.php	5 Jan 2011 05:39:21 -0000	1.26
+++ includes/VersioncontrolRepository.php	11 Jan 2011 02:36:05 -0000
@@ -224,7 +224,7 @@ abstract class VersioncontrolRepository 
   public function loadCommits($ids = array(), $conditions = array(), $options = array()) {
     $conditions['type'] = VERSIONCONTROL_OPERATION_COMMIT;
     $conditions['repo_id'] = $this->repo_id;
-    return $this->backend->loadEntities('operation', $ids, $conditions, $options);
+    return $this->backend->loadEntities('commit', $ids, $conditions, $options);
   }
 
   /**
Index: includes/controllers.inc
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/versioncontrol/includes/controllers.inc,v
retrieving revision 1.21
diff -u -p -r1.21 controllers.inc
--- includes/controllers.inc	5 Jan 2011 05:39:21 -0000	1.21
+++ includes/controllers.inc	11 Jan 2011 02:36:05 -0000
@@ -505,6 +505,71 @@ class VersioncontrolOperationController 
   }
 }
 
+class VersioncontrolCommitController extends VersioncontrolEntityController {
+  protected $entityType = 'commit';
+  protected $baseTable = 'versioncontrol_operations';
+  protected $idKey = 'vc_op_id';
+
+  protected function buildQueryConditions(&$query, $ids, $conditions) {
+    // Attach conditions, starting with any IDs that were passed in.
+    if ($ids) {
+      $query->condition("base.{$this->idKey}", $ids, 'IN');
+    }
+
+    // The conditions passed in for Operations have special composition, and
+    // require their own handling.
+    foreach ($conditions as $type => $value) {
+      switch ($type) {
+        case 'vcs':
+          $this->attachCondition($query, $type, $value, $this->addRepositoriesTable($query));
+          break;
+
+        case 'branches':
+        case 'tags':
+          $this->attachCondition($query, 'label_id', $value, $this->addLabelsTable($query));
+          break;
+
+        default:
+          $this->attachCondition($query, $type, $value);
+      }
+    }
+  }
+
+  protected function addLabelsTable(&$query) {
+    return $this->addTable($query, 'versioncontrol_operation_labels', 'vcol', "vcol.vc_op_id = base.vc_op_id");
+  }
+
+  /**
+   * Attach a list of all associated labels to each operation in the set of
+   * commits being loaded.
+   *
+   * @param array $queried_entities
+   */
+  protected function extendData(&$queried_entities) {
+    parent::extendData($queried_entities);
+    $query = db_select('versioncontrol_operations', 'vco');
+    $query->join('versioncontrol_operation_labels', 'vcol', 'vco.vc_op_id = vcol.vc_op_id');
+    $query->join('versioncontrol_labels', 'vcl', 'vcol.label_id = vcl.label_id');
+    $query->fields('vco', array('vc_op_id'))
+      ->fields('vcol', array('action'))
+      ->fields('vcl'); // add all the label fields
+    // build the constraint list
+    $commit_ids = array();
+    foreach ($queried_entities as $entity_data) {
+      $commit_ids[] = $entity_data->vc_op_id;
+    }
+    $result = $query->condition('vco.vc_op_id', $commit_ids)
+      ->execute();
+
+    // Attach each label to the labels array on the respective commit data.
+    foreach ($result as $label) {
+      $label->repository = $this->options['repository'];
+      $queried_entities[$label->vc_op_id]->labels[$label->name] = $this->backend
+        ->buildEntity($label->type === VERSIONCONTROL_LABEL_BRANCH ? 'branch' : 'tag', $label);
+    }
+  }
+}
+
 class VersioncontrolItemController extends VersioncontrolEntityController {
   protected $entityType = 'item';
   protected $baseTable = 'versioncontrol_item_revisions';
Index: includes/interfaces.inc
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/versioncontrol/includes/interfaces.inc,v
retrieving revision 1.6
diff -u -p -r1.6 interfaces.inc
--- includes/interfaces.inc	3 Jan 2011 16:09:19 -0000	1.6
+++ includes/interfaces.inc	11 Jan 2011 02:36:05 -0000
@@ -183,26 +183,26 @@ interface VersioncontrolRepositoryGetIte
 
 interface VersioncontrolUserMapperInterface {
   /**
-   * Map the author of the passed VersioncontrolOperation object to a Drupal
+   * Map the author of the passed VersioncontrolCommit object to a Drupal
    * uid, or FALSE if no uid mapping could be made.
    *
-   * @param VersioncontrolOperation $commit
+   * @param VersioncontrolCommit $commit
    *   The commit to be mapped.
    * @return mixed
    *   Either a uid (int), or FALSE if the mapping failed.
    */
-  public function mapAuthor(VersioncontrolOperation $commit);
+  public function mapAuthor(VersioncontrolCommit $commit);
 
   /**
-   * Map the committer of the passed VersioncontrolOperation object to a Drupal
+   * Map the committer of the passed VersioncontrolCommit object to a Drupal
    * uid, or FALSE if no uid mapping could be made.
    *
-   * @param VersioncontrolOperation $commit
+   * @param VersioncontrolCommit $commit
    *   The commit to be mapped.
    * @return mixed
    *   Either a uid (int), or FALSE if the mapping failed.
    */
-  public function mapCommitter(VersioncontrolOperation $commit);
+  public function mapCommitter(VersioncontrolCommit $commit);
 }
 
 interface VersioncontrolAuthHandlerInterface {
Index: includes/plugins/user_mapping_methods/VersioncontrolUserMapperSimpleMail.class.php
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/versioncontrol/includes/plugins/user_mapping_methods/VersioncontrolUserMapperSimpleMail.class.php,v
retrieving revision 1.2
diff -u -p -r1.2 VersioncontrolUserMapperSimpleMail.class.php
--- includes/plugins/user_mapping_methods/VersioncontrolUserMapperSimpleMail.class.php	4 Dec 2010 17:32:03 -0000	1.2
+++ includes/plugins/user_mapping_methods/VersioncontrolUserMapperSimpleMail.class.php	11 Jan 2011 02:36:05 -0000
@@ -7,11 +7,11 @@
  * does no checking to ensure they're good.
  */
 class VersioncontrolUserMapperSimpleMail implements VersioncontrolUserMapperInterface {
-  public function mapAuthor(VersioncontrolOperation $commit) {
+  public function mapAuthor(VersioncontrolCommit $commit) {
     return $this->map($commit->author);
   }
 
-  public function mapCommitter(VersioncontrolOperation $commit) {
+  public function mapCommitter(VersioncontrolCommit $commit) {
     return $this->map($commit->committer);
   }
 
Index: tests/VersioncontrolBackendTests.test
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/versioncontrol/tests/VersioncontrolBackendTests.test,v
retrieving revision 1.6
diff -u -p -r1.6 VersioncontrolBackendTests.test
--- tests/VersioncontrolBackendTests.test	3 Jan 2011 16:09:20 -0000	1.6
+++ tests/VersioncontrolBackendTests.test	11 Jan 2011 02:36:05 -0000
@@ -31,7 +31,7 @@ class VersioncontrolBackendBaseUnitTest 
     // As soon as the backend is initialized, the base class should have a bunch
     // of classes declared on it and available for factory operations. Check.
     // This also has the effect of ensuring autoload declarations are in place.
-    $types = array('repo', 'operation', 'item', 'branch', 'tag');
+    $types = array('repo', 'operation', 'commit', 'item', 'branch', 'tag');
     foreach ($this->backends as $backend) { // Iterate over all available backends.
       foreach ($types as $type) { // Iterate over each entity type.
         $this->assertTrue(isset($backend->classesEntities[$type]), "$backend->name backend declares an entity class for type '$type'", 'PHP');
Index: tests/VersioncontrolItemUnitTestingTestCase.test
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/versioncontrol/tests/VersioncontrolItemUnitTestingTestCase.test,v
retrieving revision 1.1
diff -u -p -r1.1 VersioncontrolItemUnitTestingTestCase.test
--- tests/VersioncontrolItemUnitTestingTestCase.test	17 Dec 2010 08:45:55 -0000	1.1
+++ tests/VersioncontrolItemUnitTestingTestCase.test	11 Jan 2011 02:36:05 -0000
@@ -33,9 +33,9 @@ class VersioncontrolItemUnitTestingTestC
   public function testCreation() {
     // Build and insert.
     $repo = $this->versioncontrolCreateRepository('test');
-    $operation = $this->versioncontrolCreateOperation('test');
+    $commit = $this->versioncontrolCreateCommit('test');
     $data = array(
-      'vc_op_id' => $operation->vc_op_id,
+      'vc_op_id' => $commit->vc_op_id,
       'path' => '/fake/path/to/file',
       'revision' => $this->randomName(4),
       'type' => VERSIONCONTROL_ITEM_FILE,
Index: tests/VersioncontrolTestCase.test
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/versioncontrol/tests/VersioncontrolTestCase.test,v
retrieving revision 1.7
diff -u -p -r1.7 VersioncontrolTestCase.test
--- tests/VersioncontrolTestCase.test	3 Jan 2011 16:09:20 -0000	1.7
+++ tests/VersioncontrolTestCase.test	11 Jan 2011 02:36:05 -0000
@@ -238,6 +238,39 @@ abstract class VersioncontrolTestCase ex
     return $operation;
   }
 
+  public function versioncontrolCreateCommit($backend_name = 'test', $data = array(), $insert=TRUE) {
+    static $i = 0;
+    $name = $this->randomName(7);
+    $default_data = array(
+      'type' => VERSIONCONTROL_OPERATION_COMMIT,
+      'date' => time(),
+      'author' => $name,
+      'author_uid' => 0,
+      'committer' => $name,
+      'committer_uid' => 0,
+      'revision' => ++$i,
+      'message' => $this->randomString(20),
+      'labels' => array(),
+      'itemRevisions' => array(),
+    );
+    $data += $default_data;
+
+    $backend = $this->backends[$backend_name];
+    if (!isset($data['repo_id'])) {
+      if (!isset($data['repository']) || !is_subclass_of($data['repository'], 'VersioncontrolRepository')) {
+        $repo = $this->versioncontrolCreateRepository($backend_name);
+        $data['repo_id'] = $repo->repo_id;
+      }
+    }
+    $commit = $backend->buildEntity('commit', $data);
+    if ($insert) {
+      $commit->insert();
+      $this->assertTrue(isset($commit->vc_op_id) && is_numeric($commit->vc_op_id), t('VersioncontrolCommit::insert() properly populates a new repository object with an integer vc_op_id.'));
+    }
+
+    return $commit;
+  }
+
   public function versioncontrolCreateItem($backend_name = 'test', $data = array(), $insert=TRUE) {
     static $i = 0;
     $default_data = array(
