# Path: md/utilityFunctions.py
# def boolToStr(s):
# def downloadFile(URL, downloadDir):
# def executeCommand(command, args="", workingDirectory="", verbose=False, exitOnError=False):
# def executeSubProcess(command, workingDirectory=tempfile.gettempdir(), outFileHandle=1, verbose=False, exitOnError=False):
# def findFilesWithExtension(path, extension):
# def findShallowestFile(startPath, fileList):
# def getBasename(path):
# def haveWriteAccess(path):
# def isURL(url):
# def __pathExists(directory, basename):
# def pathExists(path, forceCaseSensitive=False):
# def prettyPrintList(list, header="", headerIndent="", itemIndent=""):
# def printErrorAndExit(errorStr, filePath="", lineNumber=0):
# def removeDir(path):
# def removeDuplicatesFromList(myList):
# def splitFileName(fileName):
# def stripItemsInList(value):
# def untar(tarPath, outPath="", stripDir=False):
# def unzip(zipPath, outPath="", stripDir=False):
# def URLToFilename(url):
# def hasTarFileExtension(path):
# def validateCompressedFile(path, logger=None):
# def setVariables(filename, variableList):
# def is_exe(fpath):
# def isInstalled(program):


import os, shutil, sys, tempfile
from md import utilityFunctions
    utilityFunctions.executeSubProcess("git commit -m message --quiet", repoPath)
    return repoPath

def createHgRepository(tempDir):
    repoPath = os.path.join(tempDir, "repo")
    os.mkdir(repoPath)
    utilityFunctions.executeSubProcess("hg init --quiet", repoPath)
    utilityFunctions.executeSubProcess("touch " + testFileName, repoPath)
    utilityFunctions.executeSubProcess("hg add --quiet " + testFileName, repoPath)
    utilityFunctions.executeSubProcess("hg commit -m message --quiet", repoPath)
    return repoPath

def createSvnRepository(tempDir):
    repoPath = os.path.join(tempDir, "repo")
    os.mkdir(repoPath)
    repoURL = "file://" + repoPath + "/trunk"
    projPath = os.path.join(tempDir, "project")
    os.mkdir(projPath)

    utilityFunctions.executeSubProcess("svnadmin create " + repoPath, tempDir)
    utilityFunctions.executeSubProcess("touch testFile", projPath)
    utilityFunctions.executeSubProcess("svn import --quiet --non-interactive " + projPath + " " + repoURL + " -m message", tempDir)
    return repoURL

def createBlankFile(path):
    dirName = os.path.dirname(os.path.abspath(path))
    if not os.path.exists(dirName):
        os.makedirs(dirName)
    open(path, 'w').close()


# Path: md/utilityFunctions.py
# def boolToStr(s):
# def downloadFile(URL, downloadDir):
# def executeCommand(command, args="", workingDirectory="", verbose=False, exitOnError=False):
# def executeSubProcess(command, workingDirectory=tempfile.gettempdir(), outFileHandle=1, verbose=False, exitOnError=False):
# def findFilesWithExtension(path, extension):
# def findShallowestFile(startPath, fileList):
# def getBasename(path):
# def haveWriteAccess(path):
# def isURL(url):
# def __pathExists(directory, basename):
# def pathExists(path, forceCaseSensitive=False):
# def prettyPrintList(list, header="", headerIndent="", itemIndent=""):
# def printErrorAndExit(errorStr, filePath="", lineNumber=0):
# def removeDir(path):
# def removeDuplicatesFromList(myList):
# def splitFileName(fileName):
# def stripItemsInList(value):
# def untar(tarPath, outPath="", stripDir=False):
# def unzip(zipPath, outPath="", stripDir=False):
# def URLToFilename(url):
# def hasTarFileExtension(path):
# def validateCompressedFile(path, logger=None):
# def setVariables(filename, variableList):
# def is_exe(fpath):
# def isInstalled(program):


# Path: test/mdTestUtilities.py
import os, shutil, sys, tempfile
from md import utilityFunctions

    utilityFunctions.executeSubProcess("git commit -m message --quiet", repoPath)
    return repoPath

def createHgRepository(tempDir):
    repoPath = os.path.join(tempDir, "repo")
    os.mkdir(repoPath)
    utilityFunctions.executeSubProcess("hg init --quiet", repoPath)
    utilityFunctions.executeSubProcess("touch " + testFileName, repoPath)
    utilityFunctions.executeSubProcess("hg add --quiet " + testFileName, repoPath)
    utilityFunctions.executeSubProcess("hg commit -m message --quiet", repoPath)
    return repoPath

def createSvnRepository(tempDir):
    repoPath = os.path.join(tempDir, "repo")
    os.mkdir(repoPath)
    repoURL = "file://" + repoPath + "/trunk"
    projPath = os.path.join(tempDir, "project")
    os.mkdir(projPath)

    utilityFunctions.executeSubProcess("svnadmin create " + repoPath, tempDir)
    utilityFunctions.executeSubProcess("touch testFile", projPath)
    utilityFunctions.executeSubProcess("svn import --quiet --non-interactive " + projPath + " " + repoURL + " -m message", tempDir)
    return repoURL

def createBlankFile(path):
    dirName = os.path.dirname(os.path.abspath(path))
    if not os.path.exists(dirName):
        os.makedirs(dirName)
    open(path, 'w').close()


def createBlankFiles(path, fileList):