Changeset View
Changeset View
Standalone View
Standalone View
src/workingcopy/ArcanistWorkingCopy.php
<?php | <?php | ||||
abstract class ArcanistWorkingCopy | abstract class ArcanistWorkingCopy | ||||
extends Phobject { | extends Phobject { | ||||
private $path; | private $path; | ||||
private $workingDirectory; | private $workingDirectory; | ||||
private $repositoryAPI; | private $repositoryAPI; | ||||
public static function newFromWorkingDirectory($path) { | public static function newFromWorkingDirectory($path) { | ||||
$working_types = id(new PhutilClassMapQuery()) | $working_types = (new PhutilClassMapQuery()) | ||||
->setAncestorClass(__CLASS__) | ->setAncestorClass(__CLASS__) | ||||
->execute(); | ->execute(); | ||||
$paths = Filesystem::walkToRoot($path); | $paths = Filesystem::walkToRoot($path); | ||||
$paths = array_reverse($paths); | $paths = array_reverse($paths); | ||||
$candidates = array(); | $candidates = array(); | ||||
foreach ($paths as $path_key => $ancestor_path) { | foreach ($paths as $path_key => $ancestor_path) { | ||||
▲ Show 20 Lines • Show All 122 Lines • Show Last 20 Lines |
Content licensed under Creative Commons Attribution-ShareAlike 4.0 (CC-BY-SA) unless otherwise noted; code licensed under Apache 2.0 or other open source licenses. · CC BY-SA 4.0 · Apache 2.0