javascript - npm svn-interface node programming- multiple method piping -
i'm writing process using npm svn-interface.
i have file want to:
- add svn
- commit svn (with message)
update directory svn.
// check file svn svn.add(tmp, options, function(){ // do here? }); options.message = "adding test version svn"; svn.commit(tmp, options, function(){ // do here? }); svn.update(tmp, options, function(){ // do here? });
when run above, file gets added, not committed.
what can make these command play nicely, , in order?
update
ok, tried code below, still, first task run:
// array hold async tasks var asynctasks = []; asynctasks.push(function(callback){ // call async function, save() db svn.add(testfile, options, callback); }); asynctasks.push(function(callback){ options.message = "adding test version svn"; svn.commit(testfile, options, callback); }); asynctasks.push(function(callback){ options.message = "adding test version svn"; svn.update(testfile, options, callback); }); async.parallel(asynctasks, function(){ // tasks done console.log('finished'); });
Comments
Post a Comment