I creating a small addin to help with my source control.
Does anybody know how I could retrieve the Branch Name and Version Number of a source file in Rational ClearCase. I want to do this using C#. Where is all the information actually stored?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You need, from C#, to execute a
cleartoolcommandMore specifically, a
descrwith a format option only displaying exactly what you are after.That will return a string like
/main/34, meaning/branch/versionNote: it is recommended to always use double quotes around your file full path, in case that path or that file name includes spaces
As I have explained in this other ClearCase SO question, you could also use the CAL interface (COM object), but I have always found
cleartool(the basic CLI — Command Line Interface –) more reliable especially when things go wrong: the error message is much more precise.