Subversion Repositories DevTools

Rev

Rev 2026 | Rev 4382 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 2026 Rev 4362
Line 129... Line 129...
129
foreach my $view ( @vlist )
129
foreach my $view ( @vlist )
130
{
130
{
131
 
131
 
132
    Verbose ("Process View: $view");
132
    Verbose ("Process View: $view");
133
    my $uuid;
133
    my $uuid;
-
 
134
    my $view_tag_uuid;
134
    my $cmd = "cleartool lsview -age $view";
135
    my $cmd = "cleartool lsview -age $view";
135
    Verbose2($cmd);
136
    Verbose2($cmd);
136
    open(SHOWCMD, "$cmd 2>&1 |") || Error( "can't run command: $!");
137
    open(SHOWCMD, "$cmd 2>&1 |") || Error( "can't run command: $!");
137
    my @text = <SHOWCMD>;
138
    my @text = <SHOWCMD>;
138
    close(SHOWCMD);
139
    close(SHOWCMD);
139
 
140
 
140
    chomp $text[1];
141
    chomp $text[1];
141
 
142
 
-
 
143
    my ($when, $who, $age);
142
    $text[1] =~ m~accessed ([^ ]+) by (.*)~;
144
    if ($text[1] =~ m~accessed ([^ ]+) by (.*)~)
-
 
145
    {
143
    my $when = $1;
146
        $when = $1;
144
    my $who = $2;
147
        $who = $2;
145
    my $age;
148
    }
146
 
149
 
147
    if ( $when )
150
    if ( $when )
148
    {
151
    {
149
        $age =  age($when);
152
        $age =  age($when);
150
    }
153
    }
Line 179... Line 182...
179
                #   Filter output from the user
182
                #   Filter output from the user
180
                #
183
                #
181
                chomp;
184
                chomp;
182
                Verbose("lsview: $_");
185
                Verbose("lsview: $_");
183
                $uuid = $1 if ( m~^View uuid:\s+(.*)~ );
186
                $uuid = $1 if ( m~^View uuid:\s+(.*)~ );
-
 
187
                $view_tag_uuid = $1 if ( m~View tag uuid(.*)~ );
184
            }
188
            }
185
            close(CMD);
189
            close(CMD);
186
 
190
 
187
            if ( $uuid )
191
            if ( $uuid )
188
            {
192
            {
189
                Warning ("Deleting view - the hard way");
193
                Warning ("Deleting view - the hard way");
190
                ClearTool( "--Quiet", "rmview -force -all -uuid $uuid" );
194
                ClearTool( "--Quiet", "rmview -force -all -uuid $uuid" );
191
                ClearTool( "--Quiet", "unregister -view -uuid $uuid" );
195
                ClearTool( "--Quiet", "unregister -view -uuid $uuid" );
192
                ClearTool( "--Quiet", "rmtag -view -all $view" );
196
                ClearTool( "--Quiet", "rmtag -view -all $view" );
193
            }
197
            }
-
 
198
            elsif ($view_tag_uuid)
-
 
199
            {
-
 
200
                ClearTool( "--Quiet", "rmtag -view -all $view" );
-
 
201
            }
194
        }
202
        }
195
    }
203
    }
196
}
204
}
197
 
205
 
198
#-------------------------------------------------------------------------------
206
#-------------------------------------------------------------------------------