scm: bazaar: add adapter method to get .bzr/branch/branch.conf path from specified path (#2799, #4741, #8030).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@5890 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
parent
228ac57ada
commit
05b292030c
|
@ -220,6 +220,20 @@ module Redmine
|
|||
return nil if $? && $?.exitstatus != 0
|
||||
blame
|
||||
end
|
||||
|
||||
def self.branch_conf_path(path)
|
||||
bcp = nil
|
||||
m = path.match(%r{^(.*[/\\])\.bzr.*$})
|
||||
if m
|
||||
bcp = m[1]
|
||||
else
|
||||
bcp = path
|
||||
end
|
||||
bcp.gsub!(/[\/\\]$/, "")
|
||||
if bcp
|
||||
bcp = File.join(bcp, ".bzr", "branch", "branch.conf")
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue