From 94b04d166c1041028571222b9931121b0f7dfded Mon Sep 17 00:00:00 2001 From: Karen Arutyunov Date: Mon, 22 May 2017 23:31:10 +0300 Subject: Implement brep-clean --- migrate/.gitignore | 1 - migrate/migrate.cli | 22 ++++++++++++++++------ migrate/migrate.cxx | 9 +++------ 3 files changed, 19 insertions(+), 13 deletions(-) (limited to 'migrate') diff --git a/migrate/.gitignore b/migrate/.gitignore index 7323078..c27ed44 100644 --- a/migrate/.gitignore +++ b/migrate/.gitignore @@ -1,3 +1,2 @@ -*-options *-options.?xx brep-migrate diff --git a/migrate/migrate.cli b/migrate/migrate.cli index 54edd70..1a86626 100644 --- a/migrate/migrate.cli +++ b/migrate/migrate.cli @@ -8,7 +8,7 @@ include ; // uint16_t "\section=1" "\name=brep-migrate" -"\summary=create/drop/migrate build2 repository database" +"\summary=create/drop/migrate brep databases" { "", @@ -114,12 +114,22 @@ class options "\h|EXIT STATUS| -\cb{0} Successful termination. +\dl| -\cb{1} Fatal error. +\li|\cb{0} -\cb{2} \cb{brep-migrate} or \l{brep-load(1)} instance is running. Try - again. +Success.| -\cb{3} The database recoverable error. Try again. +\li|\cb{1} + +Fatal error.| + +\li|\cb{2} + +An instance of \cb{brep-migrate} or \l{brep-load(1)} is already running. Try +again.| + +\li|\cb{3} + +Recoverable database error. Try again.|| " diff --git a/migrate/migrate.cxx b/migrate/migrate.cxx index 56e2c83..25b84d0 100644 --- a/migrate/migrate.cxx +++ b/migrate/migrate.cxx @@ -15,9 +15,6 @@ #include -#include -#include - #include #include @@ -28,7 +25,7 @@ using namespace brep; // Operation failed, diagnostics has already been issued. // -struct failed: std::exception {}; +struct failed {}; static const char* help_info ( " info: run 'brep-migrate --help' for more information"); @@ -349,12 +346,12 @@ try } catch (const database_locked&) { - cerr << "brep-migrate or brep-load instance is running" << endl; + cerr << "brep-migrate or brep-load is running" << endl; return 2; } catch (const recoverable& e) { - cerr << "database recoverable error: " << e << endl; + cerr << "recoverable database error: " << e << endl; return 3; } catch (const cli::exception& e) -- cgit v1.1