mercurial support for directory structures

This commit is contained in:
Sebastian Sdorra
2011-10-23 16:39:09 +02:00
parent fc5c1f2a44
commit 09dc9af0cb
6 changed files with 68 additions and 62 deletions

View File

@@ -77,7 +77,6 @@ public class UnixHgInstaller extends AbstractHgInstaller
super.install(baseDirectory, config);
// search mercurial (hg)
if (Util.isEmpty(config.getHgBinary()))
{
String hg = IOUtil.search(COMMAND_HG);
@@ -100,9 +99,8 @@ public class UnixHgInstaller extends AbstractHgInstaller
}
}
}
// search python
// search python
if (Util.isEmpty(config.getPythonBinary()))
{
config.setPythonBinary(IOUtil.search(COMMAND_PYTHON));

View File

@@ -272,8 +272,9 @@ public class WindowsHgInstaller extends AbstractHgInstaller
IOUtil.copy(templateDirectory, new File(libDir, FILE_TEMPLATES));
}
File hg = new File( hgDirectory, FILE_MERCURIAL_EXE );
if ( hg.exists() )
File hg = new File(hgDirectory, FILE_MERCURIAL_EXE);
if (hg.exists())
{
config.setHgBinary(hg.getAbsolutePath());
}
@@ -322,8 +323,8 @@ public class WindowsHgInstaller extends AbstractHgInstaller
private File getMercurialDirectory(String hgBinary)
{
File directory = null;
if ( Util.isNotEmpty(hgBinary) )
if (Util.isNotEmpty(hgBinary))
{
File hg = new File(hgBinary);
@@ -332,8 +333,8 @@ public class WindowsHgInstaller extends AbstractHgInstaller
directory = hg.getParentFile();
}
}
if ( directory == null )
if (directory == null)
{
directory = getMercurialDirectoryFromRegistry();
}