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

Unified Diff: gclient.py

Issue 115286: Remove the options.path_exists which only existed as a seam. It's not really ... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/depot_tools/
Patch Set: '' Created 11 years, 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | tests/gclient_test.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gclient.py
===================================================================
--- gclient.py (revision 15959)
+++ gclient.py (working copy)
@@ -753,8 +753,8 @@
"""
# Only update if git is not controlling the directory.
checkout_path = os.path.join(self._root_dir, self.relpath)
- git_path = os.path.join(checkout_path, '.git')
- if options.path_exists(git_path):
+ git_path = os.path.join(self._root_dir, self.relpath, '.git')
+ if os.path.exists(git_path):
print("________ found .git directory; skipping %s" % self.relpath)
return
@@ -778,7 +778,7 @@
if revision:
rev_str = ' at %d' % revision
- if not options.path_exists(checkout_path):
+ if not os.path.exists(checkout_path):
# We need to checkout.
command = ['checkout', url, checkout_path]
if revision:
@@ -965,7 +965,7 @@
if not from_dir:
from_dir = os.curdir
path = os.path.realpath(from_dir)
- while not options.path_exists(os.path.join(path, options.config_filename)):
+ while not os.path.exists(os.path.join(path, options.config_filename)):
next = os.path.split(path)
if not next[1]:
return None
@@ -1006,7 +1006,7 @@
"""
scope = {}
filename = os.path.join(self._root_dir, self._options.entries_filename)
- if not self._options.path_exists(filename):
+ if not os.path.exists(filename):
return []
exec(FileRead(filename), scope)
return scope["entries"]
@@ -1336,7 +1336,7 @@
prev_entries = self._ReadEntries()
for entry in prev_entries:
e_dir = os.path.join(self._root_dir, entry)
- if entry not in entries and self._options.path_exists(e_dir):
+ if entry not in entries and os.path.exists(e_dir):
if CaptureSVNStatus(e_dir):
# There are modified files in this entry
entries[entry] = None # Keep warning until removed.
@@ -1488,7 +1488,7 @@
"""
if len(args) < 1 and not options.spec:
raise Error("required argument missing; see 'gclient help config'")
- if options.path_exists(options.config_filename):
+ if os.path.exists(options.config_filename):
raise Error("%s file already exists in the current directory" %
options.config_filename)
client = options.gclient('.', options)
@@ -1713,7 +1713,6 @@
options.entries_filename = ".gclient_entries"
options.deps_file = "DEPS"
- options.path_exists = os.path.exists
options.gclient = GClient
options.scm_wrapper = SCMWrapper
options.platform = sys.platform
« no previous file with comments | « no previous file | tests/gclient_test.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698