Lines Matching refs:directory

18   will use the file ../DEPS relative to this script's directory.
76 def git_repository_sync_is_disabled(git, directory):
79 [git, 'config', 'sync-deps.disable'], cwd=directory)
85 def is_git_toplevel(git, directory):
86 """Return true iff the directory is the top level of a Git repository.
91 directory (string) the path into which the repository
96 [git, 'rev-parse', '--show-toplevel'], cwd=directory).strip()
97 return os.path.realpath(directory) == os.path.realpath(toplevel.decode())
102 def status(directory, commithash, change):
109 directory = truncate_beginning(directory, dlen)
112 sys.stdout.write('%-*s %s %s\n' % (dlen, directory, symbol, commithash))
115 def git_checkout_to_directory(git, repo, commithash, directory, verbose):
126 directory (string) the path into which the repository
133 if not os.path.isdir(directory):
135 [git, 'clone', '--quiet', '--no-checkout', repo, directory])
137 cwd=directory)
139 status(directory, commithash, True)
142 if not is_git_toplevel(git, directory):
143 # if the directory exists, but isn't a git repo, you will modify
145 sys.stdout.write('%s\n IS NOT TOP-LEVEL GIT DIRECTORY.\n' % directory)
149 if git_repository_sync_is_disabled(git, directory):
150 sys.stdout.write('%s\n SYNC IS DISABLED.\n' % directory)
157 cwd=directory, stderr=devnull):
160 status(directory, commithash, False) # Success.
166 [git, 'remote', 'set-url', 'origin', repo], cwd=directory)
168 subprocess.check_call([git, 'fetch', '--quiet'], cwd=directory)
170 subprocess.check_call([git, 'checkout', '--quiet', commithash], cwd=directory)
173 status(directory, commithash, True) # Success.
215 for directory in dependencies:
217 if directory.startswith(other_dir + '/'):
218 raise Exception('%r is parent of %r' % (other_dir, directory))
220 for directory in sorted(dependencies):
221 if not isinstance(dependencies[directory], str):
223 sys.stdout.write( 'Skipping "%s".\n' % directory)
225 if '@' in dependencies[directory]:
226 repo, commithash = dependencies[directory].split('@', 1)
232 relative_directory = os.path.join(deps_file_directory, directory)