import os,sys,time file = open(‘svnlog‘) revList = [] tempList = [] linen = 1 for 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 +=1 svnRevList=[] 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 svnRevList svnRevList.sort() for i in range(len(svnRevList)): print svnRevList[i] file.close() ~
根据SVN的MESSAGE进行多版本输出,反向排序,真是曲折~~~啊
时间: 2024-08-05 18:38:35