Python Development SVN Batch Submit command script

Source: Internet
Author: User

############# 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

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.