• Home
  • Raw
  • Download

Lines Matching refs:directory

76 def git_repository_sync_is_disabled(git, directory):  argument
79 [git, 'config', 'sync-deps.disable'], cwd=directory)
85 def is_git_toplevel(git, directory): argument
96 [git, 'rev-parse', '--show-toplevel'], cwd=directory).strip()
97 return os.path.realpath(directory) == os.path.realpath(toplevel)
102 def status(directory, checkoutable): argument
106 directory = truncate(directory, dlen)
108 sys.stdout.write('%-*s @ %s\n' % (dlen, directory, checkoutable))
111 def git_checkout_to_directory(git, repo, checkoutable, directory, verbose): argument
130 if not os.path.isdir(directory):
132 [git, 'clone', '--quiet', repo, directory])
134 if not is_git_toplevel(git, directory):
137 sys.stdout.write('%s\n IS NOT TOP-LEVEL GIT DIRECTORY.\n' % directory)
141 if git_repository_sync_is_disabled(git, directory):
142 sys.stdout.write('%s\n SYNC IS DISABLED.\n' % directory)
149 cwd=directory, stderr=devnull):
152 status(directory, checkoutable) # Success.
158 [git, 'remote', 'set-url', 'origin', repo], cwd=directory)
160 subprocess.check_call([git, 'fetch', '--quiet'], cwd=directory)
162 subprocess.check_call([git, 'checkout', '--quiet', checkoutable], cwd=directory)
165 status(directory, checkoutable) # Success.
201 for directory in dependencies:
203 if directory.startswith(other_dir + '/'):
204 raise Exception('%r is parent of %r' % (other_dir, directory))
206 for directory in sorted(dependencies):
207 if not isinstance(dependencies[directory], basestring):
209 print 'Skipping "%s".' % directory
211 if '@' in dependencies[directory]:
212 repo, checkoutable = dependencies[directory].split('@', 1)
216 relative_directory = os.path.join(deps_file_directory, directory)