Index: wp-admin/includes/post.php
===================================================================
--- wp-admin/includes/post.php	(revision 23883)
+++ wp-admin/includes/post.php	(working copy)
@@ -1279,15 +1279,24 @@
 		$new_autosave['ID'] = $old_autosave->ID;
 		$new_autosave['post_author'] = $post_author;
 
-		// Auto-save revisioned meta fields too.
-		foreach ( _wp_post_revision_meta_keys() as $meta_key ) {
-			if ( ! isset( $_POST[ $meta_key ] ) )
-				continue;
+		// Auto-save revisioned meta fields.
+		if ( ! empty( $_POST['post_format'] ) && in_array( $_POST['post_format'], array_keys( get_post_format_strings() ) ) ) {
+			$post_format = $_POST['post_format'];
 
-			// Use the underlying delete_metadata and add_metadata vs delete_post_meta
-			// and add_post_meta to make sure we're working with the actual revision meta.
-			delete_metadata( 'post', $new_autosave['ID'], $meta_key );
-			add_metadata( 'post', $new_autosave['ID'], $meta_key, $_POST[ $meta_key ] );
+			if ( $meta_keys = _wp_post_revision_meta_keys( $post_format ) ) {
+				foreach ( $meta_keys as $meta_key ) {
+					// Don't add the meta if there is no data.
+					if ( empty( $_POST[ $meta_key ] ) )
+						continue;
+
+					// Use the underlying delete_metadata and add_metadata vs delete_post_meta
+					// and add_post_meta to make sure we're working with the actual revision meta.
+					delete_metadata( 'post', $new_autosave['ID'], $meta_key );
+					add_metadata( 'post', $new_autosave['ID'], $meta_key, $_POST[ $meta_key ] );
+				}
+			}
+			// Save the current post format as revision meta
+			add_metadata( 'post', $new_autosave['ID'], '_revision_format', $post_format );
 		}
 
 		return wp_update_post( $new_autosave );
Index: wp-includes/js/autosave.js
===================================================================
--- wp-includes/js/autosave.js	(revision 23883)
+++ wp-includes/js/autosave.js	(working copy)
@@ -292,7 +292,7 @@
 (function($){
 // Returns the data for saving in both localStorage and autosaves to the server
 wp.autosave.getPostData = function() {
-	var ed = typeof tinymce != 'undefined' ? tinymce.activeEditor : null, post_name, parent_id, cats = [],
+	var ed = typeof tinymce != 'undefined' ? tinymce.activeEditor : null, post_name, parent_id, post_format, cats = [],
 		data = {
 			action: 'autosave',
 			autosave: true,
@@ -351,6 +351,10 @@
 	if ( $('#auto_draft').val() == '1' )
 		data['auto_draft'] = '1';
 
+	post_format = $('.post-format-options a.active').attr('data-wp-format');
+	if ( post_format && post_format != 'standard' )
+		data['post_format'] = post_format;
+
 	return data;
 }
 
Index: wp-includes/post-formats.php
===================================================================
--- wp-includes/post-formats.php	(revision 23883)
+++ wp-includes/post-formats.php	(working copy)
@@ -51,7 +51,7 @@
  * @since 3.1.0
  *
  * @param int|object $post The post for which to assign a format
- * @param string $format  A format to assign. Use an empty string or array to remove all formats from the post.
+ * @param string $format  A format to assign. Empty or invalid value will remove the format from the post.
  * @return mixed WP_Error on error. Array of affected term IDs on success.
  */
 function set_post_format( $post, $format ) {
Index: wp-includes/revision.php
===================================================================
--- wp-includes/revision.php	(revision 23883)
+++ wp-includes/revision.php	(working copy)
@@ -67,16 +67,17 @@
  * @access private
  * @return array An array of meta keys that should be revisioned.
  */
-function _wp_post_revision_meta_keys() {
-	return array(
-		'_wp_format_url',
-		'_wp_format_quote',
-		'_wp_format_quote_source',
-		'_wp_format_image',
-		'_wp_format_gallery',
-		'_wp_format_audio',
-		'_wp_format_video',
+function _wp_post_revision_meta_keys( $post_format ) {
+	$keys = array(
+		'quote' => array( '_wp_format_quote', '_wp_format_quote_source', '_wp_format_url' ),
+		'link' => array( '_wp_format_url' ),
+		'image' => array( '_wp_format_image', '_wp_format_url' ),
+		'gallery' => array( '_wp_format_gallery' ),
+		'video' => array( '_wp_format_video' ),
+		'audio' => array( '_wp_format_audio' ),
 	);
+
+	return isset( $keys[ $post_format ] ) ? $keys[ $post_format ] : false;
 }
 
 /**
@@ -132,11 +133,13 @@
 				}
 			}
 
-			// Check whether revisioned meta fields have changed.
-			foreach ( _wp_post_revision_meta_keys() as $meta_key ) {
-				if ( get_post_meta( $post->ID, $meta_key ) != get_post_meta( $last_revision->ID, $meta_key ) ) {
-					$post_has_changed = true;
-					break;
+			// Check whether post format meta has changed.
+			if ( ! $post_has_changed && ( $post_format = get_post_format( $post ) ) && ( $meta_keys = _wp_post_revision_meta_keys( $post_format ) ) ) {
+				foreach ( $meta_keys as $meta_key ) {
+					if ( get_post_meta( $post->ID, $meta_key, true ) != get_post_meta( $last_revision->ID, $meta_key, true ) ) {
+						$post_has_changed = true;
+						break;
+					}
 				}
 			}
 
@@ -278,16 +281,24 @@
 	if ( $revision_id )
 		do_action( '_wp_put_post_revision', $revision_id );
 
-	// Save revisioned meta fields.
-	foreach ( _wp_post_revision_meta_keys() as $meta_key ) {
-		$meta_values = get_post_meta( $post_id, $meta_key );
-		if ( false === $meta_values )
-			continue;
+	// Save revisioned post formats meta.
+	if ( $post_format = get_post_format( $post_id ) ) {
+		if ( $meta_keys = _wp_post_revision_meta_keys( $post_format ) ) {
+			foreach ( $meta_keys as $meta_key ) {
+				// There can be only one meta field per $meta_key
+				$meta_value = get_post_meta( $post_id, $meta_key, true );
 
-		// Use the underlying add_metadata vs add_post_meta to make sure
-		// metadata is added to the revision post and not its parent.
-		foreach ( $meta_values as $meta_value )
-			add_metadata( 'post', $revision_id, $meta_key, $meta_value );
+				// Don't add the meta if there is no data.
+				if ( empty( $meta_value ) )
+					continue;
+
+				// Use the underlying add_metadata vs add_post_meta to make sure
+				// metadata is added to the revision post and not its parent.
+				add_metadata( 'post', $revision_id, $meta_key, $meta_value );
+			}
+		}
+		// Save the current post format as revision meta
+		add_metadata( 'post', $revision_id, '_revision_format', $post_format );
 	}
 
 	return $revision_id;
@@ -361,20 +372,8 @@
 		return false;
 
 	$update['ID'] = $revision['post_parent'];
-
 	$update = wp_slash( $update ); //since data is from db
 
-	// Restore revisioned meta fields.
-	foreach ( _wp_post_revision_meta_keys() as $meta_key ) {
-		delete_post_meta( $update['ID'], $meta_key );
-		$meta_values = get_post_meta( $revision['ID'], $meta_key );
-		if ( false === $meta_values )
-			continue;
-
-		foreach ( $meta_values as $meta_value )
-			add_post_meta( $update['ID'], $meta_key, $meta_value );
-	}
-
 	$post_id = wp_update_post( $update );
 	if ( is_wp_error( $post_id ) )
 		return $post_id;
@@ -382,11 +381,29 @@
 	if ( $post_id )
 		do_action( 'wp_restore_post_revision', $post_id, $revision['ID'] );
 
+	// Restore the post format
+	$post_format = get_post_meta( $revision['ID'], '_revision_format', true );
+	set_post_format( $post_id, $post_format );
+
+	// Restore revisioned post formats meta.
+	if ( $meta_keys = _wp_post_revision_meta_keys( $post_format ) ) {
+		foreach ( $meta_keys as $meta_key ) {
+			// There can be only one meta field per $meta_key
+			$meta_value = get_post_meta( $revision['ID'], $meta_key, true );
+
+			if ( empty( $meta_value ) )
+				continue;
+
+			update_post_meta( $post_id, $meta_key, $meta_value );
+		}
+	}
+
 	$restore_details = array(
 		'restored_revision_id' => $revision_id,
 		'restored_by_user' => get_current_user_id(),
 		'restored_time' => time()
 	);
+
 	update_post_meta( $post_id, '_post_restored_from', $restore_details );
 
 	return $post_id;
@@ -530,8 +547,17 @@
  */
 function _wp_preview_meta_filter( $value, $object_id, $meta_key, $single ) {
 	$post = get_post();
+	$meta_keys = array(
+		'_wp_format_url',
+		'_wp_format_quote',
+		'_wp_format_quote_source',
+		'_wp_format_image',
+		'_wp_format_gallery',
+		'_wp_format_audio',
+		'_wp_format_video'
+	);
 
-	if ( $post->ID != $object_id || ! in_array( $meta_key, _wp_post_revision_meta_keys() ) || 'revision' == $post->post_type )
+	if ( $post->ID != $object_id || ! in_array( $meta_key, $meta_keys ) || 'revision' == $post->post_type )
 		return $value;
 
 	$preview = wp_get_post_autosave( $post->ID );
