import sys
import hglib
import re
# figure out what repo path to use
if len(sys.argv) > 1:
repo1 = sys.argv[1]
# connect to hg
client1 = hglib.open(repo1)
for data1 in client1.log("date('>2015-06-01') and date('<2015-09-16')"):
m = re.findall("\w+\\-\d+", data1.desc.upper())
if len(m)> 0:
data_row = [data1.rev,data1.author,data1.branch,data1.desc,m[0]]
此脚本提供修订,作者,分支,说明。我想得到每个修订版的文件数。如何才能做到这一点?