mirror of
https://github.com/scm-manager/scm-manager.git
synced 2025-11-10 07:25:44 +01:00
fix bug in HgRepositoryClient
This commit is contained in:
@@ -133,11 +133,16 @@ public class HgRepositoryClient extends AbstractRepositoryClient
|
||||
@Override
|
||||
public void commit(String message) throws RepositoryClientException
|
||||
{
|
||||
SimpleCommand cmd = new SimpleCommand(hg, "-R",
|
||||
localRepository.getAbsolutePath(), "commit", "-m",
|
||||
message);
|
||||
SimpleCommand cmd = null;
|
||||
|
||||
if (pendingCommit)
|
||||
{
|
||||
cmd = new SimpleCommand(hg, "-R", localRepository.getAbsolutePath(),
|
||||
"commit", "-m", message);
|
||||
execute(cmd);
|
||||
pendingCommit = false;
|
||||
}
|
||||
|
||||
execute(cmd);
|
||||
cmd = new SimpleCommand(hg, "-R", localRepository.getAbsolutePath(),
|
||||
"push", remoteURL);
|
||||
execute(cmd);
|
||||
@@ -173,6 +178,7 @@ public class HgRepositoryClient extends AbstractRepositoryClient
|
||||
new File(localRepository, file).getAbsolutePath());
|
||||
|
||||
execute(cmd);
|
||||
pendingCommit = true;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -218,6 +224,9 @@ public class HgRepositoryClient extends AbstractRepositoryClient
|
||||
/** Field description */
|
||||
private String hg;
|
||||
|
||||
/** Field description */
|
||||
private boolean pendingCommit = false;
|
||||
|
||||
/** Field description */
|
||||
private String remoteURL;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user