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
iv
gitlab-ce
Commits
63e532ef
Commit
63e532ef
authored
Jul 08, 2013
by
Dmitriy Zaporozhets
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Cache MR diffs result. Improve diff output
parent
967d42e0
Changes
6
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
10 additions
and
8 deletions
+10
-8
Procfile
Procfile
+1
-1
app/controllers/projects/merge_requests_controller.rb
app/controllers/projects/merge_requests_controller.rb
+0
-1
app/models/merge_request.rb
app/models/merge_request.rb
+3
-1
app/views/projects/merge_requests/_show.html.haml
app/views/projects/merge_requests/_show.html.haml
+2
-1
app/views/projects/merge_requests/show/_diffs.html.haml
app/views/projects/merge_requests/show/_diffs.html.haml
+1
-1
doc/install/installation.md
doc/install/installation.md
+3
-3
No files found.
Procfile
View file @
63e532ef
web: bundle exec
puma -p $PORT
web: bundle exec
unicorn_rails -p $PORT -E development
worker: bundle exec sidekiq -q post_receive,mailer,system_hook,project_web_hook,common,default,gitlab_shell
app/controllers/projects/merge_requests_controller.rb
View file @
63e532ef
...
...
@@ -30,7 +30,6 @@ class Projects::MergeRequestsController < Projects::ApplicationController
end
def
diffs
@diffs
=
@merge_request
.
diffs
@commit
=
@merge_request
.
last_commit
@comments_allowed
=
@reply_allowed
=
true
...
...
app/models/merge_request.rb
View file @
63e532ef
...
...
@@ -116,7 +116,7 @@ class MergeRequest < ActiveRecord::Base
end
def
diffs
load_diffs
(
st_diffs
)
||
[]
@diffs
||=
(
load_diffs
(
st_diffs
)
||
[])
end
def
reloaded_diffs
...
...
@@ -128,6 +128,8 @@ class MergeRequest < ActiveRecord::Base
def
broken_diffs?
diffs
==
broken_diffs
rescue
true
end
def
valid_diffs?
...
...
app/views/projects/merge_requests/_show.html.haml
View file @
63e532ef
...
...
@@ -21,7 +21,8 @@
.notes.tab-content.voting_notes
#notes
{
class:
(
controller
.
action_name
==
'show'
)
?
""
:
"hide"
}
=
render
"projects/notes/notes_with_form"
.diffs.tab-content
=
render
"projects/merge_requests/show/diffs"
if
@diffs
-
if
current_page?
(
action:
'diffs'
)
=
render
"projects/merge_requests/show/diffs"
.status
:javascript
...
...
app/views/projects/merge_requests/show/_diffs.html.haml
View file @
63e532ef
-
if
@merge_request
.
valid_diffs?
=
render
"projects/commits/diffs"
,
diffs:
@diffs
=
render
"projects/commits/diffs"
,
diffs:
@
merge_request
.
diffs
-
elsif
@merge_request
.
broken_diffs?
%h4
.nothing_here_message
Can't load diff.
...
...
doc/install/installation.md
View file @
63e532ef
...
...
@@ -184,11 +184,11 @@ You can change `5-3-stable` to `master` if you want the *bleeding edge* version,
sudo chmod -R u+rwX public/uploads
# Copy the example Puma config
sudo -u git -H cp config/
puma.rb.example config/puma
.rb
sudo -u git -H cp config/
unicorn.rb.example config/unicorn
.rb
# Enable cluster mode if you expect to have a high load instance
# Ex. change amount of workers to 3 for 2GB RAM server
sudo -u git -H vim config/
puma
.rb
sudo -u git -H vim config/
unicorn
.rb
# Configure Git global settings for git user, useful when editing via web
# Edit user.email according to what is set in gitlab.yml
...
...
@@ -196,7 +196,7 @@ You can change `5-3-stable` to `master` if you want the *bleeding edge* version,
sudo -u git -H git config --global user.email "gitlab@localhost"
**Important Note:**
Make sure to edit both
`gitlab.yml`
and
`
puma
.rb`
to match your setup.
Make sure to edit both
`gitlab.yml`
and
`
unicorn
.rb`
to match your setup.
## Configure GitLab DB settings
...
...
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