X-Git-Url: https://defaria.com/gitweb/?a=blobdiff_plain;ds=sidebyside;f=lib%2FClearcase.pm;h=81822dd47922fb9fee1ab0dfe23a34b2246b27b9;hb=559f9045ae05e457c7eb4b6c684aa9651b98971a;hp=651d33c1420add5c8fca4a9d51eec0784b7603aa;hpb=1140ca8d56832ae529db0f353112ac192cdf9432;p=clearscm.git diff --git a/lib/Clearcase.pm b/lib/Clearcase.pm index 651d33c..81822dd 100644 --- a/lib/Clearcase.pm +++ b/lib/Clearcase.pm @@ -80,9 +80,9 @@ use IPC::Open3; use OSDep; use Display; -my ($clearpid, $clearin, $clearout, $oldHandler); +my ($clearpid, $clearin, $clearout, $oldHandler, $cleartool); -our $VIEW_DRIVE = 'M'; +our $VIEW_DRIVE = $ENV{CLEARCASE_VIEW_DRIVE} || 'M'; our $VOB_MOUNT = 'vob'; our $WIN_VOB_PREFIX = '\\'; our $SFX = $ENV{CLEARCASE_XN_SFX} ? $ENV{CLEARCASE_XN_SFX} : '@@'; @@ -118,9 +118,9 @@ BEGIN { # We can go to the registry pretty easy in Cygwin but I'm not sure how to do # that in plain old Windows. Most people either have Clearcase installed on # the C drive or commonly on the D drive on servers. So we'll look at both. - $CCHOME = 'C:\\IBMRational\\RationalSDLC\\Clearcase'; + $CCHOME = 'C:\\Program Files (x86)\\ibm\\RationalSDLC\\Clearcase'; - $CCHOME = 'D:\\IBMRational\\RationalSDLC\\Clearcase' + $CCHOME = 'D:\\Program Files (x86)\\ibm\\RationalSDLC\\Clearcase' unless -d $CCHOME; error 'Unable to figure out where Clearcase is installed', 1 @@ -578,13 +578,13 @@ Array of output lines from the cleartool command execution. # installed under /opt/rational/clearcase/bin. This is needed in case we wish # to use these Clearcase objects say in a web page where the server is often # run as a plain user who does not have cleartool in their path. - my $cleartool; - - if ($ARCHITECTURE =~ /Win/ or $ARCHITECTURE eq 'cygwin') { - $cleartool = 'cleartool'; - } elsif (-x '/opt/rational/clearcase/bin/cleartool') { - $cleartool = '/opt/rational/clearcase/bin/cleartool'; - } # if + unless ($cleartool) { + if ($ARCHITECTURE =~ /Win/i or $ARCHITECTURE eq 'cygwin') { + $cleartool = 'cleartool'; + } elsif (-x '/opt/rational/clearcase/bin/cleartool') { + $cleartool = '/opt/rational/clearcase/bin/cleartool'; + } # if + } # unless # TODO: Need to catch SIGCHILD here in case the user does something like hit # Ctrl-C. Such an action may interrupt the underlying cleartool process and