diff options
author | Shawn O. Pearce <sop@google.com> | 2009-01-26 10:55:39 -0800 |
---|---|---|
committer | Shawn O. Pearce <sop@google.com> | 2009-01-26 10:55:39 -0800 |
commit | 370e3fa6660fa2eb675199104cde9e9d02063cfd (patch) | |
tree | 5ff9e8399be3a6ba7db48f20c00c86989634445f /project.py | |
parent | b54a392c9a267a06058b663377282c9dcec6878e (diff) | |
download | git-repo-370e3fa6660fa2eb675199104cde9e9d02063cfd.tar.gz |
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 <sop@google.com>
Diffstat (limited to 'project.py')
-rw-r--r-- | project.py | 29 |
1 files changed, 1 insertions, 28 deletions
@@ -24,10 +24,8 @@ import urllib2 | |||
24 | from color import Coloring | 24 | from color import Coloring |
25 | from git_command import GitCommand | 25 | from git_command import GitCommand |
26 | from git_config import GitConfig, IsId | 26 | from git_config import GitConfig, IsId |
27 | from gerrit_upload import UploadBundle | ||
28 | from error import GitError, ImportError, UploadError | 27 | from error import GitError, ImportError, UploadError |
29 | from remote import Remote | 28 | from remote import Remote |
30 | from codereview import proto_client | ||
31 | 29 | ||
32 | HEAD = 'HEAD' | 30 | HEAD = 'HEAD' |
33 | R_HEADS = 'refs/heads/' | 31 | R_HEADS = 'refs/heads/' |
@@ -481,32 +479,7 @@ class Project(object): | |||
481 | branch.remote.projectname = self.name | 479 | branch.remote.projectname = self.name |
482 | branch.remote.Save() | 480 | branch.remote.Save() |
483 | 481 | ||
484 | if branch.remote.ReviewProtocol == 'http-post': | 482 | if branch.remote.ReviewProtocol == 'ssh': |
485 | base_list = [] | ||
486 | for name, id in self._allrefs.iteritems(): | ||
487 | if branch.remote.WritesTo(name): | ||
488 | base_list.append(not_rev(name)) | ||
489 | if not base_list: | ||
490 | raise GitError('no base refs, cannot upload %s' % branch.name) | ||
491 | |||
492 | print >>sys.stderr, '' | ||
493 | _info("Uploading %s to %s:", branch.name, self.name) | ||
494 | try: | ||
495 | UploadBundle(project = self, | ||
496 | server = branch.remote.review, | ||
497 | email = self.UserEmail, | ||
498 | dest_project = branch.remote.projectname, | ||
499 | dest_branch = dest_branch, | ||
500 | src_branch = R_HEADS + branch.name, | ||
501 | bases = base_list, | ||
502 | people = people, | ||
503 | replace_changes = replace_changes) | ||
504 | except proto_client.ClientLoginError: | ||
505 | raise UploadError('Login failure') | ||
506 | except urllib2.HTTPError, e: | ||
507 | raise UploadError('HTTP error %d' % e.code) | ||
508 | |||
509 | elif branch.remote.ReviewProtocol == 'ssh': | ||
510 | if dest_branch.startswith(R_HEADS): | 483 | if dest_branch.startswith(R_HEADS): |
511 | dest_branch = dest_branch[len(R_HEADS):] | 484 | dest_branch = dest_branch[len(R_HEADS):] |
512 | 485 | ||