mirror of
https://github.com/scm-manager/scm-manager.git
synced 2025-11-10 23:45:44 +01:00
fix a bug with empty mercurial repositories
This commit is contained in:
@@ -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 */
|
||||
|
||||
Reference in New Issue
Block a user