]> git.pld-linux.org Git - packages/cvsspam.git/commitdiff
- shadow outer var fix
authorElan Ruusamäe <glen@pld-linux.org>
Fri, 18 Jun 2010 09:23:26 +0000 (09:23 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
Changed files:
    cvsspam.spec -> 1.46
    ruby19-shadow-outer-var.patch -> 1.1

cvsspam.spec
ruby19-shadow-outer-var.patch [new file with mode: 0644]

index b81b19a9064c7c4d4472717a81675cd730f0fc2f..b390fc2b2dc912c6d7e6229302857ac05a2a6c59 100644 (file)
@@ -2,7 +2,7 @@ Summary:        CVSspam emails you diffs when someone commits a change to your CVS repo
 Summary(pl.UTF-8):     CVSspam - wysyłanie różnic po wykonaniu zmiany w repozytorium CVS
 Name:          cvsspam
 Version:       0.2.12
 Summary(pl.UTF-8):     CVSspam - wysyłanie różnic po wykonaniu zmiany w repozytorium CVS
 Name:          cvsspam
 Version:       0.2.12
-Release:       13
+Release:       13.1
 License:       GPL
 Group:         Applications/System
 Source0:       http://www.badgers-in-foil.co.uk/projects/cvsspam/releases/%{name}-%{version}.tar.gz
 License:       GPL
 Group:         Applications/System
 Source0:       http://www.badgers-in-foil.co.uk/projects/cvsspam/releases/%{name}-%{version}.tar.gz
@@ -12,6 +12,7 @@ Patch100:     %{name}-branch.diff
 Patch0:                %{name}-textdiff.patch
 Patch1:                %{name}-tracfunc.patch
 Patch2:                ruby19.patch
 Patch0:                %{name}-textdiff.patch
 Patch1:                %{name}-tracfunc.patch
 Patch2:                ruby19.patch
+Patch3:                ruby19-shadow-outer-var.patch
 URL:           http://www.badgers-in-foil.co.uk/projects/cvsspam/
 BuildRequires: rpmbuild(macros) >= 1.277
 Requires:      cvs-client
 URL:           http://www.badgers-in-foil.co.uk/projects/cvsspam/
 BuildRequires: rpmbuild(macros) >= 1.277
 Requires:      cvs-client
@@ -42,6 +43,7 @@ rm svn_post_commit_hook.rb
 %patch0 -p0
 %patch1 -p1
 %patch2 -p1
 %patch0 -p0
 %patch1 -p1
 %patch2 -p1
+%patch3 -p1
 
 %install
 rm -rf $RPM_BUILD_ROOT
 
 %install
 rm -rf $RPM_BUILD_ROOT
diff --git a/ruby19-shadow-outer-var.patch b/ruby19-shadow-outer-var.patch
new file mode 100644 (file)
index 0000000..33becde
--- /dev/null
@@ -0,0 +1,52 @@
+fix warnings for "warning: shadowing outer local variable - line"
+side effect is that code starts to work again.
+
+--- cvsspam-0.2.12/collect_diffs.rb    2010-06-18 12:15:54.514725990 +0300
++++ cvsspam-0.2.12/collect_diffs.rb    2010-06-18 12:16:09.410605410 +0300
+@@ -169,8 +169,7 @@
+   raise "missing data dir (#{$tmpdir}/#{$dirtemplate}-XXXXXX)" if $datadir==nil
+-  line = $stdin.gets
+-  unless line =~ /^Update of (.+)/
++  unless $stdin.gets =~ /^Update of (.+)/
+     fail "Log preamble looks suspect (doesn't start 'Update of ...')"
+   end
+@@ -189,11 +188,15 @@
+   end
+   # look for the start of the user's comment
++  got_log_message = false
+   $stdin.each do |line|
+-    break if line =~ /^Log Message/
++    if line =~ /^Log Message/
++        got_log_message = true
++        break
++    end
+   end
+-  unless line =~ /^Log Message/
++  unless got_log_message
+     fail "Input did not contain a 'Log Message:' entry"
+   end
+@@ -273,12 +276,14 @@
+       blah("about to run #{diff_cmd.join(' ')}")
+       safer_popen(*diff_cmd) do |pipe|
+         # skip over cvs-diff's preamble
+-        pipe.each do |line|
+-          break if line =~ /^diff /
++      line = nil
++      pipe.each do |l|
++          line = l
++          break if l =~ /^diff /
+         end
+         file.puts "#U #{line}"
+-        pipe.each do |line|
+-          file.puts "#U #{line}"
++     pipe.each do |l|
++       file.puts "#U #{l}"
+         end
+       end
+       end
This page took 0.095065 seconds and 4 git commands to generate.