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
c150ae22
Commit
c150ae22
authored
Jun 20, 2017
by
Douglas Barbosa Alexandre
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Check if wiki repository exists before syncing it
parent
7acf1635
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
5 deletions
+3
-5
app/services/geo/repository_sync_service.rb
app/services/geo/repository_sync_service.rb
+3
-5
No files found.
app/services/geo/repository_sync_service.rb
View file @
c150ae22
...
...
@@ -92,13 +92,11 @@ module Geo
finished_at
=
nil
begin
# Second .wiki call returns a Gollum::Wiki, and it will always create the physical repository when not found
if
project
.
wiki
.
wiki
.
exist?
project
.
wiki
.
repository
.
fetch_geo_mirror
(
ssh_url_to_wiki
)
end
project
.
wiki
.
create_repo!
unless
project
.
wiki
.
repository_exists?
project
.
wiki
.
repository
.
fetch_geo_mirror
(
ssh_url_to_wiki
)
finished_at
=
DateTime
.
now
rescue
Gitlab
::
Shell
::
Error
=>
e
rescue
Gitlab
::
Shell
::
Error
,
ProjectWiki
::
CouldNotCreateWikiError
=>
e
Rails
.
logger
.
error
(
"
#{
self
.
class
.
name
}
: Error syncing wiki repository for project
#{
project
.
path_with_namespace
}
:
#{
e
}
"
)
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