Skip checking local vs remote patchset for Gerrit

BUG=chromium:664520

Change-Id: Idd5855e14f6237577b351ff51582335996522417
Reviewed-on: https://chromium-review.googlesource.com/399118
Commit-Queue: Andrii Shyshkalov <tandrii@chromium.org>
Reviewed-by: Andrii Shyshkalov <tandrii@chromium.org>
diff --git a/git_cl.py b/git_cl.py
index 3f26f21..73ce7b1 100755
--- a/git_cl.py
+++ b/git_cl.py
@@ -1595,7 +1595,9 @@
       if not options.reviewers and hook_results.reviewers:
         options.reviewers = hook_results.reviewers.split(',')
 
-    if self.GetIssue():
+    # TODO(tandrii): Checking local patchset against remote patchset is only
+    # supported for Rietveld. Extend it to Gerrit or remove it completely.
+    if self.GetIssue() and not self.IsGerrit():
       latest_patchset = self.GetMostRecentPatchset()
       local_patchset = self.GetPatchset()
       if (latest_patchset and local_patchset and
@@ -4883,7 +4885,9 @@
       return 1
 
   patchset = cl.GetMostRecentPatchset()
-  if patchset != cl.GetPatchset():
+  # TODO(tandrii): Checking local patchset against remote patchset is only
+  # supported for Rietveld. Extend it to Gerrit or remove it completely.
+  if not cl.IsGerrit() and patchset != cl.GetPatchset():
     print('Warning: Codereview server has newer patchsets (%s) than most '
           'recent upload from local checkout (%s). Did a previous upload '
           'fail?\n'
@@ -4935,7 +4939,9 @@
                    'Either upload first, or pass --patchset explicitely' %
                    cl.GetIssue())
 
-    if patchset != cl.GetPatchset():
+    # TODO(tandrii): Checking local patchset against remote patchset is only
+    # supported for Rietveld. Extend it to Gerrit or remove it completely.
+    if not cl.IsGerrit() and patchset != cl.GetPatchset():
       print('Warning: Codereview server has newer patchsets (%s) than most '
             'recent upload from local checkout (%s). Did a previous upload '
             'fail?\n'