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
1
Merge Requests
1
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
nexedi
gitlab-ce
Commits
516de518
Commit
516de518
authored
Apr 18, 2016
by
Robert Speicher
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'ce_upstrem_import-url-fix' into 'ce-upstream'
merge import URL fix from CE to EE See merge request !344
parents
0953e6ad
18db9f61
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
3 deletions
+9
-3
app/models/project.rb
app/models/project.rb
+7
-1
db/schema.rb
db/schema.rb
+2
-2
No files found.
app/models/project.rb
View file @
516de518
...
@@ -90,7 +90,8 @@ class Project < ActiveRecord::Base
...
@@ -90,7 +90,8 @@ class Project < ActiveRecord::Base
after_destroy
:remove_pages
after_destroy
:remove_pages
after_update
:update_forks_visibility_level
after_update
:update_forks_visibility_level
after_update
:remove_mirror_repository_reference
,
if: :import_url_changed?
after_update
:remove_mirror_repository_reference
,
if:
->
(
project
)
{
project
.
mirror?
&&
project
.
import_url_updated?
}
ActsAsTaggableOn
.
strict_case_match
=
true
ActsAsTaggableOn
.
strict_case_match
=
true
acts_as_taggable_on
:tags
acts_as_taggable_on
:tags
...
@@ -1249,6 +1250,11 @@ class Project < ActiveRecord::Base
...
@@ -1249,6 +1250,11 @@ class Project < ActiveRecord::Base
self
.
merge_requests_ff_only_enabled
||
self
.
merge_requests_rebase_enabled
self
.
merge_requests_ff_only_enabled
||
self
.
merge_requests_rebase_enabled
end
end
def
import_url_updated?
# check if import_url has been updated and it's not just the first assignment
import_url_changed?
&&
changes
[
'import_url'
].
first
end
private
private
def
update_forks_visibility_level
def
update_forks_visibility_level
...
...
db/schema.rb
View file @
516de518
...
@@ -808,8 +808,8 @@ ActiveRecord::Schema.define(version: 20160414064845) do
...
@@ -808,8 +808,8 @@ ActiveRecord::Schema.define(version: 20160414064845) do
t
.
integer
"project_id"
t
.
integer
"project_id"
t
.
text
"data"
t
.
text
"data"
t
.
text
"encrypted_credentials"
t
.
text
"encrypted_credentials"
t
.
text
"encrypted_credentials_iv"
t
.
string
"encrypted_credentials_iv"
t
.
text
"encrypted_credentials_salt"
t
.
string
"encrypted_credentials_salt"
end
end
create_table
"projects"
,
force: :cascade
do
|
t
|
create_table
"projects"
,
force: :cascade
do
|
t
|
...
...
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