2 require_once 'MTrack/SCM.php';
4 abstract class MTrackSCMFile {
5 /** reference to the associated MTrackSCM object */
8 /** full path to file, with a leading slash (which represents
9 * the root of its respective repo */
12 /** if true, this file represents a directory */
13 public $is_dir = false;
18 function __construct(MTrackSCM $repo, $name, $rev, $is_dir = false)
23 $this->is_dir = $is_dir;
26 /** Returns an MTrackSCMEvent corresponding to this revision of
28 abstract public function getChangeEvent();
30 /** Returns a stream representing the contents of the file at
32 abstract public function cat();
34 /** Returns an array of MTrackSCMAnnotation objects that correspond to
35 * each line of file content, annotating when the line was last
36 * changed. The array is keyed by line number, 1-based. */
37 abstract public function annotate($include_line_content = false);