diff options
author | Nobuyoshi Nakada <nobu@ruby-lang.org> | 2019-09-08 00:48:18 +0900 |
---|---|---|
committer | Nobuyoshi Nakada <nobu@ruby-lang.org> | 2019-09-08 00:48:18 +0900 |
commit | 2d017d612657ab2cffc320dcad679a8854b14a6b (patch) | |
tree | 51aea7cf66807e766bac96770bff9edd9144c8ab | |
parent | a3f5265fd104ec3812af6a918f375e23aa05a251 (diff) | |
download | ruby-2d017d612657ab2cffc320dcad679a8854b14a6b.tar.gz |
make-snapshot: default to the toplevel directory
As this tool has been intended to use in a working directory,
assume that the toplevel directory is under the VCS, and SVN will
no longer be canonical.
-rwxr-xr-x | tool/make-snapshot | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/tool/make-snapshot b/tool/make-snapshot index cacf97199a..546a977157 100755 --- a/tool/make-snapshot +++ b/tool/make-snapshot @@ -569,7 +569,11 @@ elsif $svn elsif $git abort "#{File.basename $0}: use -srcdir with cloned local repository" else - vcs = VCS::SVN.new(SVNURL) + begin + vcs = VCS.detect(File.expand_path("../..", __FILE__)) + rescue VCS::NotFoundError + vcs = VCS::SVN.new(SVNURL) + end end success = true |