您好,登錄后才能下訂單哦!
#!/usr/bin/ptyhon from svncmd import SvnCmd import sys #first1 parameter aciton #second parameter svnpath #third parameter servertype # action include 'svnst','svnci','svnupdate','svnrevision','svnrollback' commands. #Task = SvnCmd('/xinmi_data/zhangwj/test','test') if len(sys.argv) == 4: Task = SvnCmd(sys.argv[2],sys.argv[3]) elif len(sys.argv) == 3: Task = SvnCmd(sys.argv[2]) else: print "Parameter number is Error!" sys.exit(1) if sys.argv[1] == 'svnst': status,output = Task.svnst() print output if status != 0: sys.exit(status) elif sys.argv[1] == 'svnci': status,output = Task.svnpreci() print output if status != 0: sys.exit(status) status1,output1 = Task.svnci() print output1 if status1 != 0: sys.exit(status1) status2,output2 = Task.svnupdate() print output2 if status1 != 0: sys.exit(status2) elif sys.argv[1] == 'svnupdate': status,output = Task.svnupdate() print output if status != 0: sys.exit(status) elif sys.argv[1] == 'svnrevision': status,output = Task.svnrevision() print output if status != 0: sys.exit(status) elif sys.argv[1] == 'svnrollback': status,output = Task.svnrollback() print output if status != 0: sys.exit(status) status1,output1 = Task.svnci() print output1 if status1 != 0: sys.exit(status) status2,output2 = Task.svnupdate() print output2 if status2 != 0: sys.exit(status2) sys.exit(0)
免責聲明:本站發布的內容(圖片、視頻和文字)以原創、轉載和分享為主,文章觀點不代表本網站立場,如果涉及侵權請聯系站長郵箱:is@yisu.com進行舉報,并提供相關證據,一經查實,將立刻刪除涉嫌侵權內容。