diff --git a/git_cl.py b/git_cl.py index 6f25e4aa4..f32709728 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() diff --git a/tests/git_cl_test.py b/tests/git_cl_test.py index cc01ae3b8..6d4827c36 100755 --- a/tests/git_cl_test.py +++ b/tests/git_cl_test.py @@ -795,10 +795,6 @@ class TestGitCl(TestCase): # If issue is given, then description is fetched from Gerrit instead. if issue is None: - if squash: - calls += [ - ((['git', 'show', '--format=%B', '-s', - 'refs/heads/git_cl_uploads/master'],), '')] calls += [ ((['git', 'log', '--pretty=format:%s\n\n%b', 'fake_ancestor_sha..HEAD'],),