Edit old revision without changing the current revision I'm using revisions to keep a public archive of changes in my nodes. Is it possible for me to edit an old revision of a node (both the message and the fields) directly, and not change the current revision? Basically, what I'm trying to do is what the User Revision Edit module does, but for nodes.

So far, in my custom module, I have something like this (notice that I'm also using the Revisioning module):

/**
 * Implements hook_menu().
 */
function node_revision_edit_menu() {
  $items['node/%node/revisions/%vid/modify'] = array(
    'title' =&gt; 'Modify this revision',
    'load arguments' =&gt; array(3),
    'page callback' =&gt; 'drupal_get_form',
    'page arguments' =&gt; array('node_revision_edit_form', 1, 3),
    'access callback' =&gt; '_node_revision_edit_link_access',
    'access arguments' =&gt; array('modify revisions'),
    'file' =&gt; 'node_revision_edit.admin.inc',
  );
  return $items;
}


and the essence of the logic that I'm trying to apply:

function node_revision_edit_form($form, &amp;$form_state, $node, $vid) {

  // Prepare loading the node edit form
  form_load_include($form_state, 'inc', 'node', 'node.pages');

  // Populate the form state.
  $form_state += form_state_defaults();

  // Save the form id for the current content type.
  $nfid = $node-&gt;type . '_node_form';

  // Rebuild the entire user edit form for our needs
  $form = drupal_retrieve_form($nfid, $form_state);
  drupal_prepare_form($nfid, $form, $form_state);

  // Setup the already existing log in the field
  $form['revision_information']['log']['#default_value'] = node_revision_list($node)[$vid]-&gt;log;

  // Set the "Modify current revision, no moderation" as the default revision operation
  $form['revision_information']['revision_operation']['#default_value'] = 0;

  // Unset the options that we do not need
  // unset($form['options']);

  // Create a new submit button since we do not want to invoke the standard callback functions
  unset($form['#submit']);
  $form['#submit'] = array('node_revision_edit_form_submit');


My problem is that I have no idea as to where to go from here. I obviously can't use node_save since it automatically handles revisions. Any ideas on what my next step should be? Is there a function that I'm missing and could be useful for my problem? Or will I have to go for direct database edits?

Any feedback is greatly appreciated.
I'm afraid that not even _node_save_revision allows that. Revisions were designed to keep old stuff archived and unchanged. Of course sometimes we need to violate that principle for the sake of moderation.

You will have to smartly adapt piece from above function:

$node-&gt;uid = $uid; // Make sure revision's author stays unchanged
drupal_write_record('node_revision', $node, $update);


I don't have time to experiment with it, but I'm sure you will find out pretty easily. 

Carefully consider if you want to also call

module_invoke_all('node_presave', $node);
module_invoke_all('entity_presave', $node, 'node');


before save, and

module_invoke_all('node_' . $op, $node);
module_invoke_all('entity_' . $op, $node, 'node');


after save. Probably you don't, but it depends - some modules may use revision data for search or other purposes.

Last but not least: I must admit I have no idea how field_attach_update handles field revisions.