- #!/usr/bin/env python3
- # -*- coding: utf-8 -*-
- ”’
- Created on 2015-09-09
- Author: xiaohanfei
- ”’
- import os
- import datetime
- import time
- def getMasterTime(dir):
- os.chdir(dir)
- tmp = os.popen(‘git log –stat -1′).readlines()
- tmp1 = tmp[3].split(‘: ‘)
- tmp2 = tmp1[1].split(‘ +’)
- struct_time = time.strptime(tmp2[0])
- masterTime = time.mktime(struct_time)
- return masterTime
- def getbranchTime(dir):
- os.chdir(dir)
- branchInfo = os.popen(‘git branch -a |grep \’examin
[……]阅读全文