python 用于git的脚本
来源:互联网 发布:展板设计软件下载 编辑:程序博客网 时间:2024/05/21 10:22
'''Readmepython commitmessage.py 19.3.A.0.12 19.3.A.0.13oldtag:19.3.A.0.12 newtag:19.3.A.0.13'''import osimport os.pathimport stringimport sysimport commandsclass ParseCommit: def parse(self,alldms,commit): self.dms = -1 self.changeid = -1 title = " - "+commit[4].lstrip() if ( len(title) > 70): title = title + "<<<<<<<<too long" print " - "+commit[4].lstrip(), for line in commit: if line.find("FIX=") != -1: self.dms = line alldms.append(line.lstrip()) #print line.lstrip() continue if line.find("Change-Id:") != -1: self.changeid = line print " "+line.lstrip(), continue #oldtag="19.3.A.0.12"#newtag="19.3.A.0.13"oldtag=sys.argv[1]newtag=sys.argv[2]#print "oldtag:"+oldtag#print "newtag:"+newtagcmd_gitallsh1 = "git log --pretty=%H " + oldtag + ".." + newtagcmd_gitalltile = "git log --pretty=%s " + oldtag + ".." + newtagcmd_gitsh1 = "git log -1 "alldms = []count = 0'''stream = os.popen(cmd_gitallsh1)allsh1 = stream.readlines()parse = ParseCommit();print cmd_gitsh1 + allsh1[0]stream = os.popen(cmd_gitsh1 + allsh1[0])commit = stream.readlines()parse.parse(alldms,commit);'''print "Delivery of " + newtagprintprint "includes:"stream = os.popen(cmd_gitallsh1)allsh1 = stream.readlines()parse = ParseCommit();for sh1 in allsh1: #print sh1 stream = os.popen(cmd_gitsh1+sh1) commit = stream.readlines() parse.parse(alldms,commit);print printprint for dms in alldms: print dms,
提取两个tag之间的commit message的信息
0 0
- python 用于git的脚本
- 用于git测试的linux脚本
- 一个用于踩点获取信息的python脚本
- 用于windbg检查堆是否被破坏的python脚本
- 用于windbg转换十六进制字符串的python脚本
- 用于windbg检查文件是否匹配的python脚本
- 用于下载的脚本
- 用于脚本的IDispatch实现
- Linux上用于Json数据处理并导入Mysql的几个有用Python脚本
- 自己写的Python脚本 用于文件按照小时合并且单个文件不超过200M
- 用于转换和恢复从ipa文件中,提取到的png文件的Python脚本 支持Python 3.3版本
- 用于系统管理的Windows脚本技术
- 用于检测进程的shell脚本
- 用于SD卡启动android的脚本
- 一个用于部署应用的ant脚本
- 一个用于提取内存的IDA脚本
- python脚本实现git commit hooks钩子
- python 中仅用于整数的函数
- Android使用二维码之_zxing生成二维码
- 【经典收藏】深度技术ghost官方原版XP系统sp3下载地址 ...
- win7,64位系统下,找不到指定的文件 C:\WINDOWS\system32\<LANG_NAME>\mstsc.exe.MUI
- 为什么ConcurrentHashMap是弱一致的
- ORA-01034:ORACLE not available ORA-27101:shared memory realm does not exit
- python 用于git的脚本
- Android学习笔记九:基本视图组件:Spinner
- 关于苹果开发者账号(appleid)的问题修复
- 一名大三狗的腾讯基础研究面试
- 一些seo的知识
- 浏览器内核开发pre
- java实现简单的单点登录
- 译文-Android的MVP模式开发系列文章(1)
- 双缓冲消息队列-减少锁竞争