fix a bug with empty mercurial repositories

This commit is contained in:
Sebastian Sdorra
2011-08-03 16:28:56 +02:00
parent 71a3776664
commit ddbe198572

View File

@@ -110,6 +110,11 @@ public class HgRepositoryClient implements RepositoryClient
@Override
public void checkout() throws RepositoryClientException
{
if (!isInitialized())
{
init();
}
SimpleCommand cmd = new SimpleCommand(hg, "-R",
localRepository.getAbsolutePath(), "pull", remoteURL);
@@ -194,6 +199,19 @@ public class HgRepositoryClient implements RepositoryClient
}
}
//~--- get methods ----------------------------------------------------------
/**
* Method description
*
*
* @return
*/
private boolean isInitialized()
{
return new File(localRepository, ".hg").exists();
}
//~--- fields ---------------------------------------------------------------
/** Field description */