#!/bin/python
import commands
import os
#modify the branch name, here e.g. 'abc', and put this script file under the vob from which you want create branch.
branch_type="your_branch_type"
print "cleartool mkbrtype -nc " + branch_type
os.system("cleartool mkbrtype -nc " + branch_type)
dirs = commands.getoutput("find .").split("\n")
#notes: the dir reference the files name, and must be enclose with "xxx xx" once within "\"" token.
for dir in dirs:
os.system("cleartool mkbranch -nco -nc " + branch_type + " \"" + dir + "\"")
# print "cleartool mkbranch -nco -nc " + branch_type + " \"" + dir + "\""
阅读(1069) | 评论(0) | 转发(0) |