OLD | NEW |
1 #!/usr/bin/env python | 1 #!/usr/bin/env python |
2 # Copyright 2013 the V8 project authors. All rights reserved. | 2 # Copyright 2013 the V8 project authors. All rights reserved. |
3 # Redistribution and use in source and binary forms, with or without | 3 # Redistribution and use in source and binary forms, with or without |
4 # modification, are permitted provided that the following conditions are | 4 # modification, are permitted provided that the following conditions are |
5 # met: | 5 # met: |
6 # | 6 # |
7 # * Redistributions of source code must retain the above copyright | 7 # * Redistributions of source code must retain the above copyright |
8 # notice, this list of conditions and the following disclaimer. | 8 # notice, this list of conditions and the following disclaimer. |
9 # * Redistributions in binary form must reproduce the above | 9 # * Redistributions in binary form must reproduce the above |
10 # copyright notice, this list of conditions and the following | 10 # copyright notice, this list of conditions and the following |
(...skipping 363 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
374 return "refs/remotes/branch-heads/%s" % name | 374 return "refs/remotes/branch-heads/%s" % name |
375 except GitFailedException: | 375 except GitFailedException: |
376 pass | 376 pass |
377 self.Die("Can't find remote of %s" % name) | 377 self.Die("Can't find remote of %s" % name) |
378 | 378 |
379 def Tag(self, tag, remote, message): | 379 def Tag(self, tag, remote, message): |
380 # Wait for the commit to appear. Assumes unique commit message titles (this | 380 # Wait for the commit to appear. Assumes unique commit message titles (this |
381 # is the case for all automated merge and push commits - also no title is | 381 # is the case for all automated merge and push commits - also no title is |
382 # the prefix of another title). | 382 # the prefix of another title). |
383 commit = None | 383 commit = None |
384 for wait_interval in [3, 7, 15, 35, 45, 60]: | 384 for wait_interval in [5, 10, 20, 40, 60, 60]: |
385 self.step.Git("fetch") | 385 self.step.Git("fetch") |
386 commit = self.step.GitLog(n=1, format="%H", grep=message, branch=remote) | 386 commit = self.step.GitLog(n=1, format="%H", grep=message, branch=remote) |
387 if commit: | 387 if commit: |
388 break | 388 break |
389 print("The commit has not replicated to git. Waiting for %s seconds." % | 389 print("The commit has not replicated to git. Waiting for %s seconds." % |
390 wait_interval) | 390 wait_interval) |
391 self.step._side_effect_handler.Sleep(wait_interval) | 391 self.step._side_effect_handler.Sleep(wait_interval) |
392 else: | 392 else: |
393 self.step.Die("Couldn't determine commit for setting the tag. Maybe the " | 393 self.step.Die("Couldn't determine commit for setting the tag. Maybe the " |
394 "git updater is lagging behind?") | 394 "git updater is lagging behind?") |
(...skipping 483 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
878 return 0 | 878 return 0 |
879 finally: | 879 finally: |
880 if options.json_output: | 880 if options.json_output: |
881 with open(options.json_output, "w") as f: | 881 with open(options.json_output, "w") as f: |
882 json.dump(self._state['json_output'], f) | 882 json.dump(self._state['json_output'], f) |
883 | 883 |
884 return 0 | 884 return 0 |
885 | 885 |
886 def Run(self, args=None): | 886 def Run(self, args=None): |
887 return self.RunSteps(self._Steps(), args) | 887 return self.RunSteps(self._Steps(), args) |
OLD | NEW |