aboutsummaryrefslogtreecommitdiff
path: root/migrate
diff options
context:
space:
mode:
authorKaren Arutyunov <karen@codesynthesis.com>2017-05-22 23:31:10 +0300
committerKaren Arutyunov <karen@codesynthesis.com>2017-05-24 16:12:02 +0300
commit94b04d166c1041028571222b9931121b0f7dfded (patch)
tree33d79d968cfd4a7e0977cb9686ae9ff4abfd52c4 /migrate
parent28de800a7a38ed781b8f04f8f380d65b2d79ec14 (diff)
Implement brep-clean
Diffstat (limited to 'migrate')
-rw-r--r--migrate/.gitignore1
-rw-r--r--migrate/migrate.cli22
-rw-r--r--migrate/migrate.cxx9
3 files changed, 19 insertions, 13 deletions
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 <cstdint>; // uint16_t
"\section=1"
"\name=brep-migrate"
-"\summary=create/drop/migrate build2 repository database"
+"\summary=create/drop/migrate brep databases"
{
"<options>",
@@ -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 <libbutl/pager.hxx>
-#include <libbrep/types.hxx>
-#include <libbrep/utility.hxx>
-
#include <libbrep/database-lock.hxx>
#include <migrate/migrate-options.hxx>
@@ -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)