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 """Meta checkout manager supporting both Subversion and GIT. | 6 """Meta checkout manager supporting both Subversion and GIT. |
| 7 | 7 |
| 8 Files | 8 Files |
| 9 .gclient : Current client configuration, written by 'config' command. | 9 .gclient : Current client configuration, written by 'config' command. |
| 10 Format is a Python script defining 'solutions', a list whose | 10 Format is a Python script defining 'solutions', a list whose |
| (...skipping 623 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 634 # Skip file only checkout. | 634 # Skip file only checkout. |
| 635 scm = gclient_scm.GetScmName(parsed_url) | 635 scm = gclient_scm.GetScmName(parsed_url) |
| 636 if not options.scm or scm in options.scm: | 636 if not options.scm or scm in options.scm: |
| 637 cwd = os.path.normpath(os.path.join(self.root.root_dir, self.name)) | 637 cwd = os.path.normpath(os.path.join(self.root.root_dir, self.name)) |
| 638 # Pass in the SCM type as an env variable | 638 # Pass in the SCM type as an env variable |
| 639 env = os.environ.copy() | 639 env = os.environ.copy() |
| 640 if scm: | 640 if scm: |
| 641 env['GCLIENT_SCM'] = scm | 641 env['GCLIENT_SCM'] = scm |
| 642 if parsed_url: | 642 if parsed_url: |
| 643 env['GCLIENT_URL'] = parsed_url | 643 env['GCLIENT_URL'] = parsed_url |
| 644 env['GCLIENT_REPO_PATH'] = self.name | |
|
M-A Ruel
2012/11/27 15:09:26
I think I'd prefer GCLIENT_DEPENDENCY_PATH but I d
Isaac (away)
2012/11/28 01:29:50
OK. For brevity I will use GCLIENT_DEP_PATH.
| |
| 644 if options.prepend_dir: | 645 if options.prepend_dir: |
| 645 print_stdout = False | 646 print_stdout = False |
| 646 def filter_fn(line): | 647 def filter_fn(line): |
| 647 items = line.split('\0') | 648 items = line.split('\0') |
| 648 if len(items) == 1: | 649 if len(items) == 1: |
| 649 match = re.match('Binary file (.*) matches$', line) | 650 match = re.match('Binary file (.*) matches$', line) |
| 650 if match: | 651 if match: |
| 651 print 'Binary file %s matches' % os.path.join( | 652 print 'Binary file %s matches' % os.path.join( |
| 652 self.name, match.group(1)) | 653 self.name, match.group(1)) |
| 653 else: | 654 else: |
| (...skipping 1085 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1739 except (gclient_utils.Error, subprocess2.CalledProcessError), e: | 1740 except (gclient_utils.Error, subprocess2.CalledProcessError), e: |
| 1740 print >> sys.stderr, 'Error: %s' % str(e) | 1741 print >> sys.stderr, 'Error: %s' % str(e) |
| 1741 return 1 | 1742 return 1 |
| 1742 | 1743 |
| 1743 | 1744 |
| 1744 if '__main__' == __name__: | 1745 if '__main__' == __name__: |
| 1745 fix_encoding.fix_encoding() | 1746 fix_encoding.fix_encoding() |
| 1746 sys.exit(Main(sys.argv[1:])) | 1747 sys.exit(Main(sys.argv[1:])) |
| 1747 | 1748 |
| 1748 # vim: ts=2:sw=2:tw=80:et: | 1749 # vim: ts=2:sw=2:tw=80:et: |
| OLD | NEW |