diff options
Diffstat (limited to 'tool')
-rwxr-xr-x | tool/make-snapshot | 11 | ||||
-rw-r--r-- | tool/vcs.rb | 1 |
2 files changed, 9 insertions, 3 deletions
diff --git a/tool/make-snapshot b/tool/make-snapshot index cac32d359d..423a4a47e5 100755 --- a/tool/make-snapshot +++ b/tool/make-snapshot @@ -143,7 +143,7 @@ end unless destdir = ARGV.shift abort usage end -revisions = ARGV.empty? ? ["trunk"] : ARGV +revisions = ARGV.empty? ? [nil] : ARGV unless tmp = $exported FileUtils.mkpath(destdir) destdir = File.expand_path(destdir) @@ -201,10 +201,12 @@ end def package(vcs, rev, destdir, tmp = nil) patchlevel = false prerelease = false - if revision = rev[/@(\d+)\z/, 1] + if rev and revision = rev[/@(\d+)\z/, 1] rev = $` end case rev + when nil + url = nil when /\Atrunk\z/ url = vcs.trunk when /\Abranches\// @@ -234,7 +236,10 @@ def package(vcs, rev, destdir, tmp = nil) warn "#{$0}: unknown version - #{rev}" return end - revision ||= vcs.get_revisions(url)[0] + if !revision and revision = vcs.get_revisions(url) + url ||= vcs.branch(revision[3]) + revision = revision[0] + end version = nil unless revision url = vcs.trunk diff --git a/tool/vcs.rb b/tool/vcs.rb index 3f0a33147d..f251c96ecb 100644 --- a/tool/vcs.rb +++ b/tool/vcs.rb @@ -278,6 +278,7 @@ class VCS end def branch(name) + return trunk if name == "trunk" url + "branches/#{name}" end |