Index: git_cl.py |
diff --git a/git_cl.py b/git_cl.py |
index 869154cdc219e00444f941ee483f24a8317f312e..f836a0501f82119c3fccae9cab94b3b587efe55e 100755 |
--- a/git_cl.py |
+++ b/git_cl.py |
@@ -1290,6 +1290,15 @@ def CMDupload(parser, args): |
if not options.reviewers and hook_results.reviewers: |
options.reviewers = hook_results.reviewers |
+ if cl.GetIssue(): |
+ latest_patchset = cl.GetMostRecentPatchset(cl.GetIssue()) |
+ local_patchset = cl.GetPatchset() |
+ if local_patchset != latest_patchset: |
+ print ('The last upload made from this repository was patchset #%d but ' |
+ 'the most recent patchset on the server is #%d.' |
+ % (local_patchset, latest_patchset)) |
+ ask_for_data('About to upload; enter to confirm.') |
+ |
print_stats(options.similarity, options.find_copies, args) |
if settings.GetIsGerrit(): |
return GerritUpload(options, args, cl) |