function(user, identifier, comment, out, cb) {
    logger.info('commit system: ' + identifier);
    var systemId = _sr.findSystem(identifier);

    _sr.commitRevision(user, systemId, comment, function(err, revisionId) {
      _sr.getDeployedTargets(systemId, function(err, targets) {
        if (targets) {
          async.eachSeries(targets, function(target, next) {
            if (target.commit === 'edits') {
              _sr.markDeployedRevision(user, systemId, revisionId, target.env, function() {
                next();
              });
            }
            else {
              next();
            }
          }, function() { 
            cb(err, revisionId); 
          });
        }
        else {
          cb(err, revisionId);
        }
      });
    });
  }
function(user, identifier, comment, out, cb) {
    logger.info('commit system: ' + identifier);
    var systemId = _sr.findSystem(identifier);

    _sr.commitRevision(user, systemId, comment, function(err, revisionId) {
      _sr.getDeployedTargets(systemId, function(err, targets) {
        if (targets) {
          async.eachSeries(targets, function(target, next) {
            if (target.commit === 'edits') {
              _sr.markDeployedRevision(user, systemId, revisionId, target.env, function() {
                next();
              });
            }
            else {
              next();
            }
          }, function() { 
            cb(err, revisionId); 
          });
        }
        else {
          cb(err, revisionId);
        }
      });
    });
  }
function ( user , identifier , comment , out , cb ) { logger . info ( 'commit system: ' + identifier ) ; var systemId = _sr . findSystem ( identifier ) ; _sr . commitRevision ( user , systemId , comment , function ( err , revisionId ) { _sr . getDeployedTargets ( systemId , function ( err , targets ) { if ( targets ) { async . eachSeries ( targets , function ( target , next ) { if ( target . commit === 'edits' ) { _sr . markDeployedRevision ( user , systemId , revisionId , target . env , function ( ) { next ( ) ; } ) ; } else { next ( ) ; } } , function ( ) { cb ( err , revisionId ) ; } ) ; } else { cb ( err , revisionId ) ; } } ) ; } ) ; }
commit the system
commit the system