git-cl: Print Rietveld deprecation warning

To encourage folks to upload to Gerrit.

Bug: 685321
Change-Id: I849ed53f95a2205959237fe825ffe41e349ff8c7
Reviewed-on: https://chromium-review.googlesource.com/510963
Reviewed-by: Andrew Bonventre <andybons@chromium.org>
Commit-Queue: Aaron Gable <agable@chromium.org>
diff --git a/git_cl.py b/git_cl.py
index 8bb7cd0..4171243 100755
--- a/git_cl.py
+++ b/git_cl.py
@@ -1592,6 +1592,16 @@
       base_branch = self.GetCommonAncestorWithUpstream()
       git_diff_args = [base_branch, 'HEAD']
 
+    # Warn about Rietveld deprecation for initial uploads to Rietveld.
+    if not self.IsGerrit() and not self.GetIssue():
+      print('=====================================')
+      print('NOTICE: Rietveld is being deprecated. '
+            'You can upload changes to Gerrit with')
+      print('  git cl upload --gerrit')
+      print('or set Gerrit to be your default code review tool with')
+      print('  git config gerrit.host true')
+      print('=====================================')
+
     # Fast best-effort checks to abort before running potentially
     # expensive hooks if uploading is likely to fail anyway. Passing these
     # checks does not guarantee that uploading will not fail.