Commit bba314b6 authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets

Merge branch '7-10-2' into '7-10-stable'

Fixes for 7.10.2

See merge request !1804
parents d5c71c83 c99f4e93
Please view this file on the master branch, on stable branches it's out of date.
v 7.11.0 (unreleased)
- Make Reply-To config apply to change e-mail confirmation and other Devise notifications (Stan Hu)
- Add application setting to restrict user signups to e-mail domains (Stan Hu)
- Don't allow a merge request to be merged when its title starts with "WIP".
- Add a page title to every page.
- Allow primary email to be set to an email that you've already added.
- Fix Error 500 when searching Wiki pages (Stan Hu)
- Get Gitorious importer to work again.
- Fix clone URL field and X11 Primary selection (Dmitry Medvinsky)
- Ignore invalid lines in .gitmodules
-
- Fix broken file browsing with relative submodule in personal projects (Stan Hu)
- Fix DB error when trying to tag a repository (Stan Hu)
- Add "Reply quoting selected text" shortcut key (`r`)
- Fix bug causing `@whatever` inside an issue's first code block to be picked up as a user mention.
- Fix bug causing `@whatever` inside an inline code snippet (backtick-style) to be picked up as a user mention.
-
-
-
......@@ -12,6 +24,30 @@ v 7.11.0 (unreleased)
-
v 7.10.0 (unreleased)
- Show Atom feed buttons everywhere where applicable.
- Add project activity atom feed.
- Don't crash when an MR from a fork has a cross-reference comment from the target project on of its commits.
- Include commit comments in MR from a forked project.
- Fix adding new group members from admin area
- Add default project and snippet visibility settings to the admin web UI.
- Show incompatible projects in Google Code import status (Stan Hu)
- Fix bug where commit data would not appear in some subdirectories (Stan Hu)
- Unescape branch names in compare commit (Stan Hu)
-
-
- Fix bug where commit data would not appear in some subdirectories (Stan Hu)
- Fix bug where Slack service channel was not saved in admin template settings. (Stan Hu)
- Move snippets UI to fluid layout
- Improve UI for sidebar. Increase separation between navigation and content
- Improve new project command options (Ben Bodenmiller)
- Prevent sending empty messages to HipChat (Chulki Lee)
- Improve UI for mobile phones on dashboard and project pages
- Add room notification and message color option for HipChat
v 7.10.2
- Fix CI links on MR page
v 7.10.0
- Ignore submodules that are defined in .gitmodules but are checked in as directories.
- Allow projects to be imported from Google Code.
- Remove access control for uploaded images to fix broken images in emails (Hannes Rosenögger)
......
......@@ -6,7 +6,7 @@ class Import::GitoriousController < Import::BaseController
def callback
session[:gitorious_repos] = params[:repos]
redirect_to status_import_gitorious_url
redirect_to status_import_gitorious_path
end
def status
......
require 'addressable/uri'
class Projects::CompareController < Projects::ApplicationController
# Authorize
before_filter :require_non_empty_project
......@@ -7,8 +9,8 @@ class Projects::CompareController < Projects::ApplicationController
end
def show
base_ref = params[:from]
head_ref = params[:to]
base_ref = Addressable::URI.unescape(params[:from])
head_ref = Addressable::URI.unescape(params[:to])
compare_result = CompareService.new.execute(
current_user,
......
......@@ -6,6 +6,8 @@ module WikiHelper
case wiki_page
when Symbol
wiki_page
when String
wiki_page
else
wiki_page.slug
end
......
......@@ -43,7 +43,7 @@ class GitlabCiService < CiService
end
def commit_status_path(sha, ref)
project_url + "/refs/#{ref}/commits/#{sha}/status.json?token=#{token}"
URI::encode(project_url + "/refs/#{ref}/commits/#{sha}/status.json?token=#{token}")
end
def get_ci_build(sha, ref)
......@@ -90,7 +90,7 @@ class GitlabCiService < CiService
end
def build_page(sha, ref)
project_url + "/refs/#{ref}/commits/#{sha}"
URI::encode(project_url + "/refs/#{ref}/commits/#{sha}")
end
def builds_path
......
......@@ -60,7 +60,7 @@
= form_tag members_update_admin_group_path(@group), id: "new_project_member", class: "bulk_import", method: :put do
%div
= users_select_tag(:user_ids, multiple: true, email_user: true)
= users_select_tag(:user_ids, multiple: true, email_user: true, scope: :all)
%div.prepend-top-10
= select_tag :access_level, options_for_select(GroupMember.access_level_roles), class: "project-access-select select2"
%hr
......
......@@ -433,7 +433,7 @@ Gitlab::Application.routes.draw do
member do
# tree viewer logs
get 'logs_tree', constraints: { id: Gitlab::Regex.git_reference_regex }
get 'logs_tree/:path' => 'refs#logs_tree', as: :logs_file, constraints: {
get 'logs_tree/*path' => 'refs#logs_tree', as: :logs_file, constraints: {
id: Gitlab::Regex.git_reference_regex,
path: /.*/
}
......
# This migration comes from acts_as_taggable_on_engine (originally 2)
class AddMissingUniqueIndices < ActiveRecord::Migration
def self.up
add_index :tags, :name, unique: true
remove_index :taggings, :tag_id
remove_index :taggings, [:taggable_id, :taggable_type, :context]
add_index :taggings,
[:tag_id, :taggable_id, :taggable_type, :context, :tagger_id, :tagger_type],
unique: true, name: 'taggings_idx'
end
def self.down
remove_index :tags, :name
remove_index :taggings, name: 'taggings_idx'
add_index :taggings, :tag_id
add_index :taggings, [:taggable_id, :taggable_type, :context]
end
end
# This migration comes from acts_as_taggable_on_engine (originally 3)
class AddTaggingsCounterCacheToTags < ActiveRecord::Migration
def self.up
add_column :tags, :taggings_count, :integer, default: 0
ActsAsTaggableOn::Tag.reset_column_information
ActsAsTaggableOn::Tag.find_each do |tag|
ActsAsTaggableOn::Tag.reset_counters(tag.id, :taggings)
end
end
def self.down
remove_column :tags, :taggings_count
end
end
# This migration comes from acts_as_taggable_on_engine (originally 4)
class AddMissingTaggableIndex < ActiveRecord::Migration
def self.up
add_index :taggings, [:taggable_id, :taggable_type, :context]
end
def self.down
remove_index :taggings, [:taggable_id, :taggable_type, :context]
end
end
# This migration comes from acts_as_taggable_on_engine (originally 5)
# This migration is added to circumvent issue #623 and have special characters
# work properly
class ChangeCollationForTagNames < ActiveRecord::Migration
def up
if ActsAsTaggableOn::Utils.using_mysql?
execute("ALTER TABLE tags MODIFY name varchar(255) CHARACTER SET utf8 COLLATE utf8_bin;")
end
end
end
......@@ -431,13 +431,16 @@ ActiveRecord::Schema.define(version: 20150429002313) do
t.datetime "created_at"
end
add_index "taggings", ["tag_id"], name: "index_taggings_on_tag_id", using: :btree
add_index "taggings", ["tag_id", "taggable_id", "taggable_type", "context", "tagger_id", "tagger_type"], name: "taggings_idx", unique: true, using: :btree
add_index "taggings", ["taggable_id", "taggable_type", "context"], name: "index_taggings_on_taggable_id_and_taggable_type_and_context", using: :btree
create_table "tags", force: true do |t|
t.string "name"
t.string "name"
t.integer "taggings_count", default: 0
end
add_index "tags", ["name"], name: "index_tags_on_name", unique: true, using: :btree
create_table "users", force: true do |t|
t.string "email", default: "", null: false
t.string "encrypted_password", default: "", null: false
......
......@@ -55,3 +55,10 @@ Feature: Project
Then I should see project "Forum" README
And I visit project "Shop" page
Then I should see project "Shop" README
Scenario: I tag a project
When I visit edit project "Shop" page
Then I should see project settings
And I add project tags
And I save project
Then I should see project tags
......@@ -44,3 +44,9 @@ Feature: Search
Then I should see "Foo" link in the search results
And I should not see "Bar" link in the search results
Scenario: I should see Wiki blobs
And project has Wiki content
When I click project "Shop" link
And I search for "Wiki content"
And I click "Wiki" link
Then I should see "test_wiki" link in the search results
......@@ -94,4 +94,12 @@ class Spinach::Features::Project < Spinach::FeatureSteps
page.should have_link 'README.md'
page.should have_content 'testme'
end
step 'I add project tags' do
fill_in 'Tags', with: 'tag1, tag2'
end
step 'I should see project tags' do
expect(find_field('Tags').value).to eq 'tag1, tag2'
end
end
......@@ -159,6 +159,11 @@ class Spinach::Features::ProjectWiki < Spinach::FeatureSteps
page.should have_content('History for')
end
step 'I search for Wiki content' do
fill_in "Search in this project", with: "wiki_content"
click_button "Search"
end
def wiki
@project_wiki = ProjectWiki.new(project, current_user)
end
......
......@@ -18,6 +18,11 @@ class Spinach::Features::Search < Spinach::FeatureSteps
click_button "Search"
end
step 'I search for "Wiki content"' do
fill_in "dashboard_search", with: "content"
click_button "Search"
end
step 'I click "Issues" link' do
within '.search-filter' do
click_link 'Issues'
......@@ -36,6 +41,12 @@ class Spinach::Features::Search < Spinach::FeatureSteps
end
end
step 'I click "Wiki" link' do
within '.search-filter' do
click_link 'Wiki'
end
end
step 'I should see "Shop" project link' do
page.should have_link "Shop"
end
......@@ -66,4 +77,13 @@ class Spinach::Features::Search < Spinach::FeatureSteps
step 'I should not see "Bar" link in the search results' do
find(:css, '.search-results').should_not have_link 'Bar'
end
step 'I should see "test_wiki" link in the search results' do
find(:css, '.search-results').should have_link 'test_wiki.md'
end
step 'project has Wiki content' do
@wiki = ::ProjectWiki.new(project, current_user)
@wiki.create_page("test_wiki", "Some Wiki content", :markdown, "first commit")
end
end
......@@ -14,7 +14,7 @@ module Gitlab
end
def repos
@repos ||= repo_names.map { |full_name| Repository.new(full_name) }
@repos ||= repo_names.map { |full_name| GitoriousImport::Repository.new(full_name) }
end
def repo(id)
......
require 'spec_helper'
describe Projects::CompareController do
let(:project) { create(:project) }
let(:user) { create(:user) }
let(:ref_from) { "improve%2Fawesome" }
let(:ref_to) { "feature" }
before do
sign_in(user)
project.team << [user, :master]
end
it 'compare should show some diffs' do
get(:show, namespace_id: project.namespace.to_param,
project_id: project.to_param, from: ref_from, to: ref_to)
expect(response).to be_success
expect(assigns(:diffs).length).to be >= 1
expect(assigns(:commits).length).to be >= 1
end
end
......@@ -2,6 +2,8 @@ require 'spec_helper'
describe ExtractsPath do
include ExtractsPath
include RepoHelpers
include Rails.application.routes.url_helpers
let(:project) { double('project') }
......@@ -11,6 +13,20 @@ describe ExtractsPath do
project.stub(path_with_namespace: 'gitlab/gitlab-ci')
end
describe '#assign_ref' do
let(:ref) { sample_commit[:id] }
let(:params) { {path: sample_commit[:line_code_path], ref: ref} }
before do
@project = create(:project)
end
it "log tree path should have no escape sequences" do
assign_ref_vars
expect(@logs_path).to eq("/#{@project.path_with_namespace}/refs/#{ref}/logs_tree/files/ruby/popen.rb")
end
end
describe '#extract_ref' do
it "returns an empty pair when no @project is set" do
@project = nil
......
......@@ -40,10 +40,12 @@ describe GitlabCiService do
describe :commit_status_path do
it { expect(@service.commit_status_path("2ab7834c", 'master')).to eq("http://ci.gitlab.org/projects/2/refs/master/commits/2ab7834c/status.json?token=verySecret")}
it { expect(@service.commit_status_path("issue#2", 'master')).to eq("http://ci.gitlab.org/projects/2/refs/master/commits/issue%232/status.json?token=verySecret")}
end
describe :build_page do
it { expect(@service.build_page("2ab7834c", 'master')).to eq("http://ci.gitlab.org/projects/2/refs/master/commits/2ab7834c")}
it { expect(@service.build_page("issue#2", 'master')).to eq("http://ci.gitlab.org/projects/2/refs/master/commits/issue%232")}
end
end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment