Chinaunix首页 | 论坛 | 博客
  • 博客访问: 943716
  • 博文数量: 116
  • 博客积分: 3923
  • 博客等级: 中校
  • 技术积分: 1337
  • 用 户 组: 普通用户
  • 注册时间: 2009-04-23 01:22
文章分类

全部博文(116)

文章存档

2013年(1)

2012年(17)

2011年(69)

2009年(29)

分类: LINUX

2009-04-30 21:38:12

#!/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 + "\""

阅读(1028) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~