Index: wp-includes/revision.php
===================================================================
--- wp-includes/revision.php	(revision 23834)
+++ wp-includes/revision.php	(working copy)
@@ -514,44 +514,42 @@
 	if ( ! $post )
 		return false;
 
-	//make sure we have a current revision, only adds one if missing
-	wp_save_post_revision( $post->ID );
-
 	if ( ! post_type_supports( $post->post_type, 'revisions' ) )
 		return false;
 
 	$revisions = wp_get_post_revisions( $post->ID ); // array( 'order' => 'DESC', 'orderby' => 'date' ); // Always work from most recent to oldest
 
+	if ( ! $first = reset( $revisions ) )
+		return true;
 
-	if ( ! $revisions )
+	// Check if the revisions have already been updated
+	if ( preg_match( '/^\d+-(?:autosave|revision)-v\d+$/', $first->post_name ) )
 		return true;
 
 	// Add post option exclusively
 	$lock      = "revision-upgrade-{$post->ID}";
-	$locked_at = number_format( microtime( true ), 10, '.', '' );
-	$result = $wpdb->query( $wpdb->prepare( "INSERT IGNORE INTO `$wpdb->options` (`option_name`, `option_value`, `autoload`) VALUES (%s, %s, 'no') /* LOCK */", $lock, $locked_at ) );
+	$now = number_format( microtime( true ), 10, '.', '' );
+	$result = $wpdb->query( $wpdb->prepare( "INSERT IGNORE INTO `$wpdb->options` (`option_name`, `option_value`, `autoload`) VALUES (%s, %s, 'no') /* LOCK */", $lock, $now ) );
 	if ( ! $result ) {
 		// If we couldn't get a lock, see how old the previous lock is
-		$locked_at = get_option( $lock );
-		if ( !$locked_at ) {
+		$locked = get_option( $lock );
+		if ( ! $locked ) {
 			// Can't write to the lock, and can't read the lock.
 			// Something broken has happened
 			return false;
 		}
 
-		if ( $lock_at < number_format( microtime( true ), 10, '.', '' ) - 3600 ) {
-			// Lock is too old - try again
-			delete_option( $lock );
-			return wp_upgrade_revisions_of_post( $post );
+		if ( $locked > $now - 3600 ) {
+			// Lock is not too old: some other process may be upgrading this post.  Bail.
+			return false;
 		}
 
-		// Lock is not too old: some other process may be upgrading this post.  Bail.
-		return;
-	} else {
-		// If we could get a lock, re-"add" the option to fire all the correct filters.
-		add_option( $lock, $locked_at );
+		// Lock is too old - update it (below) and continue
 	}
 
+	// If we could get a lock, re-"add" the option to fire all the correct filters.
+	update_option( $lock, $now );
+
 	$success = true;
 
 	reset( $revisions );
@@ -571,30 +569,28 @@
 		if ( 0 < $this_revision_version )
 			continue;
 
-		// This revision is the oldest revision of the post.
-		// The correct post_author is probably $post->post_author, but that's only a good guess.
-		// Leave un-upgraded.
-		if ( ! $prev_revision ) {
-			continue;
-		}
+		// Always update the revision version
+		$update = array(
+			'post_name' => preg_replace( '/^(\d+-(?:autosave|revision))[\d-]*$/', '$1-v1', $this_revision->post_name ),
+		);
 
-		$prev_revision_version = _wp_get_post_revision_version( $prev_revision );
+		// If this revision is the oldest revision of the post, i.e. no $prev_revision,
+		// the correct post_author is probably $post->post_author, but that's only a good guess.
+		// Update the revision version only and Leave the author as-is
+		if ( $prev_revision ) {
+			$prev_revision_version = _wp_get_post_revision_version( $prev_revision );
 
-		// If the previous revision is already up to date, it no longer has the information we need :(
-		if ( 0 < $prev_revision_version ) {
-			continue;
+			// If the previous revision is already up to date, it no longer has the information we need :(
+			if ( $prev_revision_version < 1 )
+				$update['post_author'] = $prev_revision->post_author;
 		}
 
 		// Upgrade this revision
-		// Cast as object so that wp_update_post() handles slashing for us
-		$update = (object) array(
-			'ID'          => $this_revision->ID,
-			'post_name'   => preg_replace( '/^(\d+-)(autosave|revision)-(\d+)$/', '$1$2-v1', $this_revision->post_name ),
-			'post_author' => $prev_revision->post_author,
-		);
-		//error_log(json_encode($update));
-		$result = wp_update_post( $update );
-		if ( ! $result || is_wp_error( $result ) ) {
+		$result = $wpdb->update( $wpdb->posts, $update, array( 'ID' => $this_revision->ID ) );
+
+		if ( $result ) {
+			wp_cache_delete( $this_revision->ID, 'posts' );
+		} else {
 			// Wilhelm!
 			$success = false;
 			break;
@@ -602,7 +598,7 @@
 	} while ( $prev_revision );
 
 	delete_option( $lock );
-	return true;
+	return $success;
 }
 
 
