From e33aa2329936b38568d8621ba427373035a75a6b Mon Sep 17 00:00:00 2001 From: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> Date: Mon, 21 Jan 2013 15:51:46 +0200 Subject: [PATCH 1/7] Update docs to use 4-1-stable --- doc/install/installation.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/doc/install/installation.md b/doc/install/installation.md index 27c87ec825f..7107d84617b 100644 --- a/doc/install/installation.md +++ b/doc/install/installation.md @@ -190,10 +190,10 @@ See `doc/install/databases.md` cd /home/gitlab/gitlab # Checkout to stable release - sudo -u gitlab -H git checkout 4-0-stable + sudo -u gitlab -H git checkout 4-1-stable **Note:** -You can change `4-0-stable` to `master` if you want the *bleeding edge* version, but +You can change `4-1-stable` to `master` if you want the *bleeding edge* version, but do so with caution! ## Configure it @@ -267,7 +267,7 @@ used for the `email.from` setting in `config/gitlab.yml`) Download the init script (will be /etc/init.d/gitlab): - sudo curl --output /etc/init.d/gitlab https://raw.github.com/gitlabhq/gitlab-recipes/master/init.d/gitlab + sudo curl --output /etc/init.d/gitlab https://raw.github.com/gitlabhq/gitlab-recipes/4-1-stable/init.d/gitlab sudo chmod +x /etc/init.d/gitlab Make GitLab start on boot: @@ -308,7 +308,7 @@ If you can't or don't want to use Nginx as your web server, have a look at the Download an example site config: - sudo curl --output /etc/nginx/sites-available/gitlab https://raw.github.com/gitlabhq/gitlab-recipes/master/nginx/gitlab + sudo curl --output /etc/nginx/sites-available/gitlab https://raw.github.com/gitlabhq/gitlab-recipes/4-1-stable/nginx/gitlab sudo ln -s /etc/nginx/sites-available/gitlab /etc/nginx/sites-enabled/gitlab Make sure to edit the config file to match your setup: -- GitLab From 7014c8782bfabf5bc9fadb34d51a57df999fae1d Mon Sep 17 00:00:00 2001 From: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> Date: Mon, 21 Jan 2013 15:53:00 +0200 Subject: [PATCH 2/7] Up to 4.1.0 --- VERSION | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/VERSION b/VERSION index 87db9036a82..ee74734aa22 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -4.1.0rc1 +4.1.0 -- GitLab From ed17a011819bfbfdf0cac1542207f391c62deb7b Mon Sep 17 00:00:00 2001 From: Riyad Preukschas <riyad@informatik.uni-bremen.de> Date: Mon, 21 Jan 2013 17:18:00 +0100 Subject: [PATCH 3/7] Fix init script recipe url for 4.1 in check.rake --- lib/tasks/gitlab/check.rake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/tasks/gitlab/check.rake b/lib/tasks/gitlab/check.rake index 826b78ec5b1..e20809cc843 100644 --- a/lib/tasks/gitlab/check.rake +++ b/lib/tasks/gitlab/check.rake @@ -142,7 +142,7 @@ namespace :gitlab do return end - recipe_content = `curl https://raw.github.com/gitlabhq/gitlab-recipes/master/init.d/gitlab 2>/dev/null` + recipe_content = `curl https://raw.github.com/gitlabhq/gitlab-recipes/4-1-stable/init.d/gitlab 2>/dev/null` script_content = File.read(script_path) if recipe_content == script_content -- GitLab From 4f1035988d3c38d6913d60202e1af4b82b4e2942 Mon Sep 17 00:00:00 2001 From: Zachary Kjellberg <Zach.Kjellberg@gmail.com> Date: Wed, 23 Jan 2013 15:04:09 -0500 Subject: [PATCH 4/7] Update doc/install/installation.md MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Line 295:Â sudo /etc/init.d/gitlab restart Results in: "Error, unicorn not running!" This is because unicorn is not yet running for first boot. I suggest changing this to 'start'. Line 305:Â sudo apt-get install nginx Change command to:Â sudo apt-get -y install nginx Allowing automated install to simplify and follow pattern of earlier installs. --- doc/install/installation.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/install/installation.md b/doc/install/installation.md index 7107d84617b..e0744e093e2 100644 --- a/doc/install/installation.md +++ b/doc/install/installation.md @@ -292,7 +292,7 @@ However there are still a few steps left. sudo service gitlab start # or - sudo /etc/init.d/gitlab restart + sudo /etc/init.d/gitlab start # 7. Nginx @@ -302,7 +302,7 @@ If you can't or don't want to use Nginx as your web server, have a look at the "Advanced Setup Tips" section. ## Installation - sudo apt-get install nginx + sudo apt-get -y install nginx ## Site Configuration -- GitLab From 26b3050f3749dde769587105af24d4340c57e319 Mon Sep 17 00:00:00 2001 From: McJoppy <github@hudsonstreet.co.nz> Date: Thu, 24 Jan 2013 09:22:14 +1300 Subject: [PATCH 5/7] Update app/models/repository.rb Issue #2699 - Download button not functioning. Replaces slashes with underscore in downloads filename --- app/models/repository.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/models/repository.rb b/app/models/repository.rb index 6bfdf2255f2..9032905ce9a 100644 --- a/app/models/repository.rb +++ b/app/models/repository.rb @@ -151,7 +151,7 @@ class Repository return nil unless commit # Build file path - file_name = self.path_with_namespace + "-" + commit.id.to_s + ".tar.gz" + file_name = self.path_with_namespace.gsub("/","_") + "-" + commit.id.to_s + ".tar.gz" storage_path = Rails.root.join("tmp", "repositories") file_path = File.join(storage_path, file_name) -- GitLab From d14069e333fa761678c0b35a7dc6c90f5a95e137 Mon Sep 17 00:00:00 2001 From: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> Date: Fri, 25 Jan 2013 14:35:46 +0200 Subject: [PATCH 6/7] fix deleting non-existing repo --- lib/gitlab/backend/gitolite_config.rb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/gitlab/backend/gitolite_config.rb b/lib/gitlab/backend/gitolite_config.rb index 7d59ddae0c8..1783b2c37b4 100644 --- a/lib/gitlab/backend/gitolite_config.rb +++ b/lib/gitlab/backend/gitolite_config.rb @@ -87,7 +87,9 @@ module Gitlab end def destroy_project(project) - FileUtils.rm_rf(project.repository.path_to_repo) + if project.repository + FileUtils.rm_rf(project.repository.path_to_repo) + end conf.rm_repo(project.path_with_namespace) end -- GitLab From 13bc5a4ef3ddea083d611e5aff0895ee173cc6fd Mon Sep 17 00:00:00 2001 From: Matt Humphrey <matt@tomatto.co.uk> Date: Wed, 20 Feb 2013 11:19:56 +0000 Subject: [PATCH 7/7] Fix RESTfulness of project hook deletions by API --- doc/api/projects.md | 2 +- lib/api/projects.rb | 4 ++-- spec/requests/api/projects_spec.rb | 5 ++--- 3 files changed, 5 insertions(+), 6 deletions(-) diff --git a/doc/api/projects.md b/doc/api/projects.md index 411286750f8..e8a932da750 100644 --- a/doc/api/projects.md +++ b/doc/api/projects.md @@ -259,7 +259,7 @@ Will return status `201 Created` on success, or `404 Not found` on fail. Delete hook from project ``` -DELETE /projects/:id/hooks +DELETE /projects/:id/hooks/:hook_id ``` Parameters: diff --git a/lib/api/projects.rb b/lib/api/projects.rb index cbef1ed3b50..52c5f2002a4 100644 --- a/lib/api/projects.rb +++ b/lib/api/projects.rb @@ -204,8 +204,8 @@ module Gitlab # id (required) - The ID of a project # hook_id (required) - The ID of hook to delete # Example Request: - # DELETE /projects/:id/hooks - delete ":id/hooks" do + # DELETE /projects/:id/hooks/:hook_id + delete ":id/hooks/:hook_id" do authorize! :admin_project, user_project @hook = user_project.hooks.find(params[:hook_id]) @hook.destroy diff --git a/spec/requests/api/projects_spec.rb b/spec/requests/api/projects_spec.rb index c2244210bcf..4c8bf870d13 100644 --- a/spec/requests/api/projects_spec.rb +++ b/spec/requests/api/projects_spec.rb @@ -205,11 +205,10 @@ describe Gitlab::API do end end - - describe "DELETE /projects/:id/hooks" do + describe "DELETE /projects/:id/hooks/:hook_id" do it "should delete hook from project" do expect { - delete api("/projects/#{project.id}/hooks", user), + delete api("/projects/#{project.id}/hooks/#{hook.id}", user), hook_id: hook.id }.to change {project.hooks.count}.by(-1) end -- GitLab