Home | History | Annotate | Download | only in util

Lines Matching refs:directory

23 def FetchSVNRevision(directory):
25 Fetch the Subversion branch and revision for a given directory.
36 cwd=directory,
62 def RunGitCommand(directory, command):
82 cwd=directory)
88 def FetchGitRevision(directory):
90 Fetch the Git hash for a given directory.
97 proc = RunGitCommand(directory, ['rev-parse', 'HEAD'])
105 def IsGitSVN(directory):
117 proc = RunGitCommand(directory, ['config', '--get-regexp', '^svn'])
123 def FetchGitSVNURL(directory):
132 if IsGitSVN(directory):
133 proc = RunGitCommand(directory, ['svn', 'info', '--url'])
143 def FetchGitSVNRoot(directory):
152 if IsGitSVN(directory):
154 proc = RunGitCommand(directory, git_command)
166 def LookupGitSVNRevision(directory, depth):
173 if not IsGitSVN(directory):
176 proc = RunGitCommand(directory, ['log', '-' + str(depth)])
188 def IsGitSVNDirty(directory):
196 return LookupGitSVNRevision(directory, 1) is None
199 def FetchGitSVNRevision(directory):
206 revision = LookupGitSVNRevision(directory, 999)
209 if IsGitSVNDirty(directory):
211 url = FetchGitSVNURL(directory)
212 root = FetchGitSVNRoot(directory)
216 def FetchVersionInfo(default_lastchange, directory=None):
221 version_info = (FetchSVNRevision(directory) or
222 FetchGitSVNRevision(directory) or FetchGitRevision(directory))