首页 > 代码库 > 根据SVN的MESSAGE进行多版本输出,反向排序,真是曲折~~~啊

根据SVN的MESSAGE进行多版本输出,反向排序,真是曲折~~~啊

 

import os,sys,timefile = open(svnlog)revList = []tempList = []linen = 1for line in file:    if (line.startswith("r")) :        svnNumber = line.split(|)[0]        tempList.append(svnNumber)    if line.find(APP-80) != -1 :        tempList.append(line)        revList.append(tempList)        tempList = []    linen +=1svnRevList=[]for i in range(len(revList)):    svnRev = "".join(revList[i][-2:-1])    svnRevList.append(svnRev.strip()[1:])    #for j in range(len(revList[i])):#       print revList[i][j]print svnRevListsvnRevList.sort()for i in range(len(svnRevList)):    print svnRevList[i]file.close()~