--- node.inc.orig	2009-09-01 16:12:03.000000000 -0400
+++ node.inc.update	2009-09-01 16:25:36.000000000 -0400
@@ -56,14 +56,21 @@ function node_import_create_node($type, 
       'values' => $values,
     );
 
+    if (isset($values['nid'])) {
+      $node = node_load($values['nid']);
+    } else {
     $node = (object)array(
       'type' => $node_type,
       'name' => isset($values['name']) ? $values['name'] : '',
     );
+    }
     node_import_drupal_execute($form_id, $form_state, $node);
 
     if ($preview) {
       $output = isset($form_state['node_preview']) ? $form_state['node_preview'] : '';
+      if ($values['nid']) {
+        $output .= t("Existing node found (ID @nid)", array("@nid" => $values['nid']));
+      }
     }
     else {
       $output = $values['nid'] = $form_state['nid'];
@@ -175,6 +182,14 @@ function node_node_import_fields($type) 
         'default_value' => in_array($key, $node_options) ? '1' : '0',
       );
     }
+
+    $fields['nid'] = array(
+      'title' => t('Existing Node ID'),
+      'module' => 'node',
+      'weight' => -1,
+      'group' => t('Publishing options'),
+      'is_mappable' => $administer_nodes,
+    );
   }
 
   return $fields;
@@ -191,6 +206,12 @@ function node_node_import_defaults($type
 
     $type_info = node_get_types('type', $node_type);
 
+    $form['nid'] = array(
+      '#title' => t('Existing Node ID'),
+      '#type' => 'textfield',
+      '#maxlength' => '10',
+    );
+
     if ($type_info->has_body) {
       $form['format'] = array(
         '#title' => t('Input format'),
@@ -275,5 +296,17 @@ function node_node_import_values_alter(&
     if (isset($values['created']) && drupal_strlen($values['created']) > 0) {
       $values['date'] = format_date($values['created'], 'custom', 'Y-m-d H:i:s O');
     }
+ 
+    if (isset($values['nid'])) {
+      $nid = $values['nid'];
+      $nid_value = $values[$nid];
+      if (isset($nid_value)) {
+        $row = db_fetch_array(db_query('SELECT nid, vid FROM {node} WHERE nid = "%d" LIMIT 1', $key_value));
+        if (!empty($row)) {
+          $values['nid'] = $row['nid'];
+          $values['vid'] = $row['vid'];
+        }
+      }
+    }
   }
 }
