text stringlengths 0 834k |
|---|
: """" |
); |
my @info = $info->result_l; |
my @keys = qw(Name Location Type); |
push @keys, qw(Username) if @info >= 4; |
push @keys, qw(Password) if @info >= 5; |
$o->inform(""Describing $type Repository$num:\n""); |
$o->print_pairs(\@keys, \@info); |
return 1; |
} |
elsif (matches($cmd, 'r|ename')) { |
my $name = pop @args; |
my $arg = join(' ', @args); |
my $rep = $arg; |
if ($arg =~ /^\d+$/) { |
return unless $o->assert( |
bounded(1, $arg, scalar @reps_on), |
""no such active repository $arg"" |
); |
$rep = $reps_on[$arg - 1]; |
} |
else { |
$rep = $o->rep_uniq($rep); |
return unless $o->assert( |
$o->rep_exists($rep), |
""no such repository '$rep'"" |
); |
} |
my $ok = PPM::UI::repository_rename($rep, $name); |
unless ($ok->is_success) { |
$o->warn($ok->msg); |
return unless $ok->ok; |
} |
$o->rep_on($name) if $o->rep_ison($rep); |
$o->rep_off($rep); |
$o->cache_clear('search'); |
} |
#===================================================================== |
# On, off, up, and down commands: |
#===================================================================== |
elsif (matches($cmd, 'on')) { |
my $rep = $o->rep_uniq(join(' ', @args)); |
return unless $o->assert( |
$o->rep_isoff($rep), |
""no such inactive repository '$rep'"" |
); |
$o->rep_on($rep); |
$o->cache_clear('search'); |
} |
elsif (matches($cmd, 'of|f')) { |
my $arg = join(' ', @args); |
my $rep = $arg; |
if ($arg =~ /^\d+$/) { |
return unless $o->assert( |
bounded(1, $arg, scalar @reps_on), |
""no such active repository $arg"" |
); |
$rep = $reps_on[$arg - 1]; |
} |
else { |
$rep = $o->rep_uniq($rep); |
return unless $o->assert( |
$o->rep_exists($rep), |
""no such repository '$rep'"" |
); |
} |
$o->rep_off($rep); |
$o->cache_clear('search'); |
} |
elsif (matches($cmd, 'up')) { |
my $arg = join(' ', @args); |
my $rep = $arg; |
if ($arg =~ /^\d+$/) { |
return unless $o->assert( |
bounded(1, $arg, scalar @reps_on), |
""no such active repository $arg"" |
); |
$rep = $reps_on[$arg - 1]; |
} |
else { |
$rep = $o->rep_uniq($rep); |
return unless $o->assert( |
$o->rep_exists($rep), |
""no such repository '$rep'"" |
); |
} |
$o->rep_up($rep); |
} |
elsif (matches($cmd, 'do|wn')) { |
my $arg = join(' ', @args); |
my $rep = $arg; |
if ($arg =~ /^\d+$/) { |
return unless $o->assert( |
bounded(1, $arg, scalar @reps_on), |
""no such active repository $arg"" |
); |
$rep = $reps_on[$arg - 1]; |
} |
else { |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.