how to use clearcase commands in perl script

S

sunil

Hi,
Presently I am having a requirement to use clearcase commands
in a perl script.
The requirement is given below.

1)I will set my view manually from the command line in the unix
prompt.
2)Afterwards from the perls script I have to set the configspecs A and
shuld have to go to the where source code presents.
3) I will do some operations over here
4) Setting the other configspecs B and goes to the source code where it
presents.
5) Doing some required tasks
6)Again setting back the config specs A

In this one from step 2 to step 6 I have to perform in the
perls script.
I am unable to set the configspec from a perl script. If anybody knows
please let me know how to set it.


Regards
Sunil
 
A

Andrew DeFaria

sunil said:
Hi,
Presently I am having a requirement to use clearcase commands in a
perl script. The requirement is given below.

1) I will set my view manually from the command line in the unix prompt.
2) Afterwards from the perls script I have to set the configspecs A
and shuld have to go to the where source code presents.
3) I will do some operations over here
4) Setting the other configspecs B and goes to the source code where
it presents.
5) Doing some required tasks
6) Again setting back the config specs A

In this one from step 2 to step 6 I have to perform in the perls
script. I am unable to set the configspec from a perl script. If
anybody knows please let me know how to set it.
Care to give us a guess at what you tried to do and how exactly it failed?

BTW Why are you mucking with the config spec of a view? IOW shouldn't it
be set correctly at the start and then left alone?
 
S

sunil

Andrew said:
Care to give us a guess at what you tried to do and how exactly it failed?

BTW Why are you mucking with the config spec of a view? IOW shouldn't it
be set correctly at the start and then left alone?
--
Andrew DeFaria <http://defaria.com>
Don't look back, they might be gaining on you.

--------------070802090302070207090108
Content-Type: text/html; charset=ISO-8859-1
X-Google-AttachSize: 1481

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
<title></title>
</head>
<body bgcolor="#ffffff" text="#000000">
sunil wrote:
<blockquote
cite="(e-mail address removed)"
type="cite">Hi,<br>
Presently I am having a requirement to use clearcase commands in a perl
script. The requirement is given below.<br>
<br>
1) I will set my view manually from the command line in the unix prompt.<br>
2) Afterwards from the perls script I have to set the configspecs A and
shuld have to go to the where source code presents.<br>
3) I will do some operations over here<br>
4) Setting the other configspecs B and goes to the source code where it
presents.<br>
5) Doing some required tasks<br>
6) Again setting back the config specs A<br>
<br>
In this one from step 2 to step 6 I have to perform in the perls
script. I am unable to set the configspec from a perl script. If
anybody knows please let me know how to set it.<br>
</blockquote>
Care to give us a guess at what you tried to do and how exactly it
failed?<br>
<br>
BTW Why are you mucking with the config spec of a view? IOW shouldn't
it be set correctly at the start and then left alone?<br>
<div class="moz-signature">-- <br>
<a href="http://defaria.com">Andrew DeFaria</a><br>
<small><font color="#999999">Don't look back, they might be gaining on
you.</font></small>
</div>
</body>
</html>

--------------070802090302070207090108--



Hi,

See I am having two config specs ,one related to the main code
of the individual modules and one related to
the libraries used by those modules.
In the 1st step I will set the config specs of the main
code, and I will read the make file of a particular module and I will
find out the libraries used by that module.
In the second step I will set the config specs of the library
,and compiling those related libries and transfer those libraries to a
particular path.
In the third step coming back to the main module by setting
the config spec of main module and compiling the main module and
transfering it to a particular path.

this is what my script intends to it.The problem is how to
set the config spec in my perl script i am unable to get it.

Regards
Sunil
 
S

sunil

Tad,
Do u know how to use these functions for to change config
specs. If u know please guide me.
At the same time to use this ,is this module should have to be
installed in my perl?
If yes, how to find out whether this module is installed or not?

Regards
Sunil
 
A

Andrew DeFaria

sunil said:
See I am having two config specs ,one related to the main code of the
individual modules and one related to
the libraries used by those modules.
Still seems weird. How do you, or other developers work within Clearcase
normally - IOW not when using a Perl script. Does a programmer who needs
to fix a bug that is partially in the "main code" and partially in the
"module" need to be switching around config specs to get the job done?
How then do you compile your code? Is the build process constantly
switching between different config specs in order to build things? If
so, IMHO, bad Clearcase environment design.
In the 1st step I will set the config specs of the main code, and I
will read the make file of a particular module and I will find out the
libraries used by that module. In the second step I will set the
config specs of the library ,and compiling those related libries and
transfer those libraries to a particular path. In the third step
coming back to the main module by setting the config spec of main
module and compiling the main module and transfering it to a
particular path.
BTW You never addressed the simple question I posed of: Care to give us
a guess at what you tried to do and how exactly it failed?
this is what my script intends to it.The problem is how to set the
config spec in my perl script i am unable to get it.
You can set your config spec through Perl simply by calling cleartool setcs:

my @output = `cleartool setsc /tmp/cs 2>&1`;
my $status = $?;

die "Unable to set config spec" if ($status ne 0);

How you get /tmp/cs to be a proper config spec is up to you.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,905
Latest member
Kristy_Poole

Latest Threads

Top