Skip to content

Commit 02562a4

Browse files
committed
Drop SVN support from commit-email.rb
1 parent d97ff5f commit 02562a4

File tree

4 files changed

+1
-35
lines changed

4 files changed

+1
-35
lines changed

.travis.yml

-2
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ branches:
55
only:
66
- master
77
before_install:
8-
- gem install test-unit
98
- git clone --depth=3 https://github.com/ruby/ruby
109

1110
# Install dummy `sendmail` for testing commit-email.rb
@@ -17,7 +16,6 @@ before_install:
1716
sudo mv ./sendmail /usr/sbin/sendmail
1817
1918
script:
20-
- "ruby -Ilib -rtest/unit test/test_*.rb"
2119
- |-
2220
cd ./ruby &&
2321
../bin/commit-email.rb ./ [email protected] \

bin/commit-email.rb

-7
Original file line numberDiff line numberDiff line change
@@ -458,13 +458,6 @@ def main(repo_path, to, rest)
458458
args, options = parse(rest)
459459

460460
case options.vcs
461-
when "svn"
462-
require_relative "../lib/svn/info"
463-
infos = [
464-
Svn::Info.new(repo_path, args.first).tap do |info|
465-
info.log.sub!(/^([A-Z][a-z]{2} ){2}.*>\n/,"")
466-
end
467-
]
468461
when "git"
469462
infos = args.each_slice(3).flat_map do |oldrev, newrev, refname|
470463
revisions = IO.popen(['git', 'log', '--reverse', '--pretty=%H', "#{oldrev}^..#{newrev}"], &:read).lines.map(&:strip)

hooks/post-commit.sh

-12
Original file line numberDiff line numberDiff line change
@@ -18,18 +18,6 @@ ruby_commit_hook="$(cd "$(dirname $0)"; cd ..; pwd)"
1818
{ date; echo $REPOS; echo $REV; echo svnadmin; uptime; }
1919
svnadmin dump -q -r "$REV" --incremental "$REPOS" | bzip2 -c > /var/svn/dump/ruby/$REV.bz2
2020

21-
# { date; echo commit-email.rb; uptime; } >> /tmp/post-commit.log
22-
# "${ruby_commit_hook}/bin/commit-email.rb" \
23-
# "$REPOS" [email protected] "$REV" \
24-
# -I "${ruby_commit_hook}/lib" \
25-
# --name Ruby \
26-
# --viewer-uri "https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=" \
27-
# -r https://svn.ruby-lang.org/repos/ruby \
28-
# --rss-path /tmp/ruby.rdf \
29-
# --rss-uri https://svn.ruby-lang.org/rss/ruby.rdf \
30-
# --error-to [email protected] \
31-
# --vcs svn
32-
3321
{ date; echo update-version.h.rb; uptime; }
3422
"${ruby_commit_hook}/bin/update-version.h.rb" svn "$REPOS" "$REV" &
3523

lib/svn/info.rb

+1-14
Original file line numberDiff line numberDiff line change
@@ -17,14 +17,6 @@ def self.u8toeuc(str)
1717

1818
module Svn
1919
class Info
20-
# Used by: commit-email.rb
21-
attr_reader :author, :log, :date
22-
attr_reader :added_files, :deleted_files, :updated_files
23-
attr_reader :added_dirs, :deleted_dirs, :updated_dirs
24-
attr_reader :diffs
25-
attr_reader :revision
26-
attr_reader :entire_sha256
27-
2820
def initialize(repo_path, rev)
2921
@repo_path = repo_path
3022
@revision = Integer(rev)
@@ -35,12 +27,7 @@ def initialize(repo_path, rev)
3527
get_sha256
3628
end
3729

38-
# Used by: commit-email.rb
39-
def author_email
40-
"#{@author}@ruby-lang.org"
41-
end
42-
43-
# Used by: commit-email.rb, update-version.h.rb
30+
# Used by: update-version.h.rb
4431
def branches
4532
@sha256.map{|x,| x[/((?:branches\/)?.+?)\//, 1]}.uniq
4633
end

0 commit comments

Comments
 (0)