summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xtool/file2lastrev.rb1
-rw-r--r--tool/lib/vcs.rb2
2 files changed, 2 insertions, 1 deletions
diff --git a/tool/file2lastrev.rb b/tool/file2lastrev.rb
index 6200e78a56..2de8379606 100755
--- a/tool/file2lastrev.rb
+++ b/tool/file2lastrev.rb
@@ -98,6 +98,7 @@ ok = true
data.sub!(/(?<!\A|\n)\z/, "\n")
@output.write(data, overwrite: true, create_only: create_only)
rescue => e
+ next if @suppress_not_found and VCS::NotFoundError === e
warn "#{File.basename(Program)}: #{e.message}"
ok = false
end
diff --git a/tool/lib/vcs.rb b/tool/lib/vcs.rb
index 3894f9c8e8..51cdb0fdc3 100644
--- a/tool/lib/vcs.rb
+++ b/tool/lib/vcs.rb
@@ -479,7 +479,7 @@ class VCS
last = cmd_read_at(srcdir, [[*gitcmd, 'rev-parse', ref, err: w]]).rstrip
w.close
unless r.eof?
- raise "#{COMMAND} rev-parse failed\n#{r.read.gsub(/^(?=\s*\S)/, ' ')}"
+ raise VCS::NotFoundError, "#{COMMAND} rev-parse failed\n#{r.read.gsub(/^(?=\s*\S)/, ' ')}"
end
end
log = cmd_read_at(srcdir, [[*gitcmd, 'log', '-n1', '--date=iso', '--pretty=fuller', *path]])