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.ObjectCheck hg installation.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description private static classHgConfig.HgVersionConsumerGet version of the executable.
-
Field Summary
Fields Modifier and Type Field Description private static java.lang.StringHG_INSTALL_URLprivate static java.lang.StringHG_REQprivate static java.lang.StringHG_VERSION_TAGprivate HgConfig.HgVersionConsumerhgVersion
-
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 booleancompareVersion(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.static HgConfig.HgVersionConsumergetHgVersion(java.io.File workingDir)private java.lang.StringgetInstalledStr()private booleanisComplete()private booleanisInstalled()java.lang.StringtoString(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)
-
-