| OLD | NEW |
| 1 #!/usr/bin/python | 1 #!/usr/bin/python |
| 2 # Copyright (c) 2012 The Native Client Authors. All rights reserved. | 2 # Copyright (c) 2012 The Native Client 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 """Class capturing a command invocation as data.""" | 6 """Class capturing a command invocation as data.""" |
| 7 | 7 |
| 8 import inspect | 8 import inspect |
| 9 import glob | 9 import glob |
| 10 import hashlib | 10 import hashlib |
| (...skipping 356 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 367 (updated_push_url != tracked_push_url)): | 367 (updated_push_url != tracked_push_url)): |
| 368 logging.warn('Your git repo is using an old mirror: %s', abs_dir) | 368 logging.warn('Your git repo is using an old mirror: %s', abs_dir) |
| 369 logging.warn('Updating git repo using known mirror:') | 369 logging.warn('Updating git repo using known mirror:') |
| 370 logging.warn(' [FETCH] %s -> %s', | 370 logging.warn(' [FETCH] %s -> %s', |
| 371 tracked_fetch_url, updated_fetch_url) | 371 tracked_fetch_url, updated_fetch_url) |
| 372 logging.warn(' [PUSH] %s -> %s', | 372 logging.warn(' [PUSH] %s -> %s', |
| 373 tracked_push_url, updated_push_url) | 373 tracked_push_url, updated_push_url) |
| 374 pynacl.repo_tools.GitSetRemoteRepo(updated_fetch_url, abs_dir, | 374 pynacl.repo_tools.GitSetRemoteRepo(updated_fetch_url, abs_dir, |
| 375 push_url=updated_push_url) | 375 push_url=updated_push_url) |
| 376 | 376 |
| 377 | |
| 378 def populate_cache(subst, git_cache, url): | 377 def populate_cache(subst, git_cache, url): |
| 379 if git_cache: | 378 if git_cache: |
| 380 abs_git_cache = subst.SubstituteAbsPaths(git_cache) | 379 abs_git_cache = subst.SubstituteAbsPaths(git_cache) |
| 381 if abs_git_cache: | 380 if abs_git_cache: |
| 382 pynacl.repo_tools.PopulateGitCache(abs_git_cache, [url]) | 381 pynacl.repo_tools.PopulateGitCache(abs_git_cache, [url]) |
| 383 | 382 |
| 384 def validate(subst, url, directory, git_cache): | 383 def validate(subst, url, directory, git_cache): |
| 385 expected_url = url | 384 expected_url = url |
| 386 if git_cache: | 385 if git_cache: |
| 387 abs_git_cache = subst.SubstituteAbsPaths(git_cache) | 386 abs_git_cache = subst.SubstituteAbsPaths(git_cache) |
| (...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 532 # It describes how to unpack and apply patches to produce the source | 531 # It describes how to unpack and apply patches to produce the source |
| 533 # tree of the %(name)s component of a toolchain targetting Native Client. | 532 # tree of the %(name)s component of a toolchain targetting Native Client. |
| 534 | 533 |
| 535 # Source: %(upstream-name)s.tar | 534 # Source: %(upstream-name)s.tar |
| 536 """ | 535 """ |
| 537 % info) | 536 % info) |
| 538 for patch in patch_files: | 537 for patch in patch_files: |
| 539 f.write('\n# %s\n%s\n' % patch) | 538 f.write('\n# %s\n%s\n' % patch) |
| 540 | 539 |
| 541 return Runnable(run_cond, generatePatches, git_dir, info) | 540 return Runnable(run_cond, generatePatches, git_dir, info) |
| OLD | NEW |