From 370e3fa6660fa2eb675199104cde9e9d02063cfd Mon Sep 17 00:00:00 2001 From: "Shawn O. Pearce" Date: Mon, 26 Jan 2009 10:55:39 -0800 Subject: Remove the protobuf based HTTP upload code path Now that Gerrit2 has been released and the only supported upload protocol is direct git push over SSH we no longer need the large and complex protobuf client library, or the upload chunking logic in gerrit_upload.py. Signed-off-by: Shawn O. Pearce --- project.py | 29 +---------------------------- 1 file changed, 1 insertion(+), 28 deletions(-) (limited to 'project.py') diff --git a/project.py b/project.py index 5d036c35..eebe96d5 100644 --- a/project.py +++ b/project.py @@ -24,10 +24,8 @@ import urllib2 from color import Coloring from git_command import GitCommand from git_config import GitConfig, IsId -from gerrit_upload import UploadBundle from error import GitError, ImportError, UploadError from remote import Remote -from codereview import proto_client HEAD = 'HEAD' R_HEADS = 'refs/heads/' @@ -481,32 +479,7 @@ class Project(object): branch.remote.projectname = self.name branch.remote.Save() - if branch.remote.ReviewProtocol == 'http-post': - base_list = [] - for name, id in self._allrefs.iteritems(): - if branch.remote.WritesTo(name): - base_list.append(not_rev(name)) - if not base_list: - raise GitError('no base refs, cannot upload %s' % branch.name) - - print >>sys.stderr, '' - _info("Uploading %s to %s:", branch.name, self.name) - try: - UploadBundle(project = self, - server = branch.remote.review, - email = self.UserEmail, - dest_project = branch.remote.projectname, - dest_branch = dest_branch, - src_branch = R_HEADS + branch.name, - bases = base_list, - people = people, - replace_changes = replace_changes) - except proto_client.ClientLoginError: - raise UploadError('Login failure') - except urllib2.HTTPError, e: - raise UploadError('HTTP error %d' % e.code) - - elif branch.remote.ReviewProtocol == 'ssh': + if branch.remote.ReviewProtocol == 'ssh': if dest_branch.startswith(R_HEADS): dest_branch = dest_branch[len(R_HEADS):] -- cgit v1.2.3-54-g00ecf