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

Unified Diff: git_cl.py

Issue 2116493002: Remove old compatibility for git_cl_upload branches. (Closed) Base URL: https://chromium.googlesource.com/chromium/tools/depot_tools.git@master
Patch Set: More code deletion Created 4 years, 6 months 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | tests/git_cl_test.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: git_cl.py
diff --git a/git_cl.py b/git_cl.py
index 7913e989d0345483b70b65e303a711adcf5365fd..b18e50e418169749a5ebc52f58d1bd992314c25c 100755
--- a/git_cl.py
+++ b/git_cl.py
@@ -2401,37 +2401,6 @@ class _GerritChangelistImpl(_ChangelistCodereviewBase):
if options.squash:
self._GerritCommitMsgHookCheck(offer_removal=not options.force)
- if not self.GetIssue():
- # TODO(tandrii): deperecate this after 2016Q2. Backwards compatibility
- # with shadow branch, which used to contain change-id for a given
- # branch, using which we can fetch actual issue number and set it as the
- # property of the branch, which is the new way.
- message = RunGitSilent([
- 'show', '--format=%B', '-s',
- 'refs/heads/git_cl_uploads/%s' % self.GetBranch()])
- if message:
- change_ids = git_footers.get_footer_change_id(message.strip())
- if change_ids and len(change_ids) == 1:
- details = self._GetChangeDetail(issue=change_ids[0])
- if details:
- print('WARNING: found old upload in branch git_cl_uploads/%s '
- 'corresponding to issue %s' %
- (self.GetBranch(), details['_number']))
- self.SetIssue(details['_number'])
- if not self.GetIssue():
- DieWithError(
- '\n' # For readability of the blob below.
- 'Found old upload in branch git_cl_uploads/%s, '
- 'but failed to find corresponding Gerrit issue.\n'
- 'If you know the issue number, set it manually first:\n'
- ' git cl issue 123456\n'
- 'If you intended to upload this CL as new issue, '
- 'just delete or rename the old upload branch:\n'
- ' git rename-branch git_cl_uploads/%s old_upload-%s\n'
- 'After that, please run git cl upload again.' %
- tuple([self.GetBranch()] * 3))
- # End of backwards compatability.
-
if self.GetIssue():
# Try to get the message from a previous upload.
message = self.GetDescription()
« no previous file with comments | « no previous file | tests/git_cl_test.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698