[Pkg-owncloud-commits] [owncloud] 17/131: [upgrade] add verbosity check and show repair info & steps

David Prévot taffit at moszumanska.debian.org
Tue Aug 11 15:58:26 UTC 2015


This is an automated email from the git hooks/post-receive script.

taffit pushed a commit to annotated tag v8.1.1
in repository owncloud.

commit fb85fc619d6804647fe31ddc0cde1bda51f42e48
Author: Morris Jobke <hey at morrisjobke.de>
Date:   Tue Jun 23 10:22:24 2015 +0200

    [upgrade] add verbosity check and show repair info & steps
---
 core/command/upgrade.php | 9 +++++++++
 lib/private/updater.php  | 6 ++++++
 2 files changed, 15 insertions(+)

diff --git a/core/command/upgrade.php b/core/command/upgrade.php
index ac0d72a..32691b8 100644
--- a/core/command/upgrade.php
+++ b/core/command/upgrade.php
@@ -169,6 +169,15 @@ class Upgrade extends Command {
 				$output->writeln("<error>$message</error>");
 			});
 
+			if(OutputInterface::VERBOSITY_NORMAL < $output->getVerbosity()) {
+				$updater->listen('\OC\Updater', 'repairInfo', function ($message) use($output) {
+					$output->writeln('<info>Repair info: ' . $message . '</info>');
+				});
+				$updater->listen('\OC\Updater', 'repairStep', function ($message) use($output) {
+					$output->writeln('<info>Repair step: ' . $message . '</info>');
+				});
+			}
+
 			$success = $updater->upgrade();
 
 			$this->postUpgradeCheck($input, $output);
diff --git a/lib/private/updater.php b/lib/private/updater.php
index fa9c1a5..cba8743 100644
--- a/lib/private/updater.php
+++ b/lib/private/updater.php
@@ -239,6 +239,12 @@ class Updater extends BasicEmitter {
 		$repair->listen('\OC\Repair', 'error', function ($description) {
 			$this->emit('\OC\Updater', 'repairError', array($description));
 		});
+		$repair->listen('\OC\Repair', 'info', function ($description) {
+			$this->emit('\OC\Updater', 'repairInfo', array($description));
+		});
+		$repair->listen('\OC\Repair', 'step', function ($description) {
+			$this->emit('\OC\Updater', 'repairStep', array($description));
+		});
 	}
 
 	/**

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-owncloud/owncloud.git



More information about the Pkg-owncloud-commits mailing list