Solved

Need a trigger to block mkelem to name elem with space

Posted on 2008-10-14
1
432 Views
Last Modified: 2012-08-13
I am attempting to stop developers from renaming elements with spaces in the filename.  I contacted IBM tech support and they recommend I create a check-in trigger that will fire a Perl script which will check the string pattern for a space (\s or \S) and will either fail and not allow the users to name the element with the space.  I am a novice with ClearCase, and any help or guidance is appreciated in advance.

Please help.
0
Comment
Question by:MADDOGIRISHMAN
1 Comment
 
LVL 39

Accepted Solution

by:
Adam314 earned 500 total points
ID: 22723337
I'm not familiar with ClearCase administration, but from looking around, this should get you close:




***** Create this perl script,
***** save it somewhere all users can access,
***** give it execute permission to all users who will run it
#!/usr/bin/perl
use strict;
 
my $FileName = $ENV{CLEARCASE_PN};
die "You can not use spaces in your file name\n" if $FileName =~ /\s/;
 
 
***** Execute this command at prompt to install the trigger
***** change the /path/to/perl/script.pl to what you saved the above
cleartool mktrtype -c "Trigger to prevent spaces in filenames" -element -all -preop checkin -exec "perl /path/to/perl/script.pl" CHECK_FILENAME_FOR_SPACES

Open in new window

0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

There are many situations when we need to display the data in sorted order. For example: Student details by name or by rank or by total marks etc. If you are working on data driven based projects then you will use sorting techniques very frequently.…
Checking the Alert Log in AWS RDS Oracle can be a pain through their user interface.  I made a script to download the Alert Log, look for errors, and email me the trace files.  In this article I'll describe what I did and share my script.
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…

830 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