summaryrefslogtreecommitdiff
path: root/tool/vcs.rb
diff options
context:
space:
mode:
Diffstat (limited to 'tool/vcs.rb')
-rw-r--r--tool/vcs.rb20
1 files changed, 20 insertions, 0 deletions
diff --git a/tool/vcs.rb b/tool/vcs.rb
index 93d642efec..173c306e3c 100644
--- a/tool/vcs.rb
+++ b/tool/vcs.rb
@@ -280,6 +280,16 @@ class VCS
def after_export(dir)
FileUtils.rm_rf(dir+"/.svn")
end
+
+ def export_changelog(srcdir, url, from, to, path)
+ IO.popen({'TZ' => 'JST-9'}, "svn log -r#{to}:#{from} #{url}") do |r|
+ open(path, 'w') do |w|
+ IO.copy_stream(r, w)
+ end
+ end
+ sleep 10
+ exit
+ end
end
class GIT < self
@@ -355,5 +365,15 @@ class VCS
def after_export(dir)
FileUtils.rm_rf("#{dir}/.git")
end
+
+ def export_changelog(srcdir, url, from, to, path)
+ from = `git -C #{srcdir} log -n1 --format=format:%H --grep='^ *git-svn-id: .*@#{from} '`
+ to = `git -C #{srcdir} log -n1 --format=format:%H --grep='^ *git-svn-id: .*@#{to} '`
+ IO.popen({'TZ' => 'JST-9'}, "git -C #{srcdir} log --date=iso-local --topo-order #{from}..#{to}") do |r|
+ open(path, 'w') do |w|
+ IO.copy_stream(r, w)
+ end
+ end
+ end
end
end