aboutsummaryrefslogtreecommitdiff
path: root/bpkg/manifest.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'bpkg/manifest.cxx')
-rw-r--r--bpkg/manifest.cxx16
1 files changed, 16 insertions, 0 deletions
diff --git a/bpkg/manifest.cxx b/bpkg/manifest.cxx
index 40f362e..b66d5d4 100644
--- a/bpkg/manifest.cxx
+++ b/bpkg/manifest.cxx
@@ -326,6 +326,22 @@ namespace bpkg
canonical_upstream_.resize (cl);
}
+ string version::
+ string (bool ignore_revision) const
+ {
+ std::string v (epoch_ != 0
+ ? to_string (epoch_) + "+" + upstream_
+ : upstream_);
+
+ if (!ignore_revision && revision_ != 0)
+ {
+ v += '-';
+ v += to_string (revision_);
+ }
+
+ return v;
+ }
+
// package_manifest
//
package_manifest::