Package org.apache.maven.scm.provider.hg
Class HgConfig
- java.lang.Object
-
- org.apache.maven.scm.provider.hg.HgConfig
-
public class HgConfig extends java.lang.Object
Check hg installation.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description private static class
HgConfig.HgVersionConsumer
Get version of the executable.
-
Field Summary
Fields Modifier and Type Field Description private static java.lang.String
HG_INSTALL_URL
private static java.lang.String
HG_REQ
private static java.lang.String
HG_VERSION_TAG
private HgConfig.HgVersionConsumer
hgVersion
-
Constructor Summary
Constructors Constructor Description HgConfig(java.io.File workingDir)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description private static boolean
compareVersion(java.lang.String version1, java.lang.String version2)
Iterate through two dot-notation version strings, normalize them to the same length, then do alphabetic comparisonstatic HgConfig.HgVersionConsumer
getHgVersion(java.io.File workingDir)
private java.lang.String
getInstalledStr()
private boolean
isComplete()
private boolean
isInstalled()
java.lang.String
toString(java.io.File workingDir)
-
-
-
Field Detail
-
HG_REQ
private static final java.lang.String HG_REQ
- See Also:
- Constant Field Values
-
HG_VERSION_TAG
private static final java.lang.String HG_VERSION_TAG
- See Also:
- Constant Field Values
-
HG_INSTALL_URL
private static final java.lang.String HG_INSTALL_URL
- See Also:
- Constant Field Values
-
hgVersion
private HgConfig.HgVersionConsumer hgVersion
-
-
Method Detail
-
isInstalled
private boolean isInstalled()
- Returns:
- True if one can run basic hg commands
-
isComplete
private boolean isComplete()
- Returns:
- True if all modules for hg are installed.
-
getHgVersion
public static HgConfig.HgVersionConsumer getHgVersion(java.io.File workingDir) throws ScmException
- Throws:
ScmException
-
compareVersion
private static boolean compareVersion(java.lang.String version1, java.lang.String version2)
Iterate through two dot-notation version strings, normalize them to the same length, then do alphabetic comparison- Parameters:
version1
-version2
-- Returns:
- true if version2 is greater than version1
-
getInstalledStr
private java.lang.String getInstalledStr()
-
toString
public java.lang.String toString(java.io.File workingDir)
-
-