summaryrefslogtreecommitdiffstats
path: root/lib/redmine/scm/adapters/bazaar_adapter.rb
diff options
context:
space:
mode:
authorGo MAEDA <maeda@farend.jp>2019-03-20 15:02:35 +0000
committerGo MAEDA <maeda@farend.jp>2019-03-20 15:02:35 +0000
commit21769bb59ec7e89a63441c6b83d9a8d5cde78676 (patch)
treed054d3b511fe22344c943dc52867e4be73ae0daf /lib/redmine/scm/adapters/bazaar_adapter.rb
parent09b63e39ed23c0afc2d2962ab24a70ca22f79590 (diff)
downloadredmine-21769bb59ec7e89a63441c6b83d9a8d5cde78676.tar.gz
redmine-21769bb59ec7e89a63441c6b83d9a8d5cde78676.zip
Fix FrozenError in BazaarAdapter.branch_conf_path (#26561).
Patch by Go MAEDA. git-svn-id: http://svn.redmine.org/redmine/trunk@17994 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'lib/redmine/scm/adapters/bazaar_adapter.rb')
-rw-r--r--lib/redmine/scm/adapters/bazaar_adapter.rb13
1 files changed, 3 insertions, 10 deletions
diff --git a/lib/redmine/scm/adapters/bazaar_adapter.rb b/lib/redmine/scm/adapters/bazaar_adapter.rb
index cce165321..09e840a37 100644
--- a/lib/redmine/scm/adapters/bazaar_adapter.rb
+++ b/lib/redmine/scm/adapters/bazaar_adapter.rb
@@ -248,18 +248,11 @@ module Redmine
end
def self.branch_conf_path(path)
- bcp = nil
+ return unless path
m = path.match(%r{^(.*[/\\])\.bzr.*$})
- if m
- bcp = m[1]
- else
- bcp = path
- end
+ bcp = m ? m[1] : path.dup
bcp.gsub!(%r{[\/\\]$}, "")
- if bcp
- bcp = File.join(bcp, ".bzr", "branch", "branch.conf")
- end
- bcp
+ File.join(bcp, ".bzr", "branch", "branch.conf")
end
def append_revisions_only