@@ -221,8 +221,19 module Redmine | |||||
221 | def strip_credential(cmd) |
|
221 | def strip_credential(cmd) | |
222 | self.class.strip_credential(cmd) |
|
222 | self.class.strip_credential(cmd) | |
223 | end |
|
223 | end | |
|
224 | ||||
|
225 | def scm_iconv(to, from, str) | |||
|
226 | return nil if str.nil? | |||
|
227 | return str if to == from | |||
|
228 | begin | |||
|
229 | Iconv.conv(to, from, str) | |||
|
230 | rescue Iconv::Failure => err | |||
|
231 | logger.error("failed to convert from #{from} to #{to}. #{err}") | |||
|
232 | nil | |||
|
233 | end | |||
|
234 | end | |||
224 | end |
|
235 | end | |
225 |
|
236 | |||
226 | class Entries < Array |
|
237 | class Entries < Array | |
227 | def sort_by_name |
|
238 | def sort_by_name | |
228 | sort {|x,y| |
|
239 | sort {|x,y| |
General Comments 0
You need to be logged in to leave comments.
Login now