mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* tool/file2lastrev.rb (VCS::{SVN,GIT}#get_revisions):
use block argument 'path' to get the path given by super. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26925 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
8aa897fc05
commit
ad130d3670
2 changed files with 10 additions and 5 deletions
|
@ -1,3 +1,8 @@
|
|||
Mon Mar 15 04:18:31 2010 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||
|
||||
* tool/file2lastrev.rb (VCS::{SVN,GIT}#get_revisions):
|
||||
use block argument 'path' to get the path given by super.
|
||||
|
||||
Mon Mar 15 02:43:59 2010 Tanaka Akira <akr@fsij.org>
|
||||
|
||||
* tool/transcode-tblgen.rb (Action#hash): defined.
|
||||
|
|
|
@ -43,8 +43,8 @@ class VCS
|
|||
class SVN < self
|
||||
register(".svn")
|
||||
|
||||
def get_revisions(path)
|
||||
super do
|
||||
def get_revisions(*)
|
||||
super do |path|
|
||||
info_xml = `svn info --xml "#{path}"`
|
||||
_, last, _, changed, _ = info_xml.split(/revision="(\d+)"/)
|
||||
[last, changed]
|
||||
|
@ -55,7 +55,7 @@ class VCS
|
|||
class GIT_SVN < self
|
||||
register(".git/svn")
|
||||
|
||||
def get_revisions(path)
|
||||
def get_revisions(*)
|
||||
super do |path|
|
||||
info = `git svn info "#{path}"`
|
||||
[info[/^Revision: (\d+)/, 1], info[/^Last Changed Rev: (\d+)/, 1]]
|
||||
|
@ -66,10 +66,10 @@ class VCS
|
|||
class GIT < self
|
||||
register(".git")
|
||||
|
||||
def get_revisions(path)
|
||||
def get_revisions(*)
|
||||
logcmd = %Q[git log -n1 --grep="^ *git-svn-id: .*@[0-9][0-9]* "]
|
||||
idpat = /git-svn-id: .*?@(\d+) \S+\Z/
|
||||
super do
|
||||
super do |path|
|
||||
last = `#{logcmd}`[idpat, 1]
|
||||
changed = path ? `#{logcmd} "#{path}"`[idpat, 1] : last
|
||||
[last, changed]
|
||||
|
|
Loading…
Add table
Reference in a new issue