#!/usr/local/bin/python # changes.py # Written 4/2000 by Joshua Grigonis # import sys, os, string, makemetricsfiles made = 0 if len (sys.argv) < 4: print "This command requires the depot path, the previous build label" print "and the current build label as parameters." print "For Example:" print "\tpython changes.py //depot/... JACKALOPE.16 JACKALOPE.17" sys.exit(1) if not os.path.isfile (sys.argv[3] + '.diff'): makemetricsfiles.create (sys.argv[1], sys.argv[2], sys.argv[3]) made = 1 try: file = open (sys.argv[3] + '.diff', 'r') except: print "Error opening file " + sys.argv[3] + ".diff" sys.exit(1) for line in file.readlines(): line = string.rstrip( line ) print line file.close () if made == 1: os.remove (sys.argv[2] + '.txt') os.remove (sys.argv[3] + '.txt') os.remove (sys.argv[3] + ".diff")