Create clearcase dynamic view using CAL in C#
Asked Answered
P

1

1

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#?

Peden answered 12/12, 2012 at 7:1 Comment(0)
E
2

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

plus minus hypen-minus

(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.

Expertize answered 12/12, 2012 at 7:27 Comment(1)
Thanks a lot for help. It worked for me. I used Convert.ToChar(45) instead of using "-".Peden

© 2022 - 2024 — McMap. All rights reserved.