2 ################################################################################
6 # Description: This script will list change sets for activities
7 # Author: Andrew@DeFaria.com
8 # Created: Thu Apr 27 18:10:37 PDT 2006
9 # Modified: 2007/05/17 07:45:48
12 # (c) Copyright 2006, Andrew@DeFaria.com, all rights reserved.
14 ################################################################################
19 use lib "$FindBin::Bin/../lib";
26 my $me = $FindBin::Script;
28 # This is site specific - and problematic!
29 my $pvob_name = "ilm_pvob";
30 my $pvob = ($arch eq "windows" or $arch eq "cygwin") ?
31 "\\" . "$Clearcase::vobtag_prefix$pvob_name" :
32 "$Clearcase::vobtag_prefix$pvob_name";
37 display "Usage: $me: <activity> [ <activity> ]";
48 my $current_view = shift;
51 my $cmd = "cleartool lsactivity -l $activity\@$pvob 2>&1";
56 warning "$activity Activity does not exist";
59 my $found_changeset = $false;
62 if (!$found_changeset) {
63 if (/ change set versions/) {
64 $found_changeset = $true;
73 if ($element =~ /$current_view(.*)/) {
76 push @changes, $element;
86 my $cmd = "cleartool pwv -s";
91 my $view = $output [0];
92 chop $view if $view =~ /\r/;
94 if ($status ne 0 or $view =~ /\*\* NONE \*\*/) {
101 sub DisplayChangeSet {
102 my $activity = shift;
105 display "$_" foreach (@changes);
108 Usage "Must specify an activity" if !defined $ARGV [0];
110 # Should probably make a constructor for Clearcase::View to return the
111 # current view, if any.
112 my $current_view = GetPWV;
114 Usage "Must be in a view" if !$current_view;
116 my @activity = @ARGV;
118 DisplayChangeSet $_, GetChangeSet $_, $current_view foreach (@activity);