| OLD | NEW |
| 1 #!/usr/bin/python | 1 #!/usr/bin/python |
| 2 # | 2 # |
| 3 # Copyright 2008 Google Inc. All Rights Reserved. | 3 # Copyright 2008 Google Inc. All Rights Reserved. |
| 4 # | 4 # |
| 5 # Licensed under the Apache License, Version 2.0 (the "License"); | 5 # Licensed under the Apache License, Version 2.0 (the "License"); |
| 6 # you may not use this file except in compliance with the License. | 6 # you may not use this file except in compliance with the License. |
| 7 # You may obtain a copy of the License at | 7 # You may obtain a copy of the License at |
| 8 # | 8 # |
| 9 # http://www.apache.org/licenses/LICENSE-2.0 | 9 # http://www.apache.org/licenses/LICENSE-2.0 |
| 10 # | 10 # |
| (...skipping 740 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 751 Raises: | 751 Raises: |
| 752 Error: if can't get URL for relative path. | 752 Error: if can't get URL for relative path. |
| 753 """ | 753 """ |
| 754 # Only update if git is not controlling the directory. | 754 # Only update if git is not controlling the directory. |
| 755 checkout_path = os.path.join(self._root_dir, self.relpath) | 755 checkout_path = os.path.join(self._root_dir, self.relpath) |
| 756 git_path = os.path.join(self._root_dir, self.relpath, '.git') | 756 git_path = os.path.join(self._root_dir, self.relpath, '.git') |
| 757 if os.path.exists(git_path): | 757 if os.path.exists(git_path): |
| 758 print("________ found .git directory; skipping %s" % self.relpath) | 758 print("________ found .git directory; skipping %s" % self.relpath) |
| 759 return | 759 return |
| 760 | 760 |
| 761 # Also skip any diretories maked to be ignored explicitly with |
| 762 # .gclient_ignore. |
| 763 ignore_path = os.path.join(self._root_dir, self.relpath, '.gclient_ignore') |
| 764 if os.path.exists(ignore_path): |
| 765 print("________ found .gclient_ignore; skipping %s" % self.relpath) |
| 766 return |
| 767 |
| 761 if args: | 768 if args: |
| 762 raise Error("Unsupported argument(s): %s" % ",".join(args)) | 769 raise Error("Unsupported argument(s): %s" % ",".join(args)) |
| 763 | 770 |
| 764 url = self.url | 771 url = self.url |
| 765 components = url.split("@") | 772 components = url.split("@") |
| 766 revision = None | 773 revision = None |
| 767 forced_revision = False | 774 forced_revision = False |
| 768 if options.revision: | 775 if options.revision: |
| 769 # Override the revision number. | 776 # Override the revision number. |
| 770 url = '%s@%s' % (components[0], str(options.revision)) | 777 url = '%s@%s' % (components[0], str(options.revision)) |
| (...skipping 965 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1736 | 1743 |
| 1737 if "__main__" == __name__: | 1744 if "__main__" == __name__: |
| 1738 try: | 1745 try: |
| 1739 result = Main(sys.argv) | 1746 result = Main(sys.argv) |
| 1740 except Error, e: | 1747 except Error, e: |
| 1741 print >> sys.stderr, "Error: %s" % str(e) | 1748 print >> sys.stderr, "Error: %s" % str(e) |
| 1742 result = 1 | 1749 result = 1 |
| 1743 sys.exit(result) | 1750 sys.exit(result) |
| 1744 | 1751 |
| 1745 # vim: ts=2:sw=2:tw=80:et: | 1752 # vim: ts=2:sw=2:tw=80:et: |
| OLD | NEW |