Set target branch of the fork.

@param string $path
Installation path where "openy-project" is placed.

@param string $branch
Branch name.
355572
function OpenySetBranch($path, $branch) {
    $this->taskComposerRequire()
      ->dir($path . '/openy-project')
      ->dependency('ymcatwincities/openy', $branch)
      ->ansi(TRUE)
      ->run();
  }
173654
protected function setSourcePath($path)
    {
        if ($this->sourcePath === self::BASE_PATH) {
            $this->sourcePath = $path;
        } elseif ($this->sourcePath === self::EMPTY_PATH) {
            $this->sourcePath = null;
        }
    }
1078904
function OpenyInstall($path) {
    $this->taskComposerInstall()
      ->dir($path . '/openy-project')
      ->noInteraction()
      ->ansi(TRUE)
      ->run();
  }
1286740
public function init($path = null)
    {
        $path = is_null($path) ? $this->environment->path : $path;

        // Check if clone already exists at this path. If so we can safely skip.
        if (file_exists($path)) {
            $wrapper = new GitWrapper();
            $wrapper->setTimeout(3600);

            try {
                $working_copy = new GitWorkingCopy($wrapper, $path);
                $output = $working_copy->remote('-v');
            } catch (GitException $e) {
                throw new \Exception('Path already exists.');
            }

            // if repo exists in the remotes already, this working copy is ok.
            if (strpos(strtolower($output), strtolower($this->app->repo)) !== false) {
                return true;
            } else {
                throw new Exception('Git clone already exists at that path, but it is not for this app.');
            }
        }

        try {
            // Create App folder
            mkdir($path, 0755, TRUE);
            chdir($path);

            // Clone repo
            $wrapper = new GitWrapper();
            $wrapper->setTimeout(3600);
            $wrapper->streamOutput();
            $wrapper->cloneRepository($this->app->repo, $path);

            // Checkout correct version.
            $git = new GitWorkingCopy($wrapper, $this->getSourcePath());
            $git->checkout($this->environment->version);

        } catch (\GitWrapper\GitException $e) {

            // If exception is because there is no git ref, continue.
            if (strpos($e->getMessage(), 'error: pathspec') !== 0) {
                return false;
            }
        }

        chdir($path);
        $wrapper->git('branch');
        $wrapper->git('status');
        $this->loadConfig();

        // Run the build hooks
        if (!empty($this->config['hooks']['build'])) {
            chdir($this->getSourcePath());
            $process = new Process($this->config['hooks']['build']);
            $process->run(function ($type, $buffer) {
                if (Process::ERR === $type) {
                    echo $buffer;
                } else {
                    echo $buffer;
                }
            });
        }

        return $this->writeConfig();
    }
861711
public function setPath($path)
    {
        $this->parts = Path::translatePath($this->outer->getProject(), $path);
    }
1266909
public static function setPathCreated(string $path): void
    {
        if (!self::$registered) {
            self::$registered = self::registerShutdownFunction();
        }
        $realPath = realpath($path);
        if (!$realPath) {
            throw new DoctrineStaticMetaException("path $path does not seem to exist");
        }
        self::$pathsCreated[$realPath] = $realPath;
    }
1287354
public function setPath($path)
    {
        if (!$this->databaseIsPath) {
            $path = ltrim($path, '/');
        }
        $this->setDatabase($path);
    }
501780
public function setPath($path)
    {
        if(empty($path)) {
            $this->_path = '/';
        } else {
            $this->_path = $path;
        }

        return $this;
    }
421548
protected function setPathInfo($path)
    {
        $key = 'urlMapper.' . ltrim($this->request->getBaseUrl(), '/') . $this->request->getPathInfo();
        $this->request->setPathInfo($path);
        $this->statsD->increment($key);
    }
982323
public function updateSourceCode($branch = CFG_GIT_BRANCH)
    {
        // Check that name is not any other command
        if (!FileSystem::checkFileName($branch)) {
            return $this;
        }

        // To use this command owner of folder and git repository must be the same as web user
        exec('git reset --hard origin/' . $branch . ' 2>&1; git pull -v origin ' . $branch . ' 2>&1', $out);
        if ($out) {
            $this->result_message[] = $out;
        }

        // Clear all caches - may be required to show fresh data
        @Cacher::getInstance()->clearAllCaches();

        // Invalidate all frontend assets
        $setting = SettingEntityRepository::findOneEntityByCriteria(['name' => 'last_assets_invalidate_time']);
        if (!$setting) {
            $setting = new SettingEntity();
            $setting->setName('last_assets_invalidate_time');
        }

        $setting->setValue(NOW);
        $setting->save();

        return $this;
    }
443484
public function setPath($path)
    {
        if (!file_exists($path) || !is_dir($path)) {
            throw new \InvalidArgumentException(
                'Expected the template path to be an existing directory, received: '.$path
            );
        }

        $this->path = $path;
    }
944175
public function setRuntimePath($path)
    {
        $this->_runtimePath = $this->getAlias($path);
        $this->setAlias('@runtime', $this->_runtimePath);
    }
679573
protected function _setDir($path) {
        if ($handle = opendir($path)) {
            while (false !== ($entry = readdir($handle))) {
                $extension = explode('.', basename($entry));
                $ext = $extension[count($extension) - 1];

                if ($ext == $this->_type) {
                    $this->_setFile($path . $entry);
                }
            }

            closedir($handle);
        }
    }
375953
private function setPath($path)
    {
        $parts = pathinfo($path);

        $this->info['path'] = [];

        if (isset($parts['dirname'])) {
            foreach (explode('/', str_replace(DIRECTORY_SEPARATOR, '/', $parts['dirname'])) as $dir) {
                if ($dir !== '') {
                    $this->info['path'][] = $dir;
                }
            }
        }

        $this->info['file'] = isset($parts['filename']) ? $parts['filename'] : null;
        $this->info['extension'] = isset($parts['extension']) ? $parts['extension'] : null;
    }
827467
public function setPath($path)
	{
		$path = trim($path, '/');

		if (strlen($path) > 0)
		{
			$this->_path = '/' . $path . '/';
		}
		else
		{
			$this->_path = '/';
		}

		if ($this->_urlsInited)
		{
			$this->_initUrls();
		}
	}
1099639
public function setPath($path)
    {
        // clear out the prior search dirs
        $this->configList[self::TPL_PATH_LIST] = [];
        // always add the fallback directories as last resort
        $this->addPath('.');
        // actually add the user-specified directory
        $this->addPath($path);
    }
857212
public function setRuntimePath($path)
    {
        $this->_runtimePath = Zilf::getAlias($path);
        Zilf::setAlias('@runtime', $this->_runtimePath);
    }