summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStig Bakken <ssb@php.net>2003-01-10 01:15:40 +0000
committerStig Bakken <ssb@php.net>2003-01-10 01:15:40 +0000
commit4cf28eb0fc1e78b14a4a0e9f68fedd437b5afb18 (patch)
treeb299f9d585e357522366baffa41a48bb17797c3a
parent26a472f76733ce6a94f965f857c6777ff95a19ea (diff)
downloadphp-git-4cf28eb0fc1e78b14a4a0e9f68fedd437b5afb18.tar.gz
* verbosity fix for cvstag and cvsdiff commands
-rw-r--r--pear/PEAR/Command/Package.php12
1 files changed, 9 insertions, 3 deletions
diff --git a/pear/PEAR/Command/Package.php b/pear/PEAR/Command/Package.php
index 9636ae827c..cba77138de 100644
--- a/pear/PEAR/Command/Package.php
+++ b/pear/PEAR/Command/Package.php
@@ -361,6 +361,9 @@ Wrote: /usr/src/redhat/RPMS/i386/PEAR::Net_Socket-1.0-1.i386.rpm
foreach ($files as $file) {
$command .= ' ' . escapeshellarg($file);
}
+ if ($this->config->get('verbose') > 1) {
+ $this->output .= "+ $command\n";
+ }
$this->output .= "+ $command\n";
if (empty($options['dry-run'])) {
$fp = popen($command, "r");
@@ -379,7 +382,6 @@ Wrote: /usr/src/redhat/RPMS/i386/PEAR::Net_Socket-1.0-1.i386.rpm
function doCvsDiff($command, $options, $params)
{
$this->output = '';
- $_cmd = $command;
if (sizeof($params) < 1) {
$help = $this->getHelp($command);
return $this->raiseError("$command: missing parameter: $help[0]");
@@ -408,8 +410,10 @@ Wrote: /usr/src/redhat/RPMS/i386/PEAR::Net_Socket-1.0-1.i386.rpm
$execute = true;
if (isset($options['dry-run'])) {
$execute = false;
+ unset($options['dry-run']);
}
$cmd .= ' diff';
+ // the rest of the options are passed right on to "cvs diff"
foreach ($options as $option => $optarg) {
$arg = @$this->commands[$command]['options'][$option]['arg'];
$short = @$this->commands[$command]['options'][$option]['shortopt'];
@@ -421,7 +425,9 @@ Wrote: /usr/src/redhat/RPMS/i386/PEAR::Net_Socket-1.0-1.i386.rpm
foreach ($files as $file) {
$cmd .= ' ' . escapeshellarg($file);
}
- $this->output .= "+ $cmd\n";
+ if ($this->config->get('verbose') > 1) {
+ $this->output .= "+ $cmd\n";
+ }
if ($execute) {
$fp = popen($cmd, "r");
while ($line = fgets($fp, 1024)) {
@@ -429,7 +435,7 @@ Wrote: /usr/src/redhat/RPMS/i386/PEAR::Net_Socket-1.0-1.i386.rpm
}
pclose($fp);
}
- $this->ui->outputData($this->output, $_cmd);
+ $this->ui->outputData($this->output, $command);
return true;
}