EA-48340 - assert: HgVersion.parseVersion fixed for hg version 2.7-rc+5...

This commit is contained in:
Nadya Zabrodina
2013-08-03 03:01:28 +04:00
parent 0f009c7c9a
commit 4e703b3695
2 changed files with 4 additions and 3 deletions
@@ -39,8 +39,8 @@ public final class HgVersion implements Comparable<HgVersion> {
private static final Logger LOGGER = Logger.getInstance(HgVersion.class);
private static final Pattern HG_VERSION_PATTERN =
Pattern.compile(".+\\(\\s*version\\s+(\\d+)\\.(\\d+)[\\+\\.]?(\\d*)[\\d\\.]*\\s*\\)\\s*", Pattern.CASE_INSENSITIVE);
//f.e. Mercurial Distributed SCM (version 2.6+20130507) or Mercurial Distributed SCM (version 2.6.2)
Pattern.compile(".+\\(\\s*version\\s+(\\d+)\\.(\\d+)[\\+\\.-]?(\\d*)?.*\\s*\\)\\s*", Pattern.CASE_INSENSITIVE);
//f.e. Mercurial Distributed SCM (version 2.6+20130507) or Mercurial Distributed SCM (version 2.6.2), 2.7-rc+5-ca2dfc2f63eb
/**
* The minimal supported version
@@ -29,7 +29,8 @@ public class HgVersionTest extends HgPlatformTest {
new TestHgVersion("Mercurial Distributed SCM (version 2.6.2)", 2, 6, 2),
new TestHgVersion("Mercurial Distributed SCM (version 2.6+20130507)", 2, 6, 20130507),
new TestHgVersion("Mercurial Distributed SCM (version 1.9.5)", 1, 9, 5),
new TestHgVersion("Mercurial Distributed SCM (version 2.6)", 2, 6, 0)
new TestHgVersion("Mercurial Distributed SCM (version 2.6)", 2, 6, 0),
new TestHgVersion("Mercurial Distributed SCM (version 2.7-rc+5-ca2dfc2f63eb)", 2, 7, 0)
};
public void testParseSupported() throws Exception {