summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-12-06 11:18:53 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-12-06 11:18:53 +0000
commit951ef1d413f53d84273dd0bad230ee573fad51a4 (patch)
treede8ceb50ff38ae915123ec51123539967ee1da22
parent3234d6a6cba4e013cea778664ce4a8b372905ea1 (diff)
file2lastrev.rb: suppress_not_found
* tool/file2lastrev.rb: exit successfully when command not found, and if --suppress_not_found is given. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61055 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--common.mk2
-rwxr-xr-xtool/file2lastrev.rb3
2 files changed, 3 insertions, 2 deletions
diff --git a/common.mk b/common.mk
index f6119f9510..2c9f705ce2 100644
--- a/common.mk
+++ b/common.mk
@@ -989,7 +989,7 @@ $(srcdir)/revision.h:
@exit > $@
$(REVISION_H): $(srcdir)/version.h $(srcdir)/tool/file2lastrev.rb $(REVISION_FORCE)
- -$(Q) $(BASERUBY) $(srcdir)/tool/file2lastrev.rb -q --revision.h "$(srcdir)" > revision.tmp
+ $(Q) $(BASERUBY) $(srcdir)/tool/file2lastrev.rb -q --revision.h "$(srcdir)" > revision.tmp
$(Q)$(IFCHANGE) "--timestamp=$@" "$(srcdir)/revision.h" revision.tmp
$(srcdir)/ext/ripper/ripper.c: $(srcdir)/parse.y id.h
diff --git a/tool/file2lastrev.rb b/tool/file2lastrev.rb
index ee615a5060..8d68da9f88 100755
--- a/tool/file2lastrev.rb
+++ b/tool/file2lastrev.rb
@@ -89,7 +89,8 @@ else
begin
puts @output[*vcs.get_revisions(arg)]
rescue => e
- warn "#{File.basename(Program)}: #{e.message}" unless @suppress_not_found
+ next if @suppress_not_found and VCS::NotFoundError === e
+ warn "#{File.basename(Program)}: #{e.message}"
ok = false
end
end