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
73af10c1
Commit
73af10c1
authored
May 02, 2018
by
Valery Sizov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix: Geo: BaseSyncService should prune the @geo-temporary directory before fetching
parent
976e2e11
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
9 additions
and
2 deletions
+9
-2
ee/app/services/geo/base_sync_service.rb
ee/app/services/geo/base_sync_service.rb
+1
-1
ee/changelogs/unreleased/5841-geo-basesyncservice-should-prune-the-geo-temporary-directory-before-fetching.yml
...uld-prune-the-geo-temporary-directory-before-fetching.yml
+6
-0
ee/spec/services/geo/repository_sync_service_spec.rb
ee/spec/services/geo/repository_sync_service_spec.rb
+2
-1
No files found.
ee/app/services/geo/base_sync_service.rb
View file @
73af10c1
...
...
@@ -220,7 +220,7 @@ module Geo
end
def
clean_up_temporary_repository
exists
=
gitlab_shell
.
exists?
(
project
.
repository_storage
,
disk_path_temp
)
exists
=
gitlab_shell
.
exists?
(
project
.
repository_storage
,
disk_path_temp
+
'.git'
)
if
exists
&&
!
gitlab_shell
.
remove_repository
(
project
.
repository_storage
,
disk_path_temp
)
raise
Gitlab
::
Shell
::
Error
,
"Temporary
#{
type
}
can not be removed"
...
...
ee/changelogs/unreleased/5841-geo-basesyncservice-should-prune-the-geo-temporary-directory-before-fetching.yml
0 → 100644
View file @
73af10c1
---
title
:
'
Fix:
Geo:
BaseSyncService
should
prune
the
@geo-temporary
directory
before
fetching'
merge_request
:
author
:
type
:
fixed
ee/spec/services/geo/repository_sync_service_spec.rb
View file @
73af10c1
...
...
@@ -299,7 +299,8 @@ describe Geo::RepositorySyncService do
)
expect
(
subject
).
to
receive
(
:fetch_geo_mirror
)
expect
(
subject
).
to
receive
(
:clean_up_temporary_repository
).
twice
expect
(
subject
).
to
receive
(
:clean_up_temporary_repository
).
twice
.
and_call_original
expect
(
subject
.
gitlab_shell
).
to
receive
(
:exists?
).
twice
.
with
(
project
.
repository_storage
,
/.git$/
)
subject
.
execute
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