source: branches/testScripts/NBsvnCommand.py @ 630

Last change on this file since 630 was 630, checked in by jpfasano, 12 years ago

Moved code that runs an svn command from nightlyBuild.py to its own file.

  • Property svn:executable set to *
File size: 745 bytes
Line 
1#! /usr/bin/env python
2
3import os
4
5import NBlogMessages
6import NBemail
7import NBosCommand
8
9#------------------------------------------------------------------------
10# Function for executing svn commands
11#  svnCmd: String representing svn command
12#  dir: Directory where command is to be run from
13#  project: Coin project running the command (this is used to provide
14#           a better message if an error is detected
15#------------------------------------------------------------------------
16def run(svnCmd,dir,project) :
17  retVal='OK'
18  os.chdir(dir)
19  NBlogMessages.writeMessage('  '+svnCmd)
20  result = NBosCommand.run(svnCmd)
21  if result['returnCode'] != 0 :
22    NBemail.sendCmdMsgs(project,result,svnCmd)
23    retVal='Error'
24  return retVal
Note: See TracBrowser for help on using the repository browser.