Index: trunk/extensions/CodeReview/backend/Subversion.php |
— | — | @@ -57,9 +57,18 @@ |
58 | 58 | */ |
59 | 59 | class SubversionPecl extends SubversionAdaptor { |
60 | 60 | |
| 61 | + /** |
| 62 | + * Using undocumented svn_info function. Looking at the source, this has |
| 63 | + * existed since version 0.3 of the Pecl extension (per release notes). |
| 64 | + * Nobody ever bothered filling in the documentation on php.net though. |
| 65 | + * The function returns a big array of a bunch of info about the repository |
| 66 | + * It throws a warning if the repository does not exist. |
| 67 | + */ |
61 | 68 | function canConnect() { |
62 | | - // TODO! |
63 | | - return true; |
| 69 | + wfSuppressWarnings(); |
| 70 | + $result = svn_info( $this->mRepo ); |
| 71 | + wfRestoreWarnings(); |
| 72 | + return (bool)$result; |
64 | 73 | } |
65 | 74 | |
66 | 75 | function getFile( $path, $rev = null ) { |