http://publib.boulder.ibm.com/infocenter/cchelp/v7r0m0/index.jsp?topic=/com.ibm.rational.clearcase.hlp.doc/cc_main/c_hood_cleartool_cli.htm

开发人员常用命令 : vob 
1.       建立vob
  mkvob –tag /vobtags/vob1 –c “ VOB for project1” /vobstore/vob1.vbs
2.       Mount vob
  Cleartool mount /vobtags/vob1
3.       创建视图
  cleartool mkview –tag test1 /ccvob/views/test1.vws
4.       设置当前视图
  cleartool setview test1
5.       在VOB的根目录下到入数据:
  clearfsimport –recurse –c “ comments “ /home/setup/* . ,注意命令的最后为圆点,表示当前目录。
6.       改变VOB的Owner: 
  cleartool protectvob –chown root /vobstore/vob1.vbs
7.       改变VOB的Group:
  cleartool protectvob –chgrp alluser /vobstore/vob1.vbs
8.       增加Additional Group:
  cleartool protectvob –add_group group1 /vobstore/vob1.vbs
9.       删除Additional Group:
  cleartool protectvob –delete_group group1 /vobstore/vob1.vbs  修改vob中数据的权限信息
10.   将jmccboss VOB 中所有元素Owner 改成ccadmin,Group改成jmccboss:
  Cleartool protect –chown ccadmin –chgrp jmccboss .   '.'为vob根目录
11.   将jmccboss VOB 中所有元素权限 改成对ccadmin(rwx),jmccboss(rwx),其他VOB附属组成员(r-x):
  Cleartool protect –recurse –chmod 775 .

12.   建立一个snapshot view
  cleartool mkview –tag pat_2_snapshot_view –snapshot /viewstore/pat/myviews.vws

13.   更新snapshot view
  cleartool update pat_2_snapshot_view

14. 查看VOB的基本信息和UUID

  des -l vob:.

15. 删除视图

  rmview -uuid "UUID"

16.  查看brtype

  lstype -kind brtype/othertype  -short/long  # short:只显示type名字,long:显示详细信息,kind后面跟你想要查看的type类型

开发人员常用命令 : version control
1.   Check out

  cleartool co -nc xxx.cpp
  Cleartool checkout [-reserve][-unreserve] b.c    Check out一个文件
  Cleartool checkout .   Check out当前目录
  Cleartool Checkout –nc *.*    Check out当前目录下所有文件
  cleartool find . $file -exec ‘cleartool checkout -nc $CLEARCASE_PN’ 
    Check out当前目录下所有的文件和目录中的文件

    • Check out the latest version on the rel2_bugfix branch of file msg.c, to another file name.

      cmd-context checkout –nc –branch \main\rel2_bugfix –out msg_test.c msg.c 
      Checked out "msg.c" from version "\main\rel2_bugfix\1".
      cmd-context ls msg_test.c msg.c
      msg_test.c
      msg.c@@\main\rel2_bugfix\CHECKEDOUT from \main\rel2_bugfix\1
      [checked out but removed]

    • Check out the latest version on the rel2_bugfix branch of file msg.c, using an extended path name to indicate the branch. This command checks out the same version as the preceding example.

      cmd-context checkout –nc msg.c@@/main/rel2_bugfix          #after checkout, observation node point to the latest version of      rel2_bugfix,and checkout –nc msg.c@@/main/rel2_bugfix/0 has the same action, if non-zero after ".../rel2_bugfix/", checkout file will not be observed 
      Checked out "msg.c" from version "/main/rel2_bugfix/1".

    • Check out an old version of the file hello.h, using an extended path name to indicate the version. 

      cmd-context checkout –c "attempt fix of old bug" -version hello.h@@\main\1 
      Checked out "hello.h" from version "\main\1".

    • Perform an unreserved checkout of element hello.h. Provide a comment on the command line.

      cmd-context checkout –c "modify local defines"–unreserved hello.h 
      Checked out "hello.h" from version "/main/2"

    • Check out hello.c. Then, change your mind and cancel the checkout, removing the view-private copy.

      cmd-context checkout –nc hello.c 
      Checked out "hello.c" from version "\main\1". 
      cmd-context uncheckout –rm hello.c 
      Checkout cancelled for "hello.c".

2.   Check in

  cleartool ci -nc xxx.cpp
  Cleartool checkin b.c    Check in 一个文件
  Cleartool checkin .    Check in 当前目录
  Cleartool Checkin –nc *.*   Check in 当前目录下所有文件.
  cleartool find . $file -exec ‘cleartool checkin -nc –ide $CLEARCASE_PN’ 
    Check in当前目录下所有的文件和目录中的文件

    • After verifying its checkout comment, check in element util.c, using that comment.

      cmd-context lscheckout –long util.c 
      10-May-99.16:11:07 Chuck Jackson (jackson.dvt@oxygen)
      checkout version "util.c" from /main/4 (reserved)
        by view: "oxygen/home/jackson/cj.vws"
        "revise syntax"

      cmd-context checkin –nc util.c
      Checked in "util.c" version "\main\5".

    • On a Windows system, check in an element from another file, discarding the checked-out version. Provide a comment on the command line.

      cmd-context checkin –rm –from c:\users\cep\util.c ^ 
      –c "Release 1.1 update" util.c 
      Checked in "util.c" version "\main\6".

    • (ClearCase) Check in only the configuration record of a derived object, discarding its data.

      cmd-context checkin –nc –cr hello 
      Checked in "hello" version "/main/1".

3.   编辑config spe
  Cleartool edcs
4. 查看自己总共co了多少文件

  cleartool lscheckout -cview -me -avobs

5.   最有用的命令
  cleartool man xxx
  cleartool help xxx

5.新增目录和文件
  cleartool mkdir -c comment  new_dir
  cleartool mkelem -c comment  new_file.cpp

6.放弃co某个文件
  cleartool unco -keep file.cpp           //保留当前所改动的文件
  cleartool unco -rm   file.cpp

7.主线、分支文件合并
  //查找需要合并的文件
    cleartool findmerge . -fversion /main/xxxx_path -print
  //比较文件不同
    cleartool diff file.cpp file.cpp@@/main/xxxx_path/LATEST
  //查看最新版本
    cleartool lsvtree file.cpp

    • List selected versions from an element's version tree.

      cmd-context lsvtree util.c 
      util.c@@/main
      util.c@@/main/3 (REL3)
      util.c@@/main/4

    • List all versions and all obsolete branches in an element's version tree.

      cmd-context lsvtree –all –obsolete util.c 
      ...
      util.c@@\main\4

    • List all versions on the rel2_bugfix branch of an element's version tree.

      cmd-context lsvtree -branch /main/rel2_bugfix -all util.c 
      util.c@@/main/rel2_bugfix
      util.c@@/main/rel2_bugfix/0
      util.c@@/main/rel2_bugfix/1

    • Start a version tree browser to display all versions in an element's version tree.

      cmd-context lsvtree –graphical –all util.h

  //合并

cleartool merge -to file.cpp file.cpp@@/main/xxxx_path/LATEST file.cpp@@/main/LATEST
cleartool merge -nc -to filename -version src_branch
将src_branch merge到当前的checkout节点, 如果不是checkout,命令将报错而执行不成功。
src_branch can be as /main/../LATEST or label

8.标签相关
  //新建标签
    cleartool mklbtype -nc TEST_LABEL
  //给文件打标签
    cleartool mklabel -r TEST_LABEL file.cpp
  //删除标签
    cleartool rmtype lbtype:TEST_LABEL
  //给所有打上TEST_LABEL标签的文件打上TEST_LABEL2标签
    cleartool mklabel -replace -version /main/TEST_LABEL TEST_LABEL2 *
  //查找打上TEST_LABEL标签的所有文件
    cleartool find . -version "lbtype(TEST_LABEL)" -print
  //查找打上TEST_LABEL和TEST_LABEL2标签的文件
    cleartool find . -element 'lbtype_sub(TEST_LABEL) && lbtype_sub(TEST_LABEL2)' -print

9. 加锁

  find . -name '*.*' -exec 'cleartool lock nuser userame1,username2 "%CLEARCASE_PN%"'

10.解锁

  find . -name '*.*' -exec 'cleartool unlock "%CLEARCASE_PN%"'

11. 转换格式

  chtype -f compressed_file “fileName”

12. 删除lost+found

  find . -name '*.*' -exec 'cleartool rmelem -f "%CLEARCASE_PN%"'

13. 查询某一天的修改记录

  cleartool lshis -r -since 07-dec

14. see the version tree of a file:
  cleartool lsvtree -g filename.c

15. see which files is included in a branch, you can edit a script like this find_branch.sh:
  echo "$1"
  cleartool find -avobs -element "brtype("$1")" -nxn -print | xargs cleartool ls -s|grep "$1"

16.  查找分支上的文件

  find . -branch brtype(branchname) -print
  cleartool find -all -version “lbtype(REL1)” -print

  find . -version 'lbtype(LABEL)' -print

17. make branch

    • On a UNIX or Linux system, create a branch type named bugfix. Then, set a view with a config spec that prefers versions on the bugfix branch, and create a branch of that type in file util.h.

      cmd-context mkbrtype –c "bugfixing branch" bugfix 
      Created branch type "bugfix".
      cmd-context setview smg_bugfix 
      cmd-context mkbranch –nc bugfix util.h 
      Created branch "bugfix" from "util.h" version "/main/1".
      Checked out "util.h" from version "/main/bugfix/0".

    • On a Windows system, create a branch type named bugfix. Then, set a view drive with a config spec that prefers versions on the bugfix branch, and create a branch of that type in file util.h.

      cmd-context mkbrtype –c "bugfixing branch" bugfix 
      Created branch type "bugfix".
      > net use y: \\view\smg_bugfix 
      ...
      > y: 
      cmd-context mkbranch –nc bugfix util.h 
      Created branch "bugfix" from "util.h" version "\main\1".
      Checked out "util.h" from version "\main\bugfix\0".

    • Create a branch named rel2_bugfix off the version of hello.c in the view, and check out the initial version on the branch.

      cmd-context mkbranch –nc rel2_bugfix hello.c 
      Created branch "rel2_bugfix" from "hello.c" version "/main/4".
      Checked out "hello.c" from version "/main/rel2_bugfix/0".

    • Create a branch named maintenance off version \main\1 of file util.c. Do not check out the initial version on the branch.

      cmd-context mkbranch –version \main\1 –nco –nc maintenance util.c
      Created branch "maintenance" from "util.c" version "\main\1".

    • Create a branch named bugfix off version /main/3 of file hello.c, and check out the initial version on the branch. Use a version-extended pathname to specify the version.

      cmd-context mkbranch –nc bugfix hello.c@@/main/3 
      Created branch "bugfix" from "hello.c" version "/main/3".
      Checked out "hello.c" from version "/main/bugfix/0".

    • For each file with a .c extension, create a branch named patch2 at the currently selected version, but do not check out the initial version on the new branch. Provide a comment on the command line.

      cmd-context mkbranch –nco –c "release 2 code patches" patch2 *.c 
      Created branch "patch2" from "cm_add.c" version "\main\1".
      Created branch "patch2" from "cm_fill.c" version "\main\3".
      Created branch "patch2" from "msg.c" version "\main\2".
      Created branch "patch2" from "util.c" version "\main\1".

18. make brtype

    • Create a branch type named bugfix_v1, which can be used only once in an element's version tree. Provide a comment on the command line.

      cmd-context mkbrtype –c "bugfix development branch for V1" bugfix_v1
      Created branch type "bugfix_v1".

    • Create two branch types for working on program patches and a bug-fixing branch for release 2. Constrain their use to one per branch.

      cmd-context mkbrtype –nc –pbranch patch2 patch3 rel2_bugfix 
      Created branch type "patch2".
      Created branch type "patch3".
      Created branch type "rel2_bugfix".

    • Change the constraint on an existing branch type so that it can be used only once per branch. Provide a comment on the command line.

      cmd-context mkbrtype -replace -pbranch \
      -c "change to one per branch" bugfix_v1 
      Replaced definition of branch type "bugfix_v1".

19. 锁分支命令
  lock brtype:branchname
20, 创建trigger
  trigger已存在
  mktrtype mktrtype -replace -element -all -preop mkelem -nusers shiquan -exec \\192.168.1.5\cc_trigger\false.bat NO_RM_MK
  trigger不存在
  mktrtype mktrtype -element -all -preop mkelem -nusers shiquan -exec \\192.168.1.5\cc_trigger\false.bat NO_RM_MK

clearcase command (linux 常用命令)的更多相关文章

  1. Linux常用命令(一)

    Linux常用命令 1. pwd查看当前路径(Print Working Directory)    [root@CentOS ~]# pwd/root 2. cd .. 返回上一级 .. 表示上一级 ...

  2. linux常用命令的介绍

    本文主要介绍Linux常用命令工具,比如用户创建,删除,文件管理,常见的网络命令等 如何创建账号: 1. 创建用户 useradd -m username -m 表示会在/home 路径下添加创建用户 ...

  3. linux 常用命令大全

    linux 常用命令大全 系统信息 arch 显示机器的处理器架构(1) uname -m 显示机器的处理器架构(2) uname -r 显示正在使用的内核版本 dmidecode -q 显示硬件系统 ...

  4. Linux常用命令整理 - imsoft.cnblogs

    su 用户名 在不退出登陆的情况下,切换到另外一个人的身份如果用户名缺省,则切换到root状态会提示输入密码,密码不回显的. 在用su命令切换root用户时,使用“-”选项,这样可以将root的环境变 ...

  5. 100个命令Linux常用命令大全

    Linux常用命令大全100条: 1,echo "aa" > test.txt 和 echo "bb" >> test.txt//>将原 ...

  6. Linux常用命令大全(非常全!!!)

    Linux常用命令大全(非常全!!!) 最近都在和Linux打交道,感觉还不错.我觉得Linux相比windows比较麻烦的就是很多东西都要用命令来控制,当然,这也是很多人喜欢linux的原因,比较短 ...

  7. 转载Alpine Linux常用命令

    Alpine Linux常用命令 目录 一:Alpine Linux开启SSH远程登陆 1.简介: 2.配置 3.配置命令 4.重启服务 二:Alpine Linux源管理 1.简介 2.国内源简介: ...

  8. 【转载】Linux常用命令

    Linux常用命令大全(非常全!!!) 转载出处:https://www.cnblogs.com/yjd_hycf_space/p/7730690.html 系统信息 arch 显示机器的处理器架构( ...

  9. Linux常用命令全称

    Linux常用命令全称 pwd:print work directory   打印当前目录 显示出当前工作目录的绝对路径 ps: process status(进程状态,任务管理器)    常用参数: ...

随机推荐

  1. Oracle 获取数据最新版本

    表数据如:  以CODE 作为版本分组字段,对创建时间进行按最新排序 ID  NAME CODE   CREATE_TIME 1ffg    abc    001    2014-01-01 1gff ...

  2. [CF1083B]The Fair Nut and Strings

    题目大意:在给定的长度为$n(n\leqslant5\times10^5)$的字符串$A$和字符串$B$中找到最多$k$个字符串,使得这$k$个字符串不同的前缀字符串的数量最多(只包含字符$a$和$b ...

  3. BZOJ3894:文理分科——题解

    http://www.lydsy.com/JudgeOnline/problem.php?id=3894 文理分科是一件很纠结的事情!(虽然看到这个题目的人肯定都没有纠结过) 小P所在的班级要进行文理 ...

  4. BZOJ2301:[HAOI2011]Problem b——题解

    http://www.lydsy.com/JudgeOnline/problem.php?id=2301 https://www.luogu.org/problemnew/show/P2522 对于给 ...

  5. HDU4757:Tree——题解

    http://acm.hdu.edu.cn/showproblem.php?pid=4757 给一棵有点值的树,每次询问u~v的最短路当中的一个点的点权异或z最大值. 前置技能:HDU4825 前置技 ...

  6. 洛谷3805:【模板】manacher算法——题解

    https://www.luogu.org/problemnew/show/P3805 给出一个只由小写英文字符a,b,c...y,z组成的字符串S,求S中最长回文串的长度. 字符串长度为n 板子题, ...

  7. Warning: Received `false` for a non-boolean attribute `xxx`.

    React对boolean类型的attribute的识别方式问题,可以采用以下方法解决: xxx={value ? 1 : 0} 改成数字的写法,不用布尔值. 具体可以参考:https://githu ...

  8. AES encryption of files (and strings) in java with randomization of IV (initialization vector)

    http://siberean.livejournal.com/14788.html Java encryption-decryption examples, I've seen so far in ...

  9. POJ 2763 Housewife Wind 纯粹LCA写法(简单无脑)

    Description After their royal wedding, Jiajia and Wind hid away in XX Village, to enjoy their ordina ...

  10. lightoj 1245

    lightoj 1245 Harmonic Number (II) 题意:给定一个 n ,求 n/1 + n/2 + …… + n/n 的值(这里的 "/" 是计算机的整数除法,向 ...