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]]
This script gives the revision,author,branch,description . I want to get count of files for each revision. How can this be done?