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

Side by Side Diff: recipes/nacl.py

Issue 656623003: Update fetch to support more flexible refspecs (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/depot_tools
Patch Set: Created 6 years, 2 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
OLDNEW
1 # Copyright 2014 The Chromium Authors. All rights reserved. 1 # Copyright 2014 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be 2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file. 3 # found in the LICENSE file.
4 4
5 import sys 5 import sys
6 6
7 import recipe_util # pylint: disable=F0401 7 import recipe_util # pylint: disable=F0401
8 8
9 9
10 # This class doesn't need an __init__ method, so we disable the warning 10 # This class doesn't need an __init__ method, so we disable the warning
11 # pylint: disable=W0232 11 # pylint: disable=W0232
12 class NaCl(recipe_util.Recipe): 12 class NaCl(recipe_util.Recipe):
13 """Basic Recipe class for NaCl.""" 13 """Basic Recipe class for NaCl."""
14 14
15 @staticmethod 15 @staticmethod
16 def fetch_spec(props): 16 def fetch_spec(props):
17 url = ('https://chromium.googlesource.com/native_client/' 17 url = ('https://chromium.googlesource.com/native_client/'
18 'src/native_client.git') 18 'src/native_client.git')
19 solution = { 'name' :'native_client', 19 solution = {
20 'url' : url, 20 'name' : 'native_client',
21 'deps_file': '.DEPS.git', 21 'url' : url,
22 'managed' : False, 22 'deps_file' : '.DEPS.git',
23 'custom_deps': {}, 23 'managed' : False,
24 'safesync_url': '', 24 'custom_deps' : {},
25 'safesync_url': '',
25 } 26 }
26 spec = { 27 spec = {
27 'solutions': [solution], 28 'solutions': [solution],
28 'svn_url': 'svn://svn.chromium.org/native_client', 29 'auto': True
29 'svn_branch': 'trunk/src/native_client',
30 'svn_ref': 'master',
31 } 30 }
32 if props.get('submodule_git_svn_spec'): 31 if props.get('submodule_git_svn_spec'):
33 spec['submodule_git_svn_spec'] = props['submodule_git_svn_spec'] 32 spec['submodule_git_svn_spec'] = props['submodule_git_svn_spec']
34 if props.get('target_os'): 33 if props.get('target_os'):
35 spec['target_os'] = props['target_os'].split(',') 34 spec['target_os'] = props['target_os'].split(',')
36 if props.get('target_os_only'): 35 if props.get('target_os_only'):
37 spec['target_os_only'] = props['target_os_only'] 36 spec['target_os_only'] = props['target_os_only']
38 checkout_type = 'gclient_git_svn' 37 checkout_type = 'gclient_git_svn'
39 if props.get('nosvn'): 38 if props.get('nosvn'):
40 checkout_type = 'gclient_git' 39 checkout_type = 'gclient_git'
41 spec_type = '%s_spec' % checkout_type 40 spec_type = '%s_spec' % checkout_type
42 return { 41 return {
43 'type': checkout_type, 42 'type': checkout_type,
44 spec_type: spec, 43 spec_type: spec,
45 } 44 }
46 45
47 @staticmethod 46 @staticmethod
48 def expected_root(_props): 47 def expected_root(_props):
49 return 'native_client' 48 return 'native_client'
50 49
51 50
52 def main(argv=None): 51 def main(argv=None):
53 return NaCl().handle_args(argv) 52 return NaCl().handle_args(argv)
54 53
55 54
56 if __name__ == '__main__': 55 if __name__ == '__main__':
57 sys.exit(main(sys.argv)) 56 sys.exit(main(sys.argv))
OLDNEW
« recipes/depot_tools.py ('K') | « recipes/depot_tools.py ('k') | recipes/naclports.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698