aboutsummaryrefslogtreecommitdiff
path: root/brep
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2016-02-09 21:40:34 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2016-02-10 17:25:59 +0200
commit0242fa276ae889d05f713aec4a6f09372f996a1d (patch)
tree989e29dae1c814c5f98eaa5c89f5080819a13949 /brep
parentae301626ddd8288bd58d67dfb7b2a660740001b0 (diff)
Support comment in the repository email manifest value
Diffstat (limited to 'brep')
-rw-r--r--brep/mod-repository-details.cxx12
-rw-r--r--brep/package8
-rw-r--r--brep/package.xml3
3 files changed, 18 insertions, 5 deletions
diff --git a/brep/mod-repository-details.cxx b/brep/mod-repository-details.cxx
index 7d38c6c..27493c1 100644
--- a/brep/mod-repository-details.cxx
+++ b/brep/mod-repository-details.cxx
@@ -109,7 +109,17 @@ handle (request& rq, response& rs)
s << P_DESCRIPTION (*r.description);
if (r.email)
- s << P << A(HREF="mailto:" + *r.email) << *r.email << ~A << ~P;
+ {
+ const email& e (*r.email);
+
+ s << P
+ << A(HREF="mailto:" + e) << e << ~A;
+
+ if (!e.comment.empty ())
+ s << " (" << e.comment << ")";
+
+ s << ~P;
+ }
ostringstream o;
butl::to_stream (o,
diff --git a/brep/package b/brep/package
index 5360623..8aa88a1 100644
--- a/brep/package
+++ b/brep/package
@@ -21,9 +21,9 @@
// Used by the data migration entries.
//
-#define LIBBREP_SCHEMA_VERSION_BASE 1
+#define LIBBREP_SCHEMA_VERSION_BASE 2
-#pragma db model version(LIBBREP_SCHEMA_VERSION_BASE, 1, closed)
+#pragma db model version(LIBBREP_SCHEMA_VERSION_BASE, 2, open)
// The uint16_t value range is not fully covered by SMALLINT PostgreSQL type
// to which uint16_t is mapped by default.
@@ -355,6 +355,8 @@ namespace brep
class repository
{
public:
+ using email_type = brep::email;
+
// Create internal repository.
//
repository (repository_location,
@@ -380,7 +382,7 @@ namespace brep
// Present only for internal repositories.
//
- optional<string> email;
+ optional<email_type> email;
optional<string> summary;
optional<string> description;
diff --git a/brep/package.xml b/brep/package.xml
index 9c88f25..6abbf1d 100644
--- a/brep/package.xml
+++ b/brep/package.xml
@@ -1,5 +1,5 @@
<changelog xmlns="http://www.codesynthesis.com/xmlns/odb/changelog" database="pgsql" version="1">
- <model version="1">
+ <model version="2">
<table name="repository" kind="object">
<column name="name" type="TEXT" null="false"/>
<column name="location" type="TEXT" null="false"/>
@@ -7,6 +7,7 @@
<column name="priority" type="INTEGER" null="false"/>
<column name="url" type="TEXT" null="true"/>
<column name="email" type="TEXT" null="true"/>
+ <column name="email_comment" type="TEXT" null="true"/>
<column name="summary" type="TEXT" null="true"/>
<column name="description" type="TEXT" null="true"/>
<column name="local_path" type="TEXT" null="false"/>