Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 #!/usr/bin/env python | 1 #!/usr/bin/env python |
| 2 # Copyright (c) 2012 The Chromium Authors. All rights reserved. | 2 # Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 3 # Use of this source code is governed by a BSD-style license that can be | 3 # Use of this source code is governed by a BSD-style license that can be |
| 4 # found in the LICENSE file. | 4 # found in the LICENSE file. |
| 5 | 5 |
| 6 # Copyright (C) 2008 Evan Martin <martine@danga.com> | 6 # Copyright (C) 2008 Evan Martin <martine@danga.com> |
| 7 | 7 |
| 8 """A git-command for integrating reviews on Rietveld.""" | 8 """A git-command for integrating reviews on Rietveld.""" |
| 9 | 9 |
| 10 import json | 10 import json |
| (...skipping 1267 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1278 if not options.bypass_hooks: | 1278 if not options.bypass_hooks: |
| 1279 hook_results = cl.RunHook(committing=False, | 1279 hook_results = cl.RunHook(committing=False, |
| 1280 may_prompt=not options.force, | 1280 may_prompt=not options.force, |
| 1281 verbose=options.verbose, | 1281 verbose=options.verbose, |
| 1282 change=change) | 1282 change=change) |
| 1283 if not hook_results.should_continue(): | 1283 if not hook_results.should_continue(): |
| 1284 return 1 | 1284 return 1 |
| 1285 if not options.reviewers and hook_results.reviewers: | 1285 if not options.reviewers and hook_results.reviewers: |
| 1286 options.reviewers = hook_results.reviewers | 1286 options.reviewers = hook_results.reviewers |
| 1287 | 1287 |
| 1288 if cl.GetIssue(): | |
| 1289 latest_patchset = cl.GetMostRecentPatchset(cl.GetIssue()) | |
| 1290 local_patchset = cl.GetPatchset() | |
| 1291 if local_patchset < latest_patchset: | |
|
M-A Ruel
2013/03/19 01:26:45
The problem here is that you are comparing patchse
koz (OOO until 15th September)
2013/03/19 01:29:16
Oh, they aren't? What if we change '<' to '!=' the
M-A Ruel
2013/04/02 20:08:54
Yes please do.
koz (OOO until 15th September)
2013/04/02 20:40:04
Done.
| |
| 1292 print ('The last upload made from this repository was patchset #%d but ' | |
| 1293 'the most recent patchset on the server is #%d.' | |
| 1294 % (local_patchset, latest_patchset)) | |
| 1295 ask_for_data('About to upload; enter to confirm.') | |
| 1296 | |
| 1288 print_stats(options.similarity, options.find_copies, args) | 1297 print_stats(options.similarity, options.find_copies, args) |
| 1289 if settings.GetIsGerrit(): | 1298 if settings.GetIsGerrit(): |
| 1290 return GerritUpload(options, args, cl) | 1299 return GerritUpload(options, args, cl) |
| 1291 return RietveldUpload(options, args, cl) | 1300 return RietveldUpload(options, args, cl) |
| 1292 | 1301 |
| 1293 | 1302 |
| 1294 def IsSubmoduleMergeCommit(ref): | 1303 def IsSubmoduleMergeCommit(ref): |
| 1295 # When submodules are added to the repo, we expect there to be a single | 1304 # When submodules are added to the repo, we expect there to be a single |
| 1296 # non-git-svn merge commit at remote HEAD with a signature comment. | 1305 # non-git-svn merge commit at remote HEAD with a signature comment. |
| 1297 pattern = '^SVN changes up to revision [0-9]*$' | 1306 pattern = '^SVN changes up to revision [0-9]*$' |
| (...skipping 585 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1883 'and retry or visit go/isgaeup.\n%s') % (e.code, str(e))) | 1892 'and retry or visit go/isgaeup.\n%s') % (e.code, str(e))) |
| 1884 | 1893 |
| 1885 # Not a known command. Default to help. | 1894 # Not a known command. Default to help. |
| 1886 GenUsage(parser, 'help') | 1895 GenUsage(parser, 'help') |
| 1887 return CMDhelp(parser, argv) | 1896 return CMDhelp(parser, argv) |
| 1888 | 1897 |
| 1889 | 1898 |
| 1890 if __name__ == '__main__': | 1899 if __name__ == '__main__': |
| 1891 fix_encoding.fix_encoding() | 1900 fix_encoding.fix_encoding() |
| 1892 sys.exit(main(sys.argv[1:])) | 1901 sys.exit(main(sys.argv[1:])) |
| OLD | NEW |