scm: ignore log encoding setting in Subversion and Mercurial (#7597).

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@4962 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Toshi MARUYAMA
2011-02-28 12:09:32 +00:00
parent 7664892b5d
commit 06f078a813
6 changed files with 53 additions and 20 deletions
+2 -1
View File
@@ -107,10 +107,11 @@ class Repository::Cvs < Repository
tmp_time = revision.time.clone
unless changes.find_by_path_and_revision(
scm.with_leading_slash(revision.paths[0][:path]), revision.paths[0][:revision])
cmt = Changeset.normalize_comments(revision.message, repo_log_encoding)
cs = changesets.find(:first, :conditions=>{
:committed_on=>tmp_time - time_delta .. tmp_time + time_delta,
:committer=>revision.author,
:comments=>Changeset.normalize_comments(revision.message)
:comments=>cmt
})
# create a new changeset....
+4
View File
@@ -34,6 +34,10 @@ class Repository::Mercurial < Repository
'Mercurial'
end
def repo_log_encoding
'UTF-8'
end
# Returns the readable identifier for the given mercurial changeset
def self.format_changeset_identifier(changeset)
"#{changeset.revision}:#{changeset.scmid}"
+4
View File
@@ -30,6 +30,10 @@ class Repository::Subversion < Repository
'Subversion'
end
def repo_log_encoding
'UTF-8'
end
def latest_changesets(path, rev, limit=10)
revisions = scm.revisions(path, rev, nil, :limit => limit)
revisions ? changesets.find_all_by_revision(revisions.collect(&:identifier), :order => "committed_on DESC", :include => :user) : []