Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(376)

Side by Side Diff: gclient.py

Issue 132313017: gclient: Use the correct bot hostnames to enable experimental deletion behavior (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/depot_tools
Patch Set: Created 6 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | tests/gclient_smoketest.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 # Files 7 # Files
8 # .gclient : Current client configuration, written by 'config' command. 8 # .gclient : Current client configuration, written by 'config' command.
9 # Format is a Python script defining 'solutions', a list whose 9 # Format is a Python script defining 'solutions', a list whose
10 # entries each are maps binding the strings "name" and "url" 10 # entries each are maps binding the strings "name" and "url"
(...skipping 662 matching lines...) Expand 10 before | Expand all | Expand 10 after
673 def enable_deletion_of_conflicting_checkouts(): 673 def enable_deletion_of_conflicting_checkouts():
674 """Determines whether to enable new checkout deletion behavior. 674 """Determines whether to enable new checkout deletion behavior.
675 675
676 Initially, enables the experimental functionality on a small set of 676 Initially, enables the experimental functionality on a small set of
677 bots. 677 bots.
678 """ 678 """
679 # TODO(borenet): Remove this hack as soon as we've verified that it 679 # TODO(borenet): Remove this hack as soon as we've verified that it
680 # doesn't cause the bots to break. 680 # doesn't cause the bots to break.
681 if not os.environ.get('CHROME_HEADLESS'): 681 if not os.environ.get('CHROME_HEADLESS'):
682 return False 682 return False
683 hostname = socket.gethostname() 683 return socket.gethostname() in ('vm859-m1', 'BUILD1-M1',
684 logging.warning('Hostname of this machine: %s' % hostname) 684 'vm630-m1.golo.chromium.org')
685 return hostname in ('vm859-m1', 'build1-m1', 'vm630-m1')
686 685
687 # When updating, determine whether the destination directory contains a 686 # When updating, determine whether the destination directory contains a
688 # checkout of the desired repository. If not, avoid conflicts by 687 # checkout of the desired repository. If not, avoid conflicts by
689 # deleting the directory before running the update. 688 # deleting the directory before running the update.
690 if command == 'update' and enable_deletion_of_conflicting_checkouts(): 689 if command == 'update' and enable_deletion_of_conflicting_checkouts():
691 logging.warning('Experimental deletion of mismatching checkouts ' 690 logging.warning('Experimental deletion of mismatching checkouts '
692 'enabled.') 691 'enabled.')
693 actual_remote_url = self._used_scm.GetRemoteURL(options) 692 actual_remote_url = self._used_scm.GetRemoteURL(options)
694 url, _ = gclient_utils.SplitUrlRevision(parsed_url) 693 url, _ = gclient_utils.SplitUrlRevision(parsed_url)
695 url = url.rstrip('/') 694 url = url.rstrip('/')
(...skipping 1261 matching lines...) Expand 10 before | Expand all | Expand 10 after
1957 raise 1956 raise
1958 except (gclient_utils.Error, subprocess2.CalledProcessError), e: 1957 except (gclient_utils.Error, subprocess2.CalledProcessError), e:
1959 print >> sys.stderr, 'Error: %s' % str(e) 1958 print >> sys.stderr, 'Error: %s' % str(e)
1960 return 1 1959 return 1
1961 1960
1962 1961
1963 if '__main__' == __name__: 1962 if '__main__' == __name__:
1964 sys.exit(Main(sys.argv[1:])) 1963 sys.exit(Main(sys.argv[1:]))
1965 1964
1966 # vim: ts=2:sw=2:tw=80:et: 1965 # vim: ts=2:sw=2:tw=80:et:
OLDNEW
« no previous file with comments | « no previous file | tests/gclient_smoketest.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698