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
Léo-Paul Géneau
gitlab-ce
Commits
fcfb6d84
Commit
fcfb6d84
authored
Feb 11, 2013
by
Dmitriy Zaporozhets
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Since gitlab-shell no sense to check hooks
parent
a404c438
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
0 additions
and
43 deletions
+0
-43
app/models/repository.rb
app/models/repository.rb
+0
-19
app/views/admin/projects/show.html.haml
app/views/admin/projects/show.html.haml
+0
-24
No files found.
app/models/repository.rb
View file @
fcfb6d84
...
@@ -60,25 +60,6 @@ class Repository
...
@@ -60,25 +60,6 @@ class Repository
Commit
.
commits_between
(
repo
,
from
,
to
)
Commit
.
commits_between
(
repo
,
from
,
to
)
end
end
def
has_post_receive_file?
!!
hook_file
end
def
valid_post_receive_file?
valid_hook_file
==
hook_file
end
def
valid_hook_file
@valid_hook_file
||=
File
.
read
(
Rails
.
root
.
join
(
'lib'
,
'hooks'
,
'post-receive'
))
end
def
hook_file
@hook_file
||=
begin
hook_path
=
File
.
join
(
path_to_repo
,
'hooks'
,
'post-receive'
)
File
.
read
(
hook_path
)
if
File
.
exists?
(
hook_path
)
end
end
# Returns an Array of branch names
# Returns an Array of branch names
def
branch_names
def
branch_names
repo
.
branches
.
collect
(
&
:name
).
sort
repo
.
branches
.
collect
(
&
:name
).
sort
...
...
app/views/admin/projects/show.html.haml
View file @
fcfb6d84
...
@@ -4,24 +4,6 @@
...
@@ -4,24 +4,6 @@
%i
.icon-edit
%i
.icon-edit
Edit
Edit
-
if
@repository
&&
@repository
.
has_commits?
-
if
!
@repository
.
has_post_receive_file?
%br
.alert.alert-error
%span
%strong
Project has commits but missing post-receive file.
%br
If you exported project manually - make a link of post-receive hook file from gitolite to project repository
-
elsif
!
@repository
.
valid_post_receive_file?
%br
.alert.alert-error
%span
%strong
Project has invalid post-receive file.
%br
1. Make sure your gitolite instace has latest post-receive file.
%br
2. Make a link of post-receive hook file from gitolite to project repository
%br
%br
%table
.zebra-striped
%table
.zebra-striped
...
@@ -103,12 +85,6 @@
...
@@ -103,12 +85,6 @@
Last commit at:
Last commit at:
%td
%td
=
last_commit
(
@project
)
=
last_commit
(
@project
)
%tr
%td
%b
Post Receive File:
%td
=
check_box_tag
:post_receive_file
,
1
,
@repository
.
has_post_receive_file?
,
disabled:
true
%br
%br
%h5
%h5
...
...
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