Methods
- A
- B
- E
- G
- S
- T
- U
- W
Class Public methods
get_revisions(path, srcdir = nil)
Link
# File tool/vcs.rb, line 168 def self.get_revisions(path, srcdir = nil) if srcdir and local_path?(path) path = File.join(srcdir, path) end if srcdir info_xml = IO.pread(%W"svn info --xml #{srcdir}") info_xml = nil unless info_xml[/<url>(.*)<\/url>/, 1] == path.to_s end info_xml ||= IO.pread(%W"svn info --xml #{path}") _, last, _, changed, _ = info_xml.split(/revision="(\d+)"/) modified = info_xml[/<date>([^<>]*)/, 1] branch = info_xml[%r'<relative-url>\^/(?:branches/|tags/)?([^<>]+)', 1] [last, changed, modified, branch] end
search_root(path)
Link
Instance Public methods
after_export(dir)
Link
branch(name)
Link
branch_list(pat)
Link
export(revision, url, dir, keep_temp = false)
Link
# File tool/vcs.rb, line 247 def export(revision, url, dir, keep_temp = false) if @srcdir and (rootdir = wcroot) srcdir = File.realpath(@srcdir) rootdir << "/" if srcdir.start_with?(rootdir) subdir = srcdir[rootdir.size..-1] subdir = nil if subdir.empty? FileUtils.mkdir_p(svndir = dir+"/.svn") FileUtils.ln_s(Dir.glob(rootdir+"/.svn/*"), svndir) system("svn", "-q", "revert", "-R", subdir || ".", :chdir => dir) or return false FileUtils.rm_rf(svndir) unless keep_temp if subdir tmpdir = Dir.mktmpdir("tmp-co.", "#{dir}/#{subdir}") File.rename(tmpdir, tmpdir = "#{dir}/#{File.basename(tmpdir)}") FileUtils.mv(Dir.glob("#{dir}/#{subdir}/{.[^.]*,..?*,*}"), tmpdir) begin Dir.rmdir("#{dir}/#{subdir}") end until (subdir = File.dirname(subdir)) == '.' FileUtils.mv(Dir.glob("#{tmpdir}/#{subdir}/{.[^.]*,..?*,*}"), dir) Dir.rmdir(tmpdir) end return true end end IO.popen(%W"svn export -r #{revision} #{url} #{dir}") do |pipe| pipe.each {|line| /^A/ =~ line or yield line} end $?.success? end
get_info()
Link
grep(pat, tag, *files, &block)
Link
tag(name)
Link
url()
Link