aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--doc/doc_portage_differences.doxygen4
-rw-r--r--paludis/version_spec.cc17
-rw-r--r--paludis/version_spec_TEST.cc1
3 files changed, 21 insertions, 1 deletions
diff --git a/doc/doc_portage_differences.doxygen b/doc/doc_portage_differences.doxygen
index 7f7b334..20f2106 100644
--- a/doc/doc_portage_differences.doxygen
+++ b/doc/doc_portage_differences.doxygen
@@ -39,6 +39,8 @@ would be relevant if it were:
- Repositories can deliver news items, warning the user of important changes
before they take place.
+- Ability to sync from Subversion, Git.
+
\section PortageDifferencesEbuildDeveloper For the Ebuild Developer
As well as the end user advantages, ebuild authors will benefit from:
@@ -60,7 +62,7 @@ As well as the end user advantages, ebuild authors will benefit from:
- Default deep dependency resolution.
-- Support for -scm versions.
+- Support for -scm, -try versions.
- Multiple inheritance for profiles.
diff --git a/paludis/version_spec.cc b/paludis/version_spec.cc
index ee33645..480eca9 100644
--- a/paludis/version_spec.cc
+++ b/paludis/version_spec.cc
@@ -53,6 +53,7 @@ namespace
empty,
revision,
patch,
+ trypart,
letter,
number,
scm
@@ -223,6 +224,22 @@ VersionSpec::VersionSpec(const std::string & text) :
_imp->parts.push_back(Part(patch, x));
}
+ /* try */
+ if (p < text.length() && 0 == text.compare(p, 4, "-try"))
+ {
+ x = std::numeric_limits<unsigned long>::max();
+ for (p += 4 ; p < text.length() ; ++p)
+ {
+ if (text.at(p) < '0' || text.at(p) > '9')
+ break;
+ if (x == std::numeric_limits<unsigned long>::max())
+ x = 0;
+ x *= 10;
+ x += text.at(p) - '0';
+ }
+ _imp->parts.push_back(Part(trypart, x));
+ }
+
/* scm */
if ((p < text.length()) && (0 == text.compare(p, 4, "-scm")))
{
diff --git a/paludis/version_spec_TEST.cc b/paludis/version_spec_TEST.cc
index 46a28b6..8289040 100644
--- a/paludis/version_spec_TEST.cc
+++ b/paludis/version_spec_TEST.cc
@@ -249,6 +249,7 @@ namespace test_cases
v.push_back(VersionSpec("1"));
v.push_back(VersionSpec("1-r1"));
v.push_back(VersionSpec("1_p1"));
+ v.push_back(VersionSpec("1-try2"));
v.push_back(VersionSpec("1p"));
v.push_back(VersionSpec("1.1_alpha3"));
v.push_back(VersionSpec("1.1"));