How to disable Create new revision option in a node programmatically I am trying to disable the 'Create new revision option' in each existing nodes programmatically.
I tried with below codes but it was not working.

$results = db_select('node', 'n')
-&gt;fields('n', array('nid','vid'))
-&gt;execute();
foreach ($results as $result) {
$node = node_load($result-&gt;nid);
// Disabling the Create new revision option
$node-&gt;revision = FALSE;
node_save($node);
}


Can anyone help me on this? Thanks.
Code you have mentioned in your question solves the problem of create new revision or just update with out a new revision when a node is updated programatically in that particular instance.. It has nothing to do with form option in node edit page... 

When you do $node-&gt;revision = FALSE;

It is just like telling to node your are updating should be saved as a new revision or not when a node is updated at that particular instance of node_save...

Use hook_form_alter to disable this option in node edit page form..

in your custom module implement MODULE_form_alter and check for node id's you want to disable this option..

$form['revision_information']['#access'] = FALSE;


OR

$form['revision_information']['#disabled'] = TRUE;