OLD | NEW |
1 # Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 # Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
2 # for details. All rights reserved. Use of this source code is governed by a | 2 # for details. All rights reserved. Use of this source code is governed by a |
3 # BSD-style license that can be found in the LICENSE file. | 3 # BSD-style license that can be found in the LICENSE file. |
4 | 4 |
5 # This file contains a set of utilities functions used by other Python-based | 5 # This file contains a set of utilities functions used by other Python-based |
6 # scripts. | 6 # scripts. |
7 | 7 |
8 import commands | 8 import commands |
9 import datetime | 9 import datetime |
10 import json | 10 import json |
(...skipping 511 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
522 | 522 |
523 | 523 |
524 def Main(): | 524 def Main(): |
525 print "GuessOS() -> ", GuessOS() | 525 print "GuessOS() -> ", GuessOS() |
526 print "GuessArchitecture() -> ", GuessArchitecture() | 526 print "GuessArchitecture() -> ", GuessArchitecture() |
527 print "GuessCpus() -> ", GuessCpus() | 527 print "GuessCpus() -> ", GuessCpus() |
528 print "IsWindows() -> ", IsWindows() | 528 print "IsWindows() -> ", IsWindows() |
529 print "GuessVisualStudioPath() -> ", GuessVisualStudioPath() | 529 print "GuessVisualStudioPath() -> ", GuessVisualStudioPath() |
530 print "GetGitRevision() -> ", GetGitRevision() | 530 print "GetGitRevision() -> ", GetGitRevision() |
531 print "GetVersionFileContent() -> ", GetVersionFileContent() | 531 print "GetVersionFileContent() -> ", GetVersionFileContent() |
| 532 print "GetGitNumber() -> ", GetGitNumber() |
532 | 533 |
533 class Error(Exception): | 534 class Error(Exception): |
534 pass | 535 pass |
535 | 536 |
536 | 537 |
537 class ToolError(Exception): | 538 class ToolError(Exception): |
538 """Deprecated exception, use Error instead.""" | 539 """Deprecated exception, use Error instead.""" |
539 | 540 |
540 def __init__(self, value): | 541 def __init__(self, value): |
541 self.value = value | 542 self.value = value |
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
649 os.chdir(self._working_directory) | 650 os.chdir(self._working_directory) |
650 | 651 |
651 def __exit__(self, *_): | 652 def __exit__(self, *_): |
652 print "Enter directory = ", self._old_cwd | 653 print "Enter directory = ", self._old_cwd |
653 os.chdir(self._old_cwd) | 654 os.chdir(self._old_cwd) |
654 | 655 |
655 | 656 |
656 if __name__ == "__main__": | 657 if __name__ == "__main__": |
657 import sys | 658 import sys |
658 Main() | 659 Main() |
OLD | NEW |