def branch(version = Origen.app.version.prefixed)
      version = VersionString.new(version)
      version = version.prefixed if version.semantic?
      capture = false
      File.readlines("#{Origen.root}/doc/history").each do |line|
        line = line.strip
        if capture
          if capture && line =~ /^#+ .*(Selector|Branch): '(.*)'/
            return Regexp.last_match(2).gsub('\\', '')
          end
        else
          if line =~ /Tag:/
            line = line.gsub('\\', '')
            if line =~ /^#+ Tag: #{version}$/ ||
               line =~ />Tag: #{version}</
              capture = true
            end
          end
        end
      end
      nil
    end
def branch(version = Origen.app.version.prefixed)
      version = VersionString.new(version)
      version = version.prefixed if version.semantic?
      capture = false
      File.readlines("#{Origen.root}/doc/history").each do |line|
        line = line.strip
        if capture
          if capture && line =~ /^#+ .*(Selector|Branch): '(.*)'/
            return Regexp.last_match(2).gsub('\\', '')
          end
        else
          if line =~ /Tag:/
            line = line.gsub('\\', '')
            if line =~ /^#+ Tag: #{version}$/ ||
               line =~ />Tag: #{version}</
              capture = true
            end
          end
        end
      end
      nil
    end
Returns the branch for the current or given application version