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

Side by Side Diff: third_party/WebKit/Tools/Scripts/webkitpy/common/host.py

Issue 2679173005: Rename Host.scm -> Host.git. (Closed)
Patch Set: Created 3 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
OLDNEW
1 # Copyright (c) 2010 Google Inc. All rights reserved. 1 # Copyright (c) 2010 Google Inc. All rights reserved.
2 # Copyright (c) 2009 Apple Inc. All rights reserved. 2 # Copyright (c) 2009 Apple Inc. All rights reserved.
3 # 3 #
4 # Redistribution and use in source and binary forms, with or without 4 # Redistribution and use in source and binary forms, with or without
5 # modification, are permitted provided that the following conditions are 5 # modification, are permitted provided that the following conditions are
6 # met: 6 # met:
7 # 7 #
8 # * Redistributions of source code must retain the above copyright 8 # * Redistributions of source code must retain the above copyright
9 # notice, this list of conditions and the following disclaimer. 9 # notice, this list of conditions and the following disclaimer.
10 # * Redistributions in binary form must reproduce the above 10 # * Redistributions in binary form must reproduce the above
(...skipping 29 matching lines...) Expand all
40 40
41 _log = logging.getLogger(__name__) 41 _log = logging.getLogger(__name__)
42 42
43 43
44 class Host(SystemHost): 44 class Host(SystemHost):
45 45
46 def __init__(self): 46 def __init__(self):
47 SystemHost.__init__(self) 47 SystemHost.__init__(self)
48 self.web = web.Web() 48 self.web = web.Web()
49 49
50 self._scm = None 50 self._git = None
51 51
52 # Everything below this line is WebKit-specific and belongs on a higher- level object. 52 # Everything below this line is WebKit-specific and belongs on a higher- level object.
53 self.buildbot = BuildBot() 53 self.buildbot = BuildBot()
54 54
55 # FIXME: Unfortunately Port objects are currently the central-dispatch o bjects of the NRWT world. 55 # FIXME: Unfortunately Port objects are currently the central-dispatch o bjects of the NRWT world.
56 # In order to instantiate a port correctly, we have to pass it at least an executive, user, scm, and filesystem 56 # In order to instantiate a port correctly, we have to pass it at least an executive, user, git, and filesystem
57 # so for now we just pass along the whole Host object. 57 # so for now we just pass along the whole Host object.
58 # FIXME: PortFactory doesn't belong on this Host object if Port is going to have a Host (circular dependency). 58 # FIXME: PortFactory doesn't belong on this Host object if Port is going to have a Host (circular dependency).
59 self.port_factory = PortFactory(self) 59 self.port_factory = PortFactory(self)
60 60
61 self._engage_awesome_locale_hacks() 61 self._engage_awesome_locale_hacks()
62 62
63 self.builders = BuilderList(BUILDERS) 63 self.builders = BuilderList(BUILDERS)
64 64
65 # We call this from the Host constructor, as it's one of the 65 # We call this from the Host constructor, as it's one of the
66 # earliest calls made for all webkitpy-based programs. 66 # earliest calls made for all webkitpy-based programs.
67 def _engage_awesome_locale_hacks(self): 67 def _engage_awesome_locale_hacks(self):
68 # To make life easier on our non-English users, we override 68 # To make life easier on our non-English users, we override
69 # the locale environment variables inside webkitpy. 69 # the locale environment variables inside webkitpy.
70 # If we don't do this, programs like SVN will output localized 70 # If we don't do this, programs like SVN will output localized
71 # messages and svn.py will fail to parse them. 71 # messages and svn.py will fail to parse them.
72 # FIXME: We should do these overrides *only* for the subprocesses we kno w need them! 72 # FIXME: We should do these overrides *only* for the subprocesses we kno w need them!
73 # This hack only works in unix environments. 73 # This hack only works in unix environments.
74 self.environ['LANGUAGE'] = 'en' 74 self.environ['LANGUAGE'] = 'en'
75 self.environ['LANG'] = 'en_US.UTF-8' 75 self.environ['LANG'] = 'en_US.UTF-8'
76 self.environ['LC_MESSAGES'] = 'en_US.UTF-8' 76 self.environ['LC_MESSAGES'] = 'en_US.UTF-8'
77 self.environ['LC_ALL'] = '' 77 self.environ['LC_ALL'] = ''
78 78
79 def scm(self, path=None): 79 def git(self, path=None):
80 if path: 80 if path:
81 return Git(cwd=path, executive=self.executive, filesystem=self.files ystem) 81 return Git(cwd=path, executive=self.executive, filesystem=self.files ystem)
82 if not self._scm: 82 if not self._git:
83 self._scm = Git(filesystem=self.filesystem, executive=self.executive ) 83 self._git = Git(filesystem=self.filesystem, executive=self.executive )
84 return self._scm 84 return self._git
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698