getRevision() public method

Returns the last revision of the current file on the HEAD branch.
public getRevision ( ) : string
return string Last revision of the current file.
Ejemplo n.º 1
0
Archivo: Git.php Proyecto: horde/horde
 /**
  * Returns the last revision of the current file on the HEAD branch.
  *
  * @return string  Last revision of the current file.
  * @throws Horde_Vcs_Exception
  */
 public function getRevision()
 {
     $this->_ensureInitialized();
     if (empty($this->_branch)) {
         return parent::getRevision();
     }
     $rev = reset($this->_revlist[$this->_branch]);
     if (is_null($rev)) {
         throw new Horde_Vcs_Exception('No revisions');
     }
     return $rev;
 }