Fix gerrit/gitiles typo in git_cl

This is a fix to 32978d969c,
which introduced a "Landed as <gerrit link>" feature to git-cl, but
which at the last minute introduced a typo causing the whole feature
to not actually work.

BUG=661187

Change-Id: Ifef3379a51f035973bc5f3842862528f90bfdf84
Reviewed-on: https://chromium-review.googlesource.com/419782
Reviewed-by: Stephen Martinis <martiniss@chromium.org>
Commit-Queue: Aaron Gable <agable@chromium.org>
changes/82/419782/2
Aaron Gable 8 years ago committed by Commit Bot
parent f5644a927c
commit 02cdbb45a7

@ -2704,7 +2704,7 @@ class _GerritChangelistImpl(_ChangelistCodereviewBase):
print('Issue %s has been submitted.' % self.GetIssueURL()) print('Issue %s has been submitted.' % self.GetIssueURL())
links = self._GetChangeCommit().get('web_links', []) links = self._GetChangeCommit().get('web_links', [])
for link in links: for link in links:
if link.get('name') == 'gerrit' and link.get('url'): if link.get('name') == 'gitiles' and link.get('url'):
print('Landed as %s' % link.get('url')) print('Landed as %s' % link.get('url'))
break break
return 0 return 0

@ -2763,7 +2763,7 @@ class TestGitCl(TestCase):
} }
cl._codereview_impl._GetChangeCommit = lambda: { cl._codereview_impl._GetChangeCommit = lambda: {
'commit': 'deadbeef', 'commit': 'deadbeef',
'web_links': [{'name': 'gerrit', 'web_links': [{'name': 'gitiles',
'url': 'https://git.googlesource.com/test/+/deadbeef'}], 'url': 'https://git.googlesource.com/test/+/deadbeef'}],
} }
cl._codereview_impl.SubmitIssue = lambda wait_for_merge: None cl._codereview_impl.SubmitIssue = lambda wait_for_merge: None

Loading…
Cancel
Save