浏览代码

Fix gerrit/gitiles typo in git_cl

This is a fix to 32978d969ce27fa9568b30f0cdb556036a645d1e,
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>
Aaron Gable 8 年之前
父节点
当前提交
02cdbb45a7
共有 2 个文件被更改,包括 2 次插入2 次删除
  1. 1 1
      git_cl.py
  2. 1 1
      tests/git_cl_test.py

+ 1 - 1
git_cl.py

@@ -2704,7 +2704,7 @@ class _GerritChangelistImpl(_ChangelistCodereviewBase):
     print('Issue %s has been submitted.' % self.GetIssueURL())
     links = self._GetChangeCommit().get('web_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'))
         break
     return 0

+ 1 - 1
tests/git_cl_test.py

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