Issue 90: Full change log doesn't work for mercurial

master
Nathan Adams 2015-09-05 15:15:36 -05:00
parent 1c563f340b
commit 420d4fdd26
2 changed files with 18 additions and 6 deletions

View File

@ -512,11 +512,18 @@ class IDF_Scm_Mercurial extends IDF_Scm
// hg accepts revision IDs as arguments to --branch / -b as well and // hg accepts revision IDs as arguments to --branch / -b as well and
// uses the branch of the revision in question to filter the other // uses the branch of the revision in question to filter the other
// revisions // revisions
$cmd = sprintf(Pluf::f('hg_path', 'hg').' log --debug -R %s -l%s --style %s -b %s', if ($n) {
escapeshellarg($this->repo), $cmd = sprintf(Pluf::f('hg_path', 'hg').' log --debug -R %s -l%s --style %s -b %s',
$n, escapeshellarg($this->repo),
escapeshellarg($logStyle->get()), $n,
escapeshellarg($commit)); escapeshellarg($logStyle->get()),
escapeshellarg($commit));
} else {
$cmd = sprintf(Pluf::f('hg_path', 'hg').' log --debug -R %s --style %s -b %s',
escapeshellarg($this->repo),
escapeshellarg($logStyle->get()),
escapeshellarg($commit));
}
$out = array(); $out = array();
$cmd = Pluf::f('idf_exec_cmd_prefix', '').$cmd; $cmd = Pluf::f('idf_exec_cmd_prefix', '').$cmd;
self::exec('IDF_Scm_Mercurial::getChangeLog', $cmd, $out); self::exec('IDF_Scm_Mercurial::getChangeLog', $cmd, $out);

View File

@ -524,8 +524,13 @@ class IDF_Scm_Svn extends IDF_Scm
$rev = 'HEAD'; $rev = 'HEAD';
} }
$res = array(); $res = array();
$cmd = $this->svnCmd(array('log', '--xml', '-v', '--limit', $n), if ($n) {
$cmd = $this->svnCmd(array('log', '--xml', '-v', '--limit', $n),
$this->repo.'@'.$rev); $this->repo.'@'.$rev);
} else {
$cmd = $this->svnCmd(array('log', '--xml', '-v'),
$this->repo.'@'.$rev);
}
$xmlRes = self::shell_exec('IDF_Scm_Svn::getChangeLog', $cmd); $xmlRes = self::shell_exec('IDF_Scm_Svn::getChangeLog', $cmd);
$xml = simplexml_load_string($xmlRes); $xml = simplexml_load_string($xmlRes);
foreach ($xml->logentry as $entry) { foreach ($xml->logentry as $entry) {