Call validateRevision(), not isValidRevision(), fixes issue 657

This commit is contained in:
Thomas Keller 2011-04-01 11:15:13 +02:00
parent 67d8936083
commit 346b2c6cf8

View File

@ -94,7 +94,7 @@ class IDF_Scm_Mercurial extends IDF_Scm
escapeshellarg($this->repo), escapeshellarg($this->repo),
escapeshellarg($rev)); escapeshellarg($rev));
$cmd = Pluf::f('idf_exec_cmd_prefix', '').$cmd; $cmd = Pluf::f('idf_exec_cmd_prefix', '').$cmd;
self::exec('IDF_Scm_Mercurial::isValidRevision', $cmd, $out, $ret); self::exec('IDF_Scm_Mercurial::validateRevision', $cmd, $out, $ret);
// FIXME: apparently a given hg revision can also be ambigious - // FIXME: apparently a given hg revision can also be ambigious -
// handle this case here sometime // handle this case here sometime
@ -336,7 +336,7 @@ class IDF_Scm_Mercurial extends IDF_Scm
*/ */
public function getCommit($commit, $getdiff=false) public function getCommit($commit, $getdiff=false)
{ {
if (!$this->isValidRevision($commit)) { if ($this->validateRevision($commit) != IDF_Scm::REVISION_VALID) {
return false; return false;
} }
$tmpl = ($getdiff) $tmpl = ($getdiff)