OLD | NEW |
1 #!/usr/bin/python | 1 #!/usr/bin/python |
2 # Copyright (c) 2012 The Chromium Authors. All rights reserved. | 2 # Copyright (c) 2012 The Chromium Authors. All rights reserved. |
3 # Use of this source code is governed by a BSD-style license that can be | 3 # Use of this source code is governed by a BSD-style license that can be |
4 # found in the LICENSE file. | 4 # found in the LICENSE file. |
5 | 5 |
6 """Convert SVN based DEPS into .DEPS.git for use with NewGit.""" | 6 """Convert SVN based DEPS into .DEPS.git for use with NewGit.""" |
7 | 7 |
8 import collections | 8 import collections |
9 from cStringIO import StringIO | 9 from cStringIO import StringIO |
10 import json | 10 import json |
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
113 else: | 113 else: |
114 if mirror: | 114 if mirror: |
115 refspec = 'refs/heads/master' | 115 refspec = 'refs/heads/master' |
116 else: | 116 else: |
117 refspec = 'refs/remotes/origin/master' | 117 refspec = 'refs/remotes/origin/master' |
118 | 118 |
119 # Work-around for: | 119 # Work-around for: |
120 # http://code.google.com/p/chromium/issues/detail?id=362222 | 120 # http://code.google.com/p/chromium/issues/detail?id=362222 |
121 if (git_url.startswith('https://chromium.googlesource.com/external/pefile') | 121 if (git_url.startswith('https://chromium.googlesource.com/external/pefile') |
122 and int(svn_rev) in (63, 141)): | 122 and int(svn_rev) in (63, 141)): |
123 return '1ceaa279daa62b71e3431e58f68be6a96dd1519a' | 123 return '72c6ae42396cb913bcab63c15585dc3b5c3f92f1' |
124 | 124 |
125 return git_tools.Search(git_repo_path, svn_rev, mirror, refspec, git_url) | 125 return git_tools.Search(git_repo_path, svn_rev, mirror, refspec, git_url) |
126 | 126 |
127 | 127 |
128 def MessageMain(message_q, threads): | 128 def MessageMain(message_q, threads): |
129 while True: | 129 while True: |
130 try: | 130 try: |
131 msg = message_q.get(True, 10) | 131 msg = message_q.get(True, 10) |
132 except Queue.Empty: | 132 except Queue.Empty: |
133 print >> sys.stderr, 'Still working on:' | 133 print >> sys.stderr, 'Still working on:' |
(...skipping 287 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
421 return 0 | 421 return 0 |
422 | 422 |
423 # Write the DEPS file to disk. | 423 # Write the DEPS file to disk. |
424 deps_utils.WriteDeps(options.out, deps_vars, results.new_deps, deps_os, | 424 deps_utils.WriteDeps(options.out, deps_vars, results.new_deps, deps_os, |
425 include_rules, skip_child_includes, hooks) | 425 include_rules, skip_child_includes, hooks) |
426 return 0 | 426 return 0 |
427 | 427 |
428 | 428 |
429 if '__main__' == __name__: | 429 if '__main__' == __name__: |
430 sys.exit(main()) | 430 sys.exit(main()) |
OLD | NEW |