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

This commit is contained in:
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
// uses the branch of the revision in question to filter the other
// revisions
$cmd = sprintf(Pluf::f('hg_path', 'hg').' log --debug -R %s -l%s --style %s -b %s',
escapeshellarg($this->repo),
$n,
escapeshellarg($logStyle->get()),
escapeshellarg($commit));
if ($n) {
$cmd = sprintf(Pluf::f('hg_path', 'hg').' log --debug -R %s -l%s --style %s -b %s',
escapeshellarg($this->repo),
$n,
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();
$cmd = Pluf::f('idf_exec_cmd_prefix', '').$cmd;
self::exec('IDF_Scm_Mercurial::getChangeLog', $cmd, $out);

View File

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