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 364 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
375 return "refs/remotes/branch-heads/%s" % name | 375 return "refs/remotes/branch-heads/%s" % name |
376 except GitFailedException: | 376 except GitFailedException: |
377 pass | 377 pass |
378 self.Die("Can't find remote of %s" % name) | 378 self.Die("Can't find remote of %s" % name) |
379 | 379 |
380 def Tag(self, tag, remote, message): | 380 def Tag(self, tag, remote, message): |
381 # Wait for the commit to appear. Assumes unique commit message titles (this | 381 # Wait for the commit to appear. Assumes unique commit message titles (this |
382 # is the case for all automated merge and push commits - also no title is | 382 # is the case for all automated merge and push commits - also no title is |
383 # the prefix of another title). | 383 # the prefix of another title). |
384 commit = None | 384 commit = None |
385 for wait_interval in [5, 10, 20, 40, 60, 60]: | 385 for wait_interval in [10, 30, 60, 60, 60, 60, 60]: |
386 self.step.Git("fetch") | 386 self.step.Git("fetch") |
387 commit = self.step.GitLog(n=1, format="%H", grep=message, branch=remote) | 387 commit = self.step.GitLog(n=1, format="%H", grep=message, branch=remote) |
388 if commit: | 388 if commit: |
389 break | 389 break |
390 print("The commit has not replicated to git. Waiting for %s seconds." % | 390 print("The commit has not replicated to git. Waiting for %s seconds." % |
391 wait_interval) | 391 wait_interval) |
392 self.step._side_effect_handler.Sleep(wait_interval) | 392 self.step._side_effect_handler.Sleep(wait_interval) |
393 else: | 393 else: |
394 self.step.Die("Couldn't determine commit for setting the tag. Maybe the " | 394 self.step.Die("Couldn't determine commit for setting the tag. Maybe the " |
395 "git updater is lagging behind?") | 395 "git updater is lagging behind?") |
(...skipping 483 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
879 return 0 | 879 return 0 |
880 finally: | 880 finally: |
881 if options.json_output: | 881 if options.json_output: |
882 with open(options.json_output, "w") as f: | 882 with open(options.json_output, "w") as f: |
883 json.dump(self._state['json_output'], f) | 883 json.dump(self._state['json_output'], f) |
884 | 884 |
885 return 0 | 885 return 0 |
886 | 886 |
887 def Run(self, args=None): | 887 def Run(self, args=None): |
888 return self.RunSteps(self._Steps(), args) | 888 return self.RunSteps(self._Steps(), args) |
OLD | NEW |