this repo has no description
at fixPythonPipStalling 38 lines 955 B view raw
1#!/usr/bin/python 2 3# Always check in results with a message that includes the tag [ignoreRevisionForDatingFiles] 4# so that this tool will ignore its own updates 5 6import commands 7import sys 8import time 9import string 10 11for filename in sys.argv[1:]: 12 print "$ svn log --limit 1 " + filename 13 svnlog = commands.getoutput("svn log --limit 1 " + filename) 14 print svnlog 15 loglines = svnlog.split("\n") 16 if len(loglines) < 2: 17 continue 18 19 if loglines[3].find("[ignoreRevisionForDatingFiles]") != -1: 20 continue 21 22 infoline = loglines[1].split() 23 datestring = time.strftime("%B %d, %Y", time.strptime(infoline[4], "%Y-%m-%d")) 24 editor = infoline[2] 25 version = infoline[0] 26 edittime = ' '.join(infoline[4:6]) 27 28 infile = open(filename,"r") 29 lines = infile.readlines() 30 for i in range(len(lines)): 31 if (lines[i][:3] == ".Dd"): 32 lines[i] = ".Dd " + datestring + "\n" 33 infile.close() 34 35 outfile = open(filename,"w") 36 outfile.writelines(lines) 37 outfile.close() 38