Changeset View
Changeset View
Standalone View
Standalone View
src/applications/differential/storage/DifferentialChangeset.php
Show First 20 Lines • Show All 69 Lines • ▼ Show 20 Lines | final class DifferentialChangeset extends DifferentialDAO | ||||
public function getDisplayFilename() { | public function getDisplayFilename() { | ||||
$name = $this->getFilename(); | $name = $this->getFilename(); | ||||
if ($this->getFileType() == DifferentialChangeType::FILE_DIRECTORY) { | if ($this->getFileType() == DifferentialChangeType::FILE_DIRECTORY) { | ||||
$name .= '/'; | $name .= '/'; | ||||
} | } | ||||
return $name; | return $name; | ||||
} | } | ||||
public function getOwnersFilename() { | |||||
// TODO: For Subversion, we should adjust these paths to be relative to | |||||
// the repository root where possible. | |||||
$path = $this->getFilename(); | |||||
if (!isset($path[0])) { | |||||
return '/'; | |||||
} | |||||
if ($path[0] != '/') { | |||||
$path = '/'.$path; | |||||
} | |||||
return $path; | |||||
} | |||||
public function addUnsavedHunk(DifferentialHunk $hunk) { | public function addUnsavedHunk(DifferentialHunk $hunk) { | ||||
if ($this->hunks === self::ATTACHABLE) { | if ($this->hunks === self::ATTACHABLE) { | ||||
$this->hunks = array(); | $this->hunks = array(); | ||||
} | } | ||||
$this->hunks[] = $hunk; | $this->hunks[] = $hunk; | ||||
$this->unsavedHunks[] = $hunk; | $this->unsavedHunks[] = $hunk; | ||||
return $this; | return $this; | ||||
} | } | ||||
▲ Show 20 Lines • Show All 137 Lines • Show Last 20 Lines |