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
b5677fd1
Commit
b5677fd1
authored
Apr 18, 2016
by
James Lopez
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
attempt to fix conflicts with mirror URL callbacks
parent
77b1e29c
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
3 deletions
+6
-3
app/models/project.rb
app/models/project.rb
+4
-1
db/schema.rb
db/schema.rb
+2
-2
No files found.
app/models/project.rb
View file @
b5677fd1
...
@@ -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_changed?
}
ActsAsTaggableOn
.
strict_case_match
=
true
ActsAsTaggableOn
.
strict_case_match
=
true
acts_as_taggable_on
:tags
acts_as_taggable_on
:tags
...
@@ -1261,6 +1262,8 @@ class Project < ActiveRecord::Base
...
@@ -1261,6 +1262,8 @@ class Project < ActiveRecord::Base
end
end
def
remove_mirror_repository_reference
def
remove_mirror_repository_reference
# return if it's the first assignment
return
unless
changes
[
'import_url'
]
&&
changes
[
'import_url'
].
first
repository
.
remove_remote
(
Repository
::
MIRROR_REMOTE
)
repository
.
remove_remote
(
Repository
::
MIRROR_REMOTE
)
end
end
...
...
db/schema.rb
View file @
b5677fd1
...
@@ -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