summaryrefslogtreecommitdiffstats
path: root/project.py
diff options
context:
space:
mode:
authorJonathan Nieder <jrn@google.com>2017-08-08 18:34:53 +0000
committerJonathan Nieder <jrn@google.com>2017-08-08 18:34:53 +0000
commitc94d6eb90233421b431adbd5a01b7ec24729a285 (patch)
treeab8bb74e27b845419ef57048044d758ff3eb1d3f /project.py
parentd88f53e2b9634b9645f80b2d8e653beac24711fe (diff)
downloadgit-repo-c94d6eb90233421b431adbd5a01b7ec24729a285.tar.gz
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
Diffstat (limited to 'project.py')
-rw-r--r--project.py10
1 files changed, 9 insertions, 1 deletions
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):
175 175
176 def UploadForReview(self, people, 176 def UploadForReview(self, people,
177 auto_topic=False, 177 auto_topic=False,
178 draft=False,
178 private=False, 179 private=False,
179 wip=False, 180 wip=False,
180 dest_branch=None): 181 dest_branch=None):
181 self.project.UploadForReview(self.name, 182 self.project.UploadForReview(self.name,
182 people, 183 people,
183 auto_topic=auto_topic, 184 auto_topic=auto_topic,
185 draft=draft,
184 private=private, 186 private=private,
185 wip=wip, 187 wip=wip,
186 dest_branch=dest_branch) 188 dest_branch=dest_branch)
@@ -1108,6 +1110,7 @@ class Project(object):
1108 def UploadForReview(self, branch=None, 1110 def UploadForReview(self, branch=None,
1109 people=([], []), 1111 people=([], []),
1110 auto_topic=False, 1112 auto_topic=False,
1113 draft=False,
1111 private=False, 1114 private=False,
1112 wip=False, 1115 wip=False,
1113 dest_branch=None): 1116 dest_branch=None):
@@ -1153,7 +1156,12 @@ class Project(object):
1153 if dest_branch.startswith(R_HEADS): 1156 if dest_branch.startswith(R_HEADS):
1154 dest_branch = dest_branch[len(R_HEADS):] 1157 dest_branch = dest_branch[len(R_HEADS):]
1155 1158
1156 ref_spec = '%s:refs/for/%s' % (R_HEADS + branch.name, dest_branch) 1159 upload_type = 'for'
1160 if draft:
1161 upload_type = 'drafts'
1162
1163 ref_spec = '%s:refs/%s/%s' % (R_HEADS + branch.name, upload_type,
1164 dest_branch)
1157 if auto_topic: 1165 if auto_topic:
1158 ref_spec = ref_spec + '/' + branch.name 1166 ref_spec = ref_spec + '/' + branch.name
1159 1167