Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(80)

Side by Side Diff: appengine/chromium_rietveld/codereview/revert_patchset.py

Issue 773083004: Rietveld: Display the remote tracked ref in both old and new UIs (Closed) Base URL: https://chromium.googlesource.com/infra/infra@master
Patch Set: remote_branch -> target_ref Created 6 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 # Copyright 2013 Google Inc. 1 # Copyright 2013 Google Inc.
2 # 2 #
3 # Licensed under the Apache License, Version 2.0 (the "License"); 3 # Licensed under the Apache License, Version 2.0 (the "License");
4 # you may not use this file except in compliance with the License. 4 # you may not use this file except in compliance with the License.
5 # You may obtain a copy of the License at 5 # You may obtain a copy of the License at
6 # 6 #
7 # http://www.apache.org/licenses/LICENSE-2.0 7 # http://www.apache.org/licenses/LICENSE-2.0
8 # 8 #
9 # Unless required by applicable law or agreed to in writing, software 9 # Unless required by applicable law or agreed to in writing, software
10 # distributed under the License is distributed on an "AS IS" BASIS, 10 # distributed under the License is distributed on an "AS IS" BASIS,
(...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after
167 subject = _get_revert_subject(original_issue.subject) 167 subject = _get_revert_subject(original_issue.subject)
168 revert_reason = request.POST['revert_reason'] 168 revert_reason = request.POST['revert_reason']
169 revert_cq = request.POST['revert_cq'] == '1' 169 revert_cq = request.POST['revert_cq'] == '1'
170 description = _get_revert_description( 170 description = _get_revert_description(
171 request, revert_reason, reviewers, original_issue, original_patch_num, 171 request, revert_reason, reviewers, original_issue, original_patch_num,
172 original_patchset_id) 172 original_patchset_id)
173 issue = models.Issue(subject=subject, 173 issue = models.Issue(subject=subject,
174 description=description, 174 description=description,
175 project=original_issue.project, 175 project=original_issue.project,
176 base=original_issue.base, 176 base=original_issue.base,
177 target_ref=original_issue.target_ref,
177 repo_guid=original_issue.repo_guid, 178 repo_guid=original_issue.repo_guid,
178 reviewers=reviewers, 179 reviewers=reviewers,
179 cc=original_issue.cc, 180 cc=original_issue.cc,
180 private=original_issue.private, 181 private=original_issue.private,
181 n_comments=0, 182 n_comments=0,
182 commit=False, # Do not check the commit box yet. 183 commit=False, # Do not check the commit box yet.
183 key=issue_key) 184 key=issue_key)
184 pending_commits.append(issue) 185 pending_commits.append(issue)
185 186
186 # Create the new revert patchset to use as the key in the new patches. 187 # Create the new revert patchset to use as the key in the new patches.
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after
293 issue.put() 294 issue.put()
294 295
295 return HttpResponseRedirect(reverse('codereview.views.show', 296 return HttpResponseRedirect(reverse('codereview.views.show',
296 args=[issue.key.id()])) 297 args=[issue.key.id()]))
297 298
298 299
299 def _db_commit_all_pending_commits(pending_commits): 300 def _db_commit_all_pending_commits(pending_commits):
300 """Puts all pending commits into the DB.""" 301 """Puts all pending commits into the DB."""
301 for pending_commit in pending_commits: 302 for pending_commit in pending_commits:
302 pending_commit.put() 303 pending_commit.put()
OLDNEW
« no previous file with comments | « appengine/chromium_rietveld/codereview/models.py ('k') | appengine/chromium_rietveld/codereview/views.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698