From f9208d7c5c81d4c9fa6183bda475ae42babd75e1 Mon Sep 17 00:00:00 2001 From: Toshi MARUYAMA Date: Tue, 18 Sep 2012 09:30:11 +0000 Subject: [PATCH] scm: bazaar: use log encoding as path encoding (#11834) git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10420 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- app/models/repository/bazaar.rb | 22 ++++++++++++++++++++++ lib/redmine/scm/adapters/bazaar_adapter.rb | 4 ++++ 2 files changed, 26 insertions(+) diff --git a/app/models/repository/bazaar.rb b/app/models/repository/bazaar.rb index db05e673b..6dcf963d9 100644 --- a/app/models/repository/bazaar.rb +++ b/app/models/repository/bazaar.rb @@ -37,7 +37,28 @@ class Repository::Bazaar < Repository 'Bazaar' end + def entry(path=nil, identifier=nil) + scm.bzr_path_encodig = log_encoding + scm.entry(path, identifier) + end + + def cat(path, identifier=nil) + scm.bzr_path_encodig = log_encoding + scm.cat(path, identifier) + end + + def annotate(path, identifier=nil) + scm.bzr_path_encodig = log_encoding + scm.annotate(path, identifier) + end + + def diff(path, rev, rev_to) + scm.bzr_path_encodig = log_encoding + scm.diff(path, rev, rev_to) + end + def entries(path=nil, identifier=nil) + scm.bzr_path_encodig = log_encoding entries = scm.entries(path, identifier) if entries entries.each do |e| @@ -68,6 +89,7 @@ class Repository::Bazaar < Repository end def fetch_changesets + scm.bzr_path_encodig = log_encoding scm_info = scm.info if scm_info # latest revision found in database diff --git a/lib/redmine/scm/adapters/bazaar_adapter.rb b/lib/redmine/scm/adapters/bazaar_adapter.rb index 7f04cda83..b2413f549 100644 --- a/lib/redmine/scm/adapters/bazaar_adapter.rb +++ b/lib/redmine/scm/adapters/bazaar_adapter.rb @@ -62,6 +62,10 @@ module Redmine super end + def bzr_path_encodig=(encoding) + @path_encoding = encoding + end + # Get info about the repository def info cmd_args = %w|revno| -- 2.39.5