summaryrefslogtreecommitdiff
path: root/tool/vcs.rb
diff options
context:
space:
mode:
authorNobuyoshi Nakada <nobu@ruby-lang.org>2019-04-28 12:11:59 +0900
committerNobuyoshi Nakada <nobu@ruby-lang.org>2019-04-28 12:11:59 +0900
commitd72bd190a80e6b8258ca923b606175754a210b6d (patch)
tree84fa961efa89c39a4aa73909f58a2aa0e1c5df7d /tool/vcs.rb
parentb7669705270478f14d02f15b51b74eeec52a49da (diff)
Added VCS::SVN#branch_beginning
Diffstat (limited to 'tool/vcs.rb')
-rw-r--r--tool/vcs.rb11
1 files changed, 10 insertions, 1 deletions
diff --git a/tool/vcs.rb b/tool/vcs.rb
index 5ba8ce2..7dadada 100644
--- a/tool/vcs.rb
+++ b/tool/vcs.rb
@@ -345,6 +345,15 @@ class VCS
FileUtils.rm_rf(dir+"/.svn")
end
+ def branch_beginning(url)
+ # `--limit` of svn-log is useless in this case, because it is
+ # applied before `--search`.
+ rev = IO.pread(%W[ #{COMMAND} log --xml
+ --search=matz --search-and=has\ started
+ -- #{url}/version.h])[/<logentry\s+revision="(\d+)"/m, 1]
+ rev.to_i if rev
+ end
+
def export_changelog(url, from, to, path)
range = [to, (from+1 if from)].compact.join(':')
IO.popen({'TZ' => 'JST-9', 'LANG' => 'C', 'LC_ALL' => 'C'},
@@ -465,7 +474,7 @@ class VCS
FileUtils.rm_rf(Dir.glob("#{dir}/.git*"))
end
- def branch_beginning
+ def branch_beginning(url)
cmd_read(%W[ #{COMMAND} log -n1 --format=format:%H
--author=matz --committer=matz --grep=has\ started
-- version.h include/ruby/version.h])