cvs: php4 /pear/PEAR/Command Package.php
| From: | Stig Bakken | Date: | Fri, 10 Jan 2003 01:15:41 +0000 |
| Subject: | cvs: php4 /pear/PEAR/Command Package.php | ||
| Groups: | php.pear.cvs | ||
| Request: | Send a blank email to pear-cvs+get-8152@lists.php.net to get a copy of this message | ||
ssb Thu Jan 9 20:15:41 2003 EDT
Modified files:
/php4/pear/PEAR/Command Package.php
Log:
* verbosity fix for cvstag and cvsdiff commands
Index: php4/pear/PEAR/Command/Package.php
diff -u php4/pear/PEAR/Command/Package.php:1.46 php4/pear/PEAR/Command/Package.php:1.47
--- php4/pear/PEAR/Command/Package.php:1.46 Thu Jan 9 20:11:30 2003
+++ php4/pear/PEAR/Command/Package.php Thu Jan 9 20:15:40 2003
@@ -17,7 +17,7 @@
// | Martin Jansen <mj@php.net> |
// +----------------------------------------------------------------------+
//
-// $Id: Package.php,v 1.46 2003/01/10 01:11:30 ssb Exp $
+// $Id: Package.php,v 1.47 2003/01/10 01:15:40 ssb Exp $
require_once 'PEAR/Common.php';
require_once 'PEAR/Command/Common.php';
@@ -361,6 +361,9 @@
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 @@
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 @@
$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 @@
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 @@
}
pclose($fp);
}
- $this->ui->outputData($this->output, $_cmd);
+ $this->ui->outputData($this->output, $command);
return true;
}