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/webkit_finder.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) 2012 Google Inc. All rights reserved. 1 # Copyright (c) 2012 Google Inc. All rights reserved.
2 # 2 #
3 # Redistribution and use in source and binary forms, with or without 3 # Redistribution and use in source and binary forms, with or without
4 # modification, are permitted provided that the following conditions are 4 # modification, are permitted provided that the following conditions are
5 # met: 5 # met:
6 # 6 #
7 # * Redistributions of source code must retain the above copyright 7 # * Redistributions of source code must retain the above copyright
8 # notice, this list of conditions and the following disclaimer. 8 # notice, this list of conditions and the following disclaimer.
9 # * Redistributions in binary form must reproduce the above 9 # * Redistributions in binary form must reproduce the above
10 # copyright notice, this list of conditions and the following disclaimer 10 # copyright notice, this list of conditions and the following disclaimer
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
81 self._webkit_base = None 81 self._webkit_base = None
82 self._chromium_base = None 82 self._chromium_base = None
83 self._depot_tools = None 83 self._depot_tools = None
84 84
85 def webkit_base(self): 85 def webkit_base(self):
86 """Returns the absolute path to the top of the WebKit tree. 86 """Returns the absolute path to the top of the WebKit tree.
87 87
88 Raises an AssertionError if the top dir can't be determined. 88 Raises an AssertionError if the top dir can't be determined.
89 """ 89 """
90 # Note: This code somewhat duplicates the code in 90 # Note: This code somewhat duplicates the code in
91 # scm.find_checkout_root(). However, that code only works if the top 91 # git.find_checkout_root(). However, that code only works if the top
92 # of the SCM repository also matches the top of the WebKit tree. Some SV N users 92 # of the SCM repository also matches the top of the WebKit tree. Some SV N users
93 # (the chromium test bots, for example), might only check out subdirecto ries like 93 # (the chromium test bots, for example), might only check out subdirecto ries like
94 # Tools/Scripts. This code will also work if there is no SCM system at a ll. 94 # Tools/Scripts. This code will also work if there is no SCM system at a ll.
95 # TODO(qyearsley): Remove duplicate code; we're not concerned with SVN u sers anymore. 95 # TODO(qyearsley): Remove duplicate code; we're not concerned with SVN u sers anymore.
96 # Also, instead of caching the result with a private instance variable, we can use 96 # Also, instead of caching the result with a private instance variable, we can use
97 # the memoized decorator. 97 # the memoized decorator.
98 if not self._webkit_base: 98 if not self._webkit_base:
99 self._webkit_base = self._webkit_base 99 self._webkit_base = self._webkit_base
100 module_path = self._filesystem.abspath(self._filesystem.path_to_modu le(self.__module__)) 100 module_path = self._filesystem.abspath(self._filesystem.path_to_modu le(self.__module__))
101 tools_index = module_path.rfind('Tools') 101 tools_index = module_path.rfind('Tools')
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
169 prev_dir = '' 169 prev_dir = ''
170 current_dir = fs.dirname(self._webkit_base) 170 current_dir = fs.dirname(self._webkit_base)
171 while current_dir != prev_dir: 171 while current_dir != prev_dir:
172 if fs.exists(fs.join(current_dir, 'depot_tools', 'pylint.py')): 172 if fs.exists(fs.join(current_dir, 'depot_tools', 'pylint.py')):
173 return fs.join(current_dir, 'depot_tools') 173 return fs.join(current_dir, 'depot_tools')
174 prev_dir = current_dir 174 prev_dir = current_dir
175 current_dir = fs.dirname(current_dir) 175 current_dir = fs.dirname(current_dir)
176 176
177 def path_from_depot_tools_base(self, *comps): 177 def path_from_depot_tools_base(self, *comps):
178 return self._filesystem.join(self.depot_tools_base(), *comps) 178 return self._filesystem.join(self.depot_tools_base(), *comps)
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698