protected function executeHgCommand($cmd)
{
if ($this->dryRun) {
$binary = 'hg --dry-run ';
} else {
$binary = 'hg ';
}
// Execute
$cmd = $binary . $cmd;
exec($cmd, $result, $exitCode);
if ($exitCode !== 0) {
throw new \Liip\RMT\Exception('Error while executing hg command: ' . $cmd);
}
return $result;
}