]> git.pld-linux.org Git - packages/cvsspam.git/commitdiff
- add support for --charset argument
authorElan Ruusamäe <glen@pld-linux.org>
Tue, 15 Feb 2005 21:20:19 +0000 (21:20 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
Changed files:
    cvsspam-charset-arg.patch -> 1.1

cvsspam-charset-arg.patch [new file with mode: 0644]

diff --git a/cvsspam-charset-arg.patch b/cvsspam-charset-arg.patch
new file mode 100644 (file)
index 0000000..91d357c
--- /dev/null
@@ -0,0 +1,59 @@
+--- ./collect_diffs.rb~        2004-12-10 01:51:21.000000000 +0200
++++ ./collect_diffs.rb 2005-02-15 23:09:26.000000000 +0200
+@@ -357,13 +357,14 @@
+   [ "--to",     "-t", GetoptLong::REQUIRED_ARGUMENT ],
+   [ "--config", "-c", GetoptLong::REQUIRED_ARGUMENT ],
+   [ "--debug",  "-d", GetoptLong::NO_ARGUMENT ],
+-  [ "--from",   "-u", GetoptLong::REQUIRED_ARGUMENT ]
++  [ "--from",   "-u", GetoptLong::REQUIRED_ARGUMENT ],
++  [ "--charset",      GetoptLong::REQUIRED_ARGUMENT ]
+ )
+ # arguments to pass though to 'cvsspam.rb'
+ $passthroughArgs = Array.new
+ opts.each do |opt, arg|
+-  if ["--to", "--config", "--from"].include?(opt)
++  if ["--to", "--config", "--from", "--charset"].include?(opt)
+     $passthroughArgs << opt << arg
+   end
+   if ["--debug"].include?(opt)
+--- ./cvsspam.rb~      2005-02-15 21:57:21.000000000 +0200
++++ ./cvsspam.rb       2005-02-15 23:14:15.000000000 +0200
+@@ -1170,6 +1170,7 @@
+ $repository_name = nil
+ # 2MiB limit on attached diffs,
+ $mail_size_limit = 1024 * 1024 * 2
++$arg_charset = nil
+ require 'getoptlong'
+@@ -1177,7 +1178,8 @@
+   [ "--to",     "-t", GetoptLong::REQUIRED_ARGUMENT ],
+   [ "--config", "-c", GetoptLong::REQUIRED_ARGUMENT ],
+   [ "--debug",  "-d", GetoptLong::NO_ARGUMENT ],
+-  [ "--from",   "-u", GetoptLong::REQUIRED_ARGUMENT ]
++  [ "--from",   "-u", GetoptLong::REQUIRED_ARGUMENT ],
++  [ "--charset","-C", GetoptLong::REQUIRED_ARGUMENT ]
+ )
+ opts.each do |opt, arg|
+@@ -1185,6 +1187,8 @@
+   $config = arg if opt=="--config"
+   $debug = true if opt=="--debug"
+   $from_address = arg if opt=="--from"
++  # must use different variable as the config is readed later.
++  $arg_charset = arg if opt == "--charset"
+ end
+@@ -1227,6 +1231,10 @@
+   blah("Config file '#{$config}' not found, ignoring")
+ end
++if $arg_charset != nil
++      $charset = $arg_charset
++end
++
+ if $recipients.empty?
+   fail "No email recipients defined"
+ end
This page took 0.048023 seconds and 4 git commands to generate.