From c94d6eb90233421b431adbd5a01b7ec24729a285 Mon Sep 17 00:00:00 2001 From: Jonathan Nieder Date: Tue, 8 Aug 2017 18:34:53 +0000 Subject: Revert "Migrate git-repo to create private changes rather than drafts" This reverts commit d88f53e2b9634b9645f80b2d8e653beac24711fe. I merged it too hastily without paying enough attention to compatibility with released Gerrit versions. Change-Id: I4028d4737df1255f11e217da183a19a010597d5b --- project.py | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'project.py') diff --git a/project.py b/project.py index 5e209510..0b7baeed 100644 --- a/project.py +++ b/project.py @@ -175,12 +175,14 @@ class ReviewableBranch(object): def UploadForReview(self, people, auto_topic=False, + draft=False, private=False, wip=False, dest_branch=None): self.project.UploadForReview(self.name, people, auto_topic=auto_topic, + draft=draft, private=private, wip=wip, dest_branch=dest_branch) @@ -1108,6 +1110,7 @@ class Project(object): def UploadForReview(self, branch=None, people=([], []), auto_topic=False, + draft=False, private=False, wip=False, dest_branch=None): @@ -1153,7 +1156,12 @@ class Project(object): if dest_branch.startswith(R_HEADS): dest_branch = dest_branch[len(R_HEADS):] - ref_spec = '%s:refs/for/%s' % (R_HEADS + branch.name, dest_branch) + upload_type = 'for' + if draft: + upload_type = 'drafts' + + ref_spec = '%s:refs/%s/%s' % (R_HEADS + branch.name, upload_type, + dest_branch) if auto_topic: ref_spec = ref_spec + '/' + branch.name -- cgit v1.2.3-54-g00ecf