Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Jérome Perrin
gitlab-ce
Commits
ad3a88cf
Commit
ad3a88cf
authored
Aug 29, 2012
by
randx
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Prepared for gitolite v3
parent
1f5e2658
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
15 additions
and
11 deletions
+15
-11
app/models/merge_request.rb
app/models/merge_request.rb
+1
-1
app/roles/push_event.rb
app/roles/push_event.rb
+2
-0
config/gitlab.yml.example
config/gitlab.yml.example
+2
-2
doc/installation.md
doc/installation.md
+9
-6
lib/gitlab/merge.rb
lib/gitlab/merge.rb
+1
-2
No files found.
app/models/merge_request.rb
View file @
ad3a88cf
...
@@ -162,7 +162,7 @@ class MergeRequest < ActiveRecord::Base
...
@@ -162,7 +162,7 @@ class MergeRequest < ActiveRecord::Base
end
end
def
automerge!
(
current_user
)
def
automerge!
(
current_user
)
if
Gitlab
::
Merge
.
new
(
self
,
current_user
).
merge
if
Gitlab
::
Merge
.
new
(
self
,
current_user
).
merge
&&
self
.
unmerged_commits
.
empty?
self
.
merge!
(
current_user
.
id
)
self
.
merge!
(
current_user
.
id
)
true
true
end
end
...
...
app/roles/push_event.rb
View file @
ad3a88cf
...
@@ -90,6 +90,8 @@ module PushEvent
...
@@ -90,6 +90,8 @@ module PushEvent
def
push_with_commits?
def
push_with_commits?
md_ref?
&&
commits
.
any?
&&
parent_commit
&&
last_commit
md_ref?
&&
commits
.
any?
&&
parent_commit
&&
last_commit
rescue
Grit
::
NoSuchPathError
false
end
end
def
last_push_to_non_root?
def
last_push_to_non_root?
...
...
config/gitlab.yml.example
View file @
ad3a88cf
...
@@ -33,11 +33,11 @@ app:
...
@@ -33,11 +33,11 @@ app:
git_host:
git_host:
admin_uri: git@localhost:gitolite-admin
admin_uri: git@localhost:gitolite-admin
base_path: /home/git/repositories/
base_path: /home/git/repositories/
# hooks_path: /var/lib/gitolite/.gitolite/hooks/ # only needed when gitolite is not installed according the manual
hooks_path: /home/git/.gitolite/hooks/
# host: localhost
git_user: git
git_user: git
upload_pack: true
upload_pack: true
receive_pack: true
receive_pack: true
# host: localhost
# port: 22
# port: 22
# Git settings
# Git settings
...
...
doc/installation.md
View file @
ad3a88cf
...
@@ -113,17 +113,20 @@ Generate key:
...
@@ -113,17 +113,20 @@ Generate key:
Clone GitLab's fork of the Gitolite source code:
Clone GitLab's fork of the Gitolite source code:
cd /home/git
cd /home/git
sudo -H -u git git clone https://github.com/gitlabhq/gitolite.git /home/git/gitolite
sudo -H -u git git clone
-b gl-v304
https://github.com/gitlabhq/gitolite.git /home/git/gitolite
Setup:
Setup:
cd /home/git
sudo -u git -H mkdir bin
sudo -u git sh -c 'echo -e "PATH=\$PATH:/home/git/bin\nexport PATH" >> /home/git/.profile'
sudo -u git sh -c 'echo -e "PATH=\$PATH:/home/git/bin\nexport PATH" >> /home/git/.profile'
sudo -u git -H sh -c "PATH=/home/git/bin:$PATH; /home/git/gitolite/src/gl-system-install"
sudo -u git sh -c 'gitolite/install -ln /home/git/bin'
sudo cp /home/gitlab/.ssh/id_rsa.pub /home/git/gitlab.pub
sudo cp /home/gitlab/.ssh/id_rsa.pub /home/git/gitlab.pub
sudo chmod 0444 /home/git/gitlab.pub
sudo chmod 0444 /home/git/gitlab.pub
sudo -u git -H s
ed -i 's/0077/0007/g' /home/git/share/gitolite/conf/example.gitolite.rc
sudo -u git -H s
h -c "PATH=/home/git/bin:$PATH; gitolite setup -pk /home/git/gitlab.pub"
sudo -u git -H s
h -c "PATH=/home/git/bin:$PATH; gl-setup -q /home/git/gitlab.pub"
sudo -u git -H s
ed -i 's/0077/0007/g' /home/git/.gitolite.rc
Permissions:
Permissions:
...
@@ -189,8 +192,8 @@ and ensure you have followed all of the above steps carefully.
...
@@ -189,8 +192,8 @@ and ensure you have followed all of the above steps carefully.
#### Setup GitLab hooks
#### Setup GitLab hooks
sudo cp ./lib/hooks/post-receive /home/git/
share/
gitolite/hooks/common/post-receive
sudo cp ./lib/hooks/post-receive /home/git/
.
gitolite/hooks/common/post-receive
sudo chown git:git /home/git/
share/
gitolite/hooks/common/post-receive
sudo chown git:git /home/git/
.
gitolite/hooks/common/post-receive
#### Check application status
#### Check application status
...
...
lib/gitlab/merge.rb
View file @
ad3a88cf
...
@@ -21,8 +21,7 @@ module Gitlab
...
@@ -21,8 +21,7 @@ module Gitlab
if
output
=~
/CONFLICT/
if
output
=~
/CONFLICT/
false
false
else
else
repo
.
git
.
push
({},
"origin"
,
merge_request
.
target_branch
)
!!
repo
.
git
.
push
({},
"origin"
,
merge_request
.
target_branch
)
true
end
end
end
end
end
end
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment