1
0
Fork 0

Add warning/errors flags to VCS repo output

pull/1288/head
Jordi Boggiano 2012-11-05 12:38:11 +01:00
parent dae7f3cee7
commit 0c61e9d345
1 changed files with 9 additions and 9 deletions

View File

@ -119,7 +119,7 @@ class VcsRepository extends ArrayRepository
} }
} catch (\Exception $e) { } catch (\Exception $e) {
if ($verbose) { if ($verbose) {
$this->io->write('Skipped parsing '.$driver->getRootIdentifier().', '.$e->getMessage()); $this->io->write('<error>Skipped parsing '.$driver->getRootIdentifier().', '.$e->getMessage().'</error>');
} }
} }
@ -136,7 +136,7 @@ class VcsRepository extends ArrayRepository
if (!$parsedTag = $this->validateTag($tag)) { if (!$parsedTag = $this->validateTag($tag)) {
if ($verbose) { if ($verbose) {
$this->io->write('Skipped tag '.$tag.', invalid tag name'); $this->io->write('<warning>Skipped tag '.$tag.', invalid tag name</warning>');
} }
continue; continue;
} }
@ -144,7 +144,7 @@ class VcsRepository extends ArrayRepository
try { try {
if (!$data = $driver->getComposerInformation($identifier)) { if (!$data = $driver->getComposerInformation($identifier)) {
if ($verbose) { if ($verbose) {
$this->io->write('Skipped tag '.$tag.', no composer file'); $this->io->write('<warning>Skipped tag '.$tag.', no composer file</warning>');
} }
continue; continue;
} }
@ -165,7 +165,7 @@ class VcsRepository extends ArrayRepository
// broken package, version doesn't match tag // broken package, version doesn't match tag
if ($data['version_normalized'] !== $parsedTag) { if ($data['version_normalized'] !== $parsedTag) {
if ($verbose) { if ($verbose) {
$this->io->write('Skipped tag '.$tag.', tag ('.$parsedTag.') does not match version ('.$data['version_normalized'].') in composer.json'); $this->io->write('<warning>Skipped tag '.$tag.', tag ('.$parsedTag.') does not match version ('.$data['version_normalized'].') in composer.json</warning>');
} }
continue; continue;
} }
@ -177,7 +177,7 @@ class VcsRepository extends ArrayRepository
$this->addPackage($this->loader->load($this->preProcess($driver, $data, $identifier))); $this->addPackage($this->loader->load($this->preProcess($driver, $data, $identifier)));
} catch (\Exception $e) { } catch (\Exception $e) {
if ($verbose) { if ($verbose) {
$this->io->write('Skipped tag '.$tag.', '.($e instanceof TransportException ? 'no composer file was found' : $e->getMessage())); $this->io->write('<warning>Skipped tag '.$tag.', '.($e instanceof TransportException ? 'no composer file was found' : $e->getMessage()).'</warning>');
} }
continue; continue;
} }
@ -197,7 +197,7 @@ class VcsRepository extends ArrayRepository
if (!$parsedBranch = $this->validateBranch($branch)) { if (!$parsedBranch = $this->validateBranch($branch)) {
if ($verbose) { if ($verbose) {
$this->io->write('Skipped branch '.$branch.', invalid name'); $this->io->write('<warning>Skipped branch '.$branch.', invalid name</warning>');
} }
continue; continue;
} }
@ -205,7 +205,7 @@ class VcsRepository extends ArrayRepository
try { try {
if (!$data = $driver->getComposerInformation($identifier)) { if (!$data = $driver->getComposerInformation($identifier)) {
if ($verbose) { if ($verbose) {
$this->io->write('Skipped branch '.$branch.', no composer file'); $this->io->write('<warning>Skipped branch '.$branch.', no composer file</warning>');
} }
continue; continue;
} }
@ -233,7 +233,7 @@ class VcsRepository extends ArrayRepository
$this->addPackage($package); $this->addPackage($package);
} catch (TransportException $e) { } catch (TransportException $e) {
if ($verbose) { if ($verbose) {
$this->io->write('Skipped branch '.$branch.', no composer file was found'); $this->io->write('<warning>Skipped branch '.$branch.', no composer file was found</warning>');
} }
continue; continue;
} catch (\Exception $e) { } catch (\Exception $e) {
@ -241,7 +241,7 @@ class VcsRepository extends ArrayRepository
$this->io->write(''); $this->io->write('');
} }
$this->branchErrorOccurred = true; $this->branchErrorOccurred = true;
$this->io->write('Skipped branch '.$branch.', '.$e->getMessage()); $this->io->write('<error>Skipped branch '.$branch.', '.$e->getMessage().'</error>');
$this->io->write(''); $this->io->write('');
continue; continue;
} }