2010-02-25 76 views
2

我正在使用下面的命令从主分支创建一个子分支。如果源名称中间没有空格,它就可以正常工作。但是,如果一个源名称中包含空格,那么它将不会创建子分支。任何想法。如何创建分支递归?

从DOS下运行下面的命令提示

Cleartool find <<path where I should start branching>> -nxname -exec "cleartool mkbranch -c "comments" -nco TEST_BRANCH %CLEARCASE_PN%" 

对于前: - 如果我cleaar包含源

  • ABC(源)
  • ABC DEF(单个文件名)
  • CD & AB(单个文件名)

如果我运行上面的命令,它会为ABC创建一个子分支,对于其他分支不会。它会抛出一个错误: - 找不到路径名称。

在此先感谢

回答

2

只需添加一些双引号(适用于Windows cleartool命令):

cleartool find <<path where I should start branching>> -nxname 
    -exec "cleartool mkbranch -c "comments" -nco TEST_BRANCH \"%CLEARCASE_PN%\"" 

注意 '\"' 围绕%CLEARCASE_PN%(代表一个ClearCase元素 '的PathName') 。

我也尝试过 '三双引号' 成功之前:

cleartool find <<path where I should start branching>> -nxname 
    -exec "cleartool mkbranch -c "comments" -nco TEST_BRANCH """%CLEARCASE_PN%"""" 
+0

Perfect.it工作 – cheiav 2010-03-26 20:00:23