Solved

How to use parse_opts to  specify CVS tree as an option

Posted on 2006-06-20
8
569 Views
Last Modified: 2011-08-18
I have a perl script which will need a way to specify the version of the tool that it will invoke.

Eg: run_app -cvstree  app_1.0.1.

I will be using parse_opts to parse the cmd line options. But it not clear to me how to write code to pick the CVS Tree branch as specified in the cmd line option.

Thanks,
Anu.
0
Comment
Question by:AnuPutcha
  • 3
  • 2
  • 2
  • +1
8 Comments
 
LVL 9

Expert Comment

by:Suhas .
ID: 16950030
Hi AnuPutcha,
To run command line options in script use system:

system("run_app -cvstree app_1.0.1");

Cheers!
Suhas
0
 
LVL 39

Expert Comment

by:Adam314
ID: 16951941
Could you clearify, I'm not sure what you want to do?
0
 
LVL 84

Expert Comment

by:ozo
ID: 16953184
use Getopt::Long;
my $branch;
$result = GetOptions("cvstree=s" => \$branch);

0
 

Author Comment

by:AnuPutcha
ID: 16954209
I want to be able to specify a CVS branch as an option to a perl script so that the right version of the script is selected. Also can someone tell me how to see the CVS tree/ a cmd to see CVS tree?


Thanks
0
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 
LVL 39

Expert Comment

by:Adam314
ID: 16954451
How would you specify which branch to run if you ran it from the command line?
Or how would you view a particular version of a file if you wanted to view it?

Once you have that, use the system command to start the same script, but the correct version.  

0
 
LVL 9

Expert Comment

by:Suhas .
ID: 16966640
0
 
LVL 39

Accepted Solution

by:
Adam314 earned 125 total points
ID: 16971622
According to that (and some other sites), it sounds like you can only access a particular version of a file if you check it out.  Is this correct?
Can you view a particular version of a file with out checking it out?
0
 

Author Comment

by:AnuPutcha
ID: 16973265
You are correct, apparently I cannot access a version without checking it out locally. I din't know this before and so I was thinking I could do that and wnated to know how to access CVS branch without checking it out.

Thanks!
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Email validation in proper way is  very important validation required in any web pages. This code is self explainable except that Regular Expression which I used for pattern matching. I originally published as a thread on my website : http://www…
In the distant past (last year) I hacked together a little toy that would allow a couple of Manager types to query, preview, and extract data from a number of MongoDB instances, to their tool of choice: Excel (http://dilbert.com/strips/comic/2007-08…
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…
This Micro Tutorial hows how you can integrate  Mac OSX to a Windows Active Directory Domain. Apple has made it easy to allow users to bind their macs to a windows domain with relative ease. The following video show how to bind OSX Mavericks to …

911 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now