summaryrefslogtreecommitdiff
path: root/tool/file2lastrev.rb
diff options
context:
space:
mode:
Diffstat (limited to 'tool/file2lastrev.rb')
-rwxr-xr-xtool/file2lastrev.rb10
1 files changed, 5 insertions, 5 deletions
diff --git a/tool/file2lastrev.rb b/tool/file2lastrev.rb
index 7eb918930f..057ea80fdd 100755
--- a/tool/file2lastrev.rb
+++ b/tool/file2lastrev.rb
@@ -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]