############# Svn Commit data Scripts #############
Script Feature Description:
Submit files and folders that have been added, modified, and deleted by the client
Execution method:
Python svn_commit.py submission Directory
Such as:
Python svn_commit.py E:\test
############# Scripts Demo #############
#!/usr/bin/env python#coding:utf-8import osfile_name = sys.argv[1] #file_name = raw_input (' The program you want to run: ') Os.chdir (file_ Name) R=os.popen (' SVN st ') info = r.readlines () for line in info:line = Line.strip (' \ n '). Split (') one=line[0] TOW=LINE[1] if one = = '? ': Os.system (' svn add%s '% tow) elif one = = '! ': Os.system (' svn delete%s '% tow) os.system (' svn commit-m ' commit ')
############# Modified content is as follows #############
SVN St lists the modified files
! Files for deletion
? For the newly added file
M for modified files
650) this.width=650; "Src=" Http://s2.51cto.com/wyfs02/M00/8B/6A/wKioL1hOM_Lw5324AAAbY1kwVGQ782.png-wh_500x0-wm_3 -wmp_4-s_3268772430.png "title=" 1.png "alt=" Wkiol1hom_lw5324aaaby1kwvgq782.png-wh_50 "/>
############# Execute script show #############
650) this.width=650; "Src=" Http://s5.51cto.com/wyfs02/M01/8B/6E/wKiom1hONImjxqY5AABgZa5SxOM367.png-wh_500x0-wm_3 -wmp_4-s_3267302422.png "title=" 1.png "alt=" Wkiom1honimjxqy5aabgza5sxom367.png-wh_50 "/>
############# Review submissions again #############
650) this.width=650; "Src=" Http://s2.51cto.com/wyfs02/M01/8B/6E/wKiom1hONLTwSbQIAAASmW_Rcxo566.png-wh_500x0-wm_3 -wmp_4-s_3005110489.png "title=" 1.png "alt=" Wkiom1honltwsbqiaaasmw_rcxo566.png-wh_50 "/>
This article is from the "Wsyht90 blog" blog, make sure to keep this source http://wsyht90.blog.51cto.com/9014030/1881892
Python Development SVN Batch Submit command script