Correct Aphlict websocket URI construction after PHP8 compatibility changes
[phabricator.git] / src / applications / diffusion / request / DiffusionMercurialRequest.php
blob8375b2081241cf70d2031732759258384208d8cc
1 <?php
3 final class DiffusionMercurialRequest extends DiffusionRequest {
5 protected function isStableCommit($symbol) {
6 return $symbol !== null && preg_match('/^[a-f0-9]{40}\z/', $symbol);
9 public function getBranch() {
10 if ($this->branch) {
11 return $this->branch;
14 if ($this->repository) {
15 return $this->repository->getDefaultBranch();
18 throw new Exception(pht('Unable to determine branch!'));