#MAKE SURE YOU EXECUTE THIS IN THE RIGHT DIR #RELATIVE TO THE DIRECTORIES IN THE fileList file. import os # file contains a list of paths (1 per line) # of modules that need to be tagged. fileList = 'files.txt' #tag = 'PRODAGENT_0_12_12_PRE1_INT1' tag = 'PRODCOMMON_0_12_12_PRE1_INT1' reportFile = open(fileList, 'r') line = reportFile.readline() def executeCommand(command): stdin,stdout,stderr = os.popen3(command) for x in [stdout, stderr]: line = x.read() while line: print(line) line = x.read() while line: command = 'cvs tag '+tag + ' '+line print command executeCommand(command) line = reportFile.readline()