Fetch patches over ssh, not http.

ssh:// is a helluva lot more tested/trusted, plus we're seeing
occasional 503's out of http; thus use ssh.

Note that this change implicitly blocks people who lack gerrit
accounts from using cbuildbot; previously anonymous would've
worked (or should've).

BUG=chromium-os:33239
TEST=unittests updated, manual run.

Change-Id: I3285c301b70e36bd84e52044523f12cc992a5eaf
Reviewed-on: https://gerrit.chromium.org/gerrit/29180
Commit-Ready: Brian Harring <ferringb@chromium.org>
Tested-by: Brian Harring <ferringb@chromium.org>
Reviewed-by: David James <davidjames@chromium.org>
diff --git a/buildbot/patch.py b/buildbot/patch.py
index d61fab3..485f598 100644
--- a/buildbot/patch.py
+++ b/buildbot/patch.py
@@ -1031,7 +1031,6 @@
 
 class GerritPatch(GitRepoPatch):
   """Object that represents a Gerrit CL."""
-  _PUBLIC_URL = os.path.join(constants.GERRIT_HTTP_URL, 'gerrit/p')
 
   def __init__(self, patch_dict, internal):
     """Construct a GerritPatch object from Gerrit query results.
@@ -1087,7 +1086,7 @@
     if internal:
       url_prefix = constants.GERRIT_INT_SSH_URL
     else:
-      url_prefix = cls._PUBLIC_URL
+      url_prefix = constants.GERRIT_SSH_URL
 
     return os.path.join(url_prefix, project)
 
diff --git a/buildbot/patch_unittest.py b/buildbot/patch_unittest.py
index 2f7dd56..cf02220 100755
--- a/buildbot/patch_unittest.py
+++ b/buildbot/patch_unittest.py
@@ -574,7 +574,7 @@
     kls = cros_patch.GerritPatch
     self.assertEqual(
         kls._GetProjectUrl('monkeys', False),
-        os.path.join(kls._PUBLIC_URL, 'monkeys'))
+        os.path.join(constants.GERRIT_SSH_URL, 'monkeys'))
     self.assertEqual(
         kls._GetProjectUrl('monkeys', True),
         os.path.join(constants.GERRIT_INT_SSH_URL, 'monkeys'))