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

Unified Diff: gclient.py

Issue 2865039: Improve testing with File() keyword, found a few bugs along the way (Closed)
Patch Set: Update expectations instead of disabling a check Created 10 years, 5 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/fake_repos.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gclient.py
diff --git a/gclient.py b/gclient.py
index 04087100c5cd32c20308aede42d36e529279270f..f2d9415b2b7b9618635a5db594d0d7d075b50621 100644
--- a/gclient.py
+++ b/gclient.py
@@ -115,7 +115,7 @@ class GClientKeywords(object):
class FileImpl(object):
"""Used to implement the File('') syntax which lets you sync a single file
- from an SVN repo."""
+ from a SVN repo."""
def __init__(self, file_location):
self.file_location = file_location
@@ -621,11 +621,13 @@ solutions = [
scm.RunCommand(command, self._options, args, file_list)
self._options.revision = None
elif isinstance(deps[d], self.FileImpl):
+ if command in (None, 'cleanup', 'diff', 'pack', 'status'):
+ continue
file_dep = deps[d]
self._options.revision = file_dep.GetRevision()
if run_scm:
- scm = gclient_scm.CreateSCM(file_dep.GetPath(), self.root_dir(), d)
- scm.RunCommand("updatesingle", self._options,
+ scm = gclient_scm.SVNWrapper(file_dep.GetPath(), self.root_dir(), d)
+ scm.RunCommand('updatesingle', self._options,
args + [file_dep.GetFilename()], file_list)
if command == 'update' and not self._options.verbose:
@@ -1167,6 +1169,8 @@ def Main(argv):
logging.basicConfig(level=level,
format='%(module)s(%(lineno)d) %(funcName)s:%(message)s')
options.entries_filename = options.config_filename + '_entries'
+
+ # These hacks need to die.
if not hasattr(options, 'revisions'):
# GClient.RunOnDeps expects it even if not applicable.
options.revisions = []
@@ -1176,6 +1180,10 @@ def Main(argv):
options.nohooks = True
if not hasattr(options, 'deps_os'):
options.deps_os = None
+ if not hasattr(options, 'manually_grab_svn_rev'):
+ options.manually_grab_svn_rev = None
+ if not hasattr(options, 'force'):
+ options.force = None
return (options, args)
parser.parse_args = Parse
# We don't want wordwrapping in epilog (usually examples)
« no previous file with comments | « no previous file | tests/fake_repos.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698