Index: modules/node/node.pages.inc
===================================================================
RCS file: /cvs/drupal/drupal/modules/node/node.pages.inc,v
retrieving revision 1.55
diff -u -p -r1.55 node.pages.inc
--- modules/node/node.pages.inc	13 Feb 2009 02:22:09 -0000	1.55
+++ modules/node/node.pages.inc	7 Mar 2009 23:08:44 -0000
@@ -163,11 +163,18 @@ function node_form(&$form_state, $node) 
       '#title' => t('Create new revision'),
       '#default_value' => $node->revision,
     );
+    if ($form_state['submitted'] == TRUE) {
+      $revlogmessage = $node->log;
+    }
+    else {
+      $revlogmessage = '';
+    }
     $form['revision_information']['log'] = array(
       '#type' => 'textarea',
       '#title' => t('Revision log message'),
       '#rows' => 2,
       '#description' => t('Provide an explanation of the changes you are making. This will help other authors understand your motivations.'),
+      '#default_value' => $revlogmessage,
     );
   }
 
Index: modules/node/node.test
===================================================================
RCS file: /cvs/drupal/drupal/modules/node/node.test,v
retrieving revision 1.16
diff -u -p -r1.16 node.test
--- modules/node/node.test	28 Jan 2009 07:34:30 -0000	1.16
+++ modules/node/node.test	7 Mar 2009 23:08:44 -0000
@@ -377,6 +377,9 @@ class PagePreviewTestCase extends Drupal
   function setUp() {
     parent::setUp();
 
+    $node_options_page = variable_get('node_options_page', array('status', 'promote'));
+    $node_options_page[] = 'revision';
+    variable_set('node_options_page', $node_options_page);
     $web_user = $this->drupalCreateUser(array('edit own page content', 'create page content'));
     $this->drupalLogin($web_user);
   }
@@ -389,6 +392,7 @@ class PagePreviewTestCase extends Drupal
     $edit = array();
     $edit['title'] = $this->randomName(8);
     $edit['body'] = $this->randomName(16);
+    $edit['log'] = $this->randomName(12);
     $this->drupalPost('node/add/page', $edit, t('Preview'));
 
     // Check that the preview is displaying the title and body.
@@ -398,7 +402,27 @@ class PagePreviewTestCase extends Drupal
 
     // Check that the title and body fields are displayed with the correct values.
     $this->assertFieldByName('title', $edit['title'], t('Title field displayed.'));
+    // When we preview a node without javascript with only the body set and the
+    // teaser empty, Drupal will insert a <!--break--> tag for the javascript
+    // to split or join the text into a teaser and a body. However, with
+    // javascript disabled, such as in SimpleTest, no javascript is available
+    // to parse out the <!--break--> comment tag, so it is left there in the
+    // edit body field, which will show up as the default value for that field
+    // after preview.
     $this->assertFieldByName('body', '<!--break-->' . $edit['body'], t('Body field displayed.'));
+
+    // Make sure that upon submission, the node has the proper properties.
+    $this->drupalPost(NULL, array(), t('Save'));
+    $node = $this->drupalGetNodeByTitle($edit['title']);
+    $this->assertEqual($node->title, $edit['title'], t('Correct title saved to the node.'));
+    file_put_contents('/tmp/test.txt', $edit['body'] . "\n\n" . $node->body);
+    // Now, our node body field already had a single break in it after preview,
+    // but now the teaser is still empty, so another <!--break--> tag is
+    // inserted between the empty teaser and the body, with Drupal expecting
+    // the javascript to parse out the <!--break--> again. This leaves us with
+    // a double <!--break--> in the node body field.
+    $this->assertEqual($node->body, '<!--break--><!--break-->' . $edit['body'], t('Correct body saved to the node.'));
+    $this->assertEqual($node->log, $edit['log'], t('Correct log message saved to the node.'));
   }
 }
