Create clearcase dynamic view using CAL in C#

元气小坏坏 提交于 2019-12-18 05:24:18

问题


I'm trying to create a clearcase dynamic view using CAL in C# using the following code.

private static ClearCase.ClearTool ct;

string viewName = "tmp_view";

string cmd = "mkview –tag "+ viewName + " –stream " + selectedStream +"@"+ projectVob + "  \\\\<Network Shared Path>\\"+ viewName +".vws";

ct.CmdExec(cmd);

On execution, ct.CmdExec method throws exception saying viewTag must be specified.

For the same cmd string I'm able to create a view using cleartool command prompt.

Can you please tell me why I'm unable to create a view in C#?


回答1:


It is possible that you didn't used -tag but –tag: replace '' (minus) by '-' (hyphen minus).
Note: same for –stream: use -stream.

(plus , minus , hyphen-minus)

See What's the toughest bug you ever found and fixed? :

  • "Hyphen-minus" is the regular familiar character on keyboards, ASCII 45 and U+002D, (ab)used in both "5-4=1" and "vice-versa".
  • The actual minus sign, which is longer, is U+2212 and is not in ASCII.

It is typical of IBM documentation which, unfortunately, use minus (the long '–'): any copy-paste coming from their page doesn't work immediately.



来源:https://stackoverflow.com/questions/13834503/create-clearcase-dynamic-view-using-cal-in-c-sharp

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!