From 3f9c2979ce886c6d23578eed4776b7d73fb1b10a Mon Sep 17 00:00:00 2001 From: John Southworth Date: Thu, 30 Jun 2011 19:35:16 -0500 Subject: Bugfix 7224: check nodes immediate children for changes when the node its self is unchanged. If a child has changed run the commit check for the node --- src/commit/commit-algorithm.cpp | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/commit/commit-algorithm.cpp b/src/commit/commit-algorithm.cpp index 5f77dfb..687e2df 100644 --- a/src/commit/commit-algorithm.cpp +++ b/src/commit/commit-algorithm.cpp @@ -509,8 +509,20 @@ _commit_check_cfg_node(Cstore& cs, CfgNode *node, CommittedPathListT& clist) for (size_t i = 0; i < nodelist.size(); i++) { CommitState s = nodelist[i]->getCommitState(); if (s == COMMIT_STATE_UNCHANGED) { - // nop - continue; + // check if an immediate child node has changed. + // if so do the syntax act here + // This puts back the pre-larkspur behavior that features expect to happen. + vector childNodes; + childNodes = nodelist[i]->getChildNodes(); + for (size_t j = 0; j < childNodes.size(); j++){ + if (childNodes[j]->getCommitState() != COMMIT_STATE_UNCHANGED) { + if (!_exec_node_actions(cs, *(nodelist[i]), syntax_act)) { + return false; + } + break; // break out of the inner for loop + } + } + continue; //continue the outer for loop } _set_commit_subtree_changed(*(nodelist[i])); -- cgit v1.2.3