Changeset View
Changeset View
Standalone View
Standalone View
src/applications/repository/storage/PhabricatorRepositoryPushLog.php
Show First 20 Lines • Show All 152 Lines • ▼ Show 20 Lines | public function attachPushEvent(PhabricatorRepositoryPushEvent $push_event) { | ||||
return $this; | return $this; | ||||
} | } | ||||
public function getPushEvent() { | public function getPushEvent() { | ||||
return $this->assertAttached($this->pushEvent); | return $this->assertAttached($this->pushEvent); | ||||
} | } | ||||
public function getRefName() { | public function getRefName() { | ||||
if ($this->getRefNameRaw() === null) { | |||||
return null; | |||||
} | |||||
return $this->getUTF8StringFromStorage( | return $this->getUTF8StringFromStorage( | ||||
$this->getRefNameRaw(), | $this->getRefNameRaw(), | ||||
$this->getRefNameEncoding()); | $this->getRefNameEncoding()); | ||||
} | } | ||||
public function setRefName($ref_raw) { | public function setRefName($ref_raw) { | ||||
$this->setRefNameRaw($ref_raw); | $this->setRefNameRaw($ref_raw); | ||||
$this->setRefNameHash(PhabricatorHash::digestForIndex($ref_raw)); | $this->setRefNameHash(PhabricatorHash::digestForIndex($ref_raw)); | ||||
$this->setRefNameEncoding($this->detectEncodingForStorage($ref_raw)); | $this->setRefNameEncoding($this->detectEncodingForStorage($ref_raw)); | ||||
return $this; | return $this; | ||||
} | } | ||||
public function getRefOldShort() { | public function getRefOldShort() { | ||||
if ($this->getRepository()->isSVN()) { | if ($this->getRepository()->isSVN()) { | ||||
return $this->getRefOld(); | return $this->getRefOld(); | ||||
} | } | ||||
if ($this->getRefOld() === null) { | |||||
return null; | |||||
} | |||||
return substr($this->getRefOld(), 0, 12); | return substr($this->getRefOld(), 0, 12); | ||||
} | } | ||||
public function getRefNewShort() { | public function getRefNewShort() { | ||||
if ($this->getRepository()->isSVN()) { | if ($this->getRepository()->isSVN()) { | ||||
return $this->getRefNew(); | return $this->getRefNew(); | ||||
} | } | ||||
return substr($this->getRefNew(), 0, 12); | return substr($this->getRefNew(), 0, 12); | ||||
▲ Show 20 Lines • Show All 58 Lines • Show Last 20 Lines |