summaryrefslogtreecommitdiff
path: root/tool/file2lastrev.rb
diff options
context:
space:
mode:
authorakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-04-15 11:43:09 +0000
committerakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-04-15 11:43:09 +0000
commitd9aab5725241759ccf4a01621d20c6ff1ecb1c9c (patch)
treed788d377b56f9bbf1985e0f8d9ca021972a55405 /tool/file2lastrev.rb
parent7475244ec44103e00f7ffe0137cd88bb4a96b41d (diff)
* tool/file2lastrev.rb: make -q effective for files not version
controlled. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27347 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'tool/file2lastrev.rb')
-rwxr-xr-xtool/file2lastrev.rb9
1 files changed, 7 insertions, 2 deletions
diff --git a/tool/file2lastrev.rb b/tool/file2lastrev.rb
index cf15389..45b2f03 100755
--- a/tool/file2lastrev.rb
+++ b/tool/file2lastrev.rb
@@ -60,7 +60,7 @@ class VCS
register(".svn")
def self.get_revisions(path)
- info_xml = `svn info --xml "#{path}"`
+ info_xml = IO.popen(["svn", "info", "--xml", path.to_s, :err=>[:child, :out]]) {|f| f.read }
_, last, _, changed, _ = info_xml.split(/revision="(\d+)"/)
[last, changed]
end
@@ -114,7 +114,12 @@ begin
rescue VCS::NotFoundError => e
abort "#{Program.basename}: #{e.message}" unless @suppress_not_found
else
- last, changed = vcs.get_revisions(ARGV.shift)
+ begin
+ last, changed = vcs.get_revisions(ARGV.shift)
+ rescue => e
+ abort "#{Program.basename}: #{e.message}" unless @suppress_not_found
+ exit false
+ end
end
case @output