aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2016-02-09 21:40:03 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2016-02-09 21:40:03 +0200
commit003a4d697b9944602418fca8c82fa244433512ea (patch)
tree43b52decef9fa110e9dcdfcb0822afbd7f558358
parent3e06cb9f5a8685ea5e3d4201ca622ae46a235d0e (diff)
Support comment in the repository email manifest value
-rw-r--r--bpkg/manifest4
-rw-r--r--bpkg/manifest.cxx6
-rw-r--r--tests/manifest/repositories2
3 files changed, 8 insertions, 4 deletions
diff --git a/bpkg/manifest b/bpkg/manifest
index 6e42085..29ba6fe 100644
--- a/bpkg/manifest
+++ b/bpkg/manifest
@@ -523,13 +523,15 @@ namespace bpkg
class repository_manifest
{
public:
+ using email_type = bpkg::email;
+
repository_location location;
butl::optional<repository_role> role;
// The following values may only be present for the base repository.
//
butl::optional<std::string> url;
- butl::optional<std::string> email;
+ butl::optional<email_type> email;
butl::optional<std::string> summary;
butl::optional<std::string> description;
diff --git a/bpkg/manifest.cxx b/bpkg/manifest.cxx
index 0923a48..2cad721 100644
--- a/bpkg/manifest.cxx
+++ b/bpkg/manifest.cxx
@@ -1735,10 +1735,12 @@ namespace bpkg
if (email)
bad_name ("email redefinition");
+ string c (split_comment (v));
+
if (v.empty ())
bad_value ("empty email");
- email = move (v);
+ email = email_type (move (v), move (c));
}
else if (n == "summary")
{
@@ -1824,7 +1826,7 @@ namespace bpkg
if (!b)
bad_value ("email not allowed");
- s.next ("email", *email);
+ s.next ("email", add_comment (*email, email->comment));
}
if (summary)
diff --git a/tests/manifest/repositories b/tests/manifest/repositories
index 8d67635..bae9c86 100644
--- a/tests/manifest/repositories
+++ b/tests/manifest/repositories
@@ -6,7 +6,7 @@ location: ../stable
role: complement
:
url: http://cppget.org
-email: repoman@cppget.org
+email: repoman@cppget.org; General mailing list.
summary: General C++ package repository
description: This is the awesome C++ package repository full of exciting\
stuff.