public function getBranches()
    {
        if (null === $this->branches) {
            $this->branches = array();

            if (false === $this->trunkPath) {
                $trunkParent = $this->baseUrl . '/';
            } else {
                $trunkParent = $this->baseUrl . '/' . $this->trunkPath;
            }

            $output = $this->execute('svn ls --verbose', $trunkParent);
            if ($output) {
                foreach ($this->process->splitLines($output) as $line) {
                    $line = trim($line);
                    if ($line && preg_match('{^\s*(\S+).*?(\S+)\s*$}', $line, $match)) {
                        if (isset($match[1]) && isset($match[2]) && $match[2] === './') {
                            $this->branches['trunk'] = $this->buildIdentifier(
                                '/' . $this->trunkPath,
                                $match[1]
                            );
                            $this->rootIdentifier = $this->branches['trunk'];
                            break;
                        }
                    }
                }
            }
            unset($output);

            if ($this->branchesPath !== false) {
                $output = $this->execute('svn ls --verbose', $this->baseUrl . '/' . $this->branchesPath);
                if ($output) {
                    foreach ($this->process->splitLines(trim($output)) as $line) {
                        $line = trim($line);
                        if ($line && preg_match('{^\s*(\S+).*?(\S+)\s*$}', $line, $match)) {
                            if (isset($match[1]) && isset($match[2]) && $match[2] !== './') {
                                $this->branches[rtrim($match[2], '/')] = $this->buildIdentifier(
                                    '/' . $this->branchesPath . '/' . $match[2],
                                    $match[1]
                                );
                            }
                        }
                    }
                }
            }
        }

        return $this->branches;
    }
public function getBranches()
    {
        if (null === $this->branches) {
            $this->branches = array();

            if (false === $this->trunkPath) {
                $trunkParent = $this->baseUrl . '/';
            } else {
                $trunkParent = $this->baseUrl . '/' . $this->trunkPath;
            }

            $output = $this->execute('svn ls --verbose', $trunkParent);
            if ($output) {
                foreach ($this->process->splitLines($output) as $line) {
                    $line = trim($line);
                    if ($line && preg_match('{^\s*(\S+).*?(\S+)\s*$}', $line, $match)) {
                        if (isset($match[1]) && isset($match[2]) && $match[2] === './') {
                            $this->branches['trunk'] = $this->buildIdentifier(
                                '/' . $this->trunkPath,
                                $match[1]
                            );
                            $this->rootIdentifier = $this->branches['trunk'];
                            break;
                        }
                    }
                }
            }
            unset($output);

            if ($this->branchesPath !== false) {
                $output = $this->execute('svn ls --verbose', $this->baseUrl . '/' . $this->branchesPath);
                if ($output) {
                    foreach ($this->process->splitLines(trim($output)) as $line) {
                        $line = trim($line);
                        if ($line && preg_match('{^\s*(\S+).*?(\S+)\s*$}', $line, $match)) {
                            if (isset($match[1]) && isset($match[2]) && $match[2] !== './') {
                                $this->branches[rtrim($match[2], '/')] = $this->buildIdentifier(
                                    '/' . $this->branchesPath . '/' . $match[2],
                                    $match[1]
                                );
                            }
                        }
                    }
                }
            }
        }

        return $this->branches;
    }
public function getBranches ( ) { if ( null === $ this -> branches ) { $ this -> branches = array ( ) ; if ( false === $ this -> trunkPath ) { $ trunkParent = $ this -> baseUrl . '/' ; } else { $ trunkParent = $ this -> baseUrl . '/' . $ this -> trunkPath ; } $ output = $ this -> execute ( 'svn ls --verbose' , $ trunkParent ) ; if ( $ output ) { foreach ( $ this -> process -> splitLines ( $ output ) as $ line ) { $ line = trim ( $ line ) ; if ( $ line && preg_match ( '{^\s*(\S+).*?(\S+)\s*$}' , $ line , $ match ) ) { if ( isset ( $ match [ 1 ] ) && isset ( $ match [ 2 ] ) && $ match [ 2 ] === './' ) { $ this -> branches [ 'trunk' ] = $ this -> buildIdentifier ( '/' . $ this -> trunkPath , $ match [ 1 ] ) ; $ this -> rootIdentifier = $ this -> branches [ 'trunk' ] ; break ; } } } } unset ( $ output ) ; if ( $ this -> branchesPath !== false ) { $ output = $ this -> execute ( 'svn ls --verbose' , $ this -> baseUrl . '/' . $ this -> branchesPath ) ; if ( $ output ) { foreach ( $ this -> process -> splitLines ( trim ( $ output ) ) as $ line ) { $ line = trim ( $ line ) ; if ( $ line && preg_match ( '{^\s*(\S+).*?(\S+)\s*$}' , $ line , $ match ) ) { if ( isset ( $ match [ 1 ] ) && isset ( $ match [ 2 ] ) && $ match [ 2 ] !== './' ) { $ this -> branches [ rtrim ( $ match [ 2 ] , '/' ) ] = $ this -> buildIdentifier ( '/' . $ this -> branchesPath . '/' . $ match [ 2 ] , $ match [ 1 ] ) ; } } } } } } return $ this -> branches ; }
{@inheritDoc}
{