1
0
Fork 0

Some changes as suggested in the pr

pull/154/head
Matthias Pigulla 2011-12-10 14:11:51 +01:00
parent 4e1cb32f8c
commit 7cdb8b6b3b
2 changed files with 14 additions and 10 deletions

View File

@ -172,11 +172,15 @@ class HgDriver implements VcsDriverInterface
*/ */
public static function supports($url, $deep = false) public static function supports($url, $deep = false)
{ {
if ($deep) { if (preg_match('#(^(?:https?|ssh)://(?:[^@]@)?bitbucket.org|https://(?:.*?)\.kilnhg.com)#i', $url)) {
exec(sprintf('hg identify %s', escapeshellarg($url)), $outputIgnored, $exit); return true;
return $exit == 0; }
}
if (!$deep) {
return false;
}
return false; exec(sprintf('hg identify %s', escapeshellarg($url)), null, $exit);
return $exit == 0;
} }
} }

View File

@ -174,11 +174,11 @@ class SvnDriver implements VcsDriverInterface
return true; return true;
} }
if ($deep) { if (!$deep) {
@exec(sprintf('svn info --non-interactive %s 2>/dev/null', escapeshellarg($url)), $outputIgnored, $exit); return false;
return $exit == 0;
} }
return false; @exec(sprintf('svn info --non-interactive %s 2>/dev/null', escapeshellarg($url)), null, $exit);
return $exit == 0;
} }
} }