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
f23dcac9
Commit
f23dcac9
authored
Apr 09, 2014
by
Dmitriy Zaporozhets
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'ensure_satellite_exists' into 'master'
Ensure satellite exists instead of raising an error
parents
4e9add7c
63ba9835
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
lib/gitlab/satellite/satellite.rb
lib/gitlab/satellite/satellite.rb
+3
-3
No files found.
lib/gitlab/satellite/satellite.rb
View file @
f23dcac9
...
@@ -22,7 +22,7 @@ module Gitlab
...
@@ -22,7 +22,7 @@ module Gitlab
end
end
def
clear_and_update!
def
clear_and_update!
raise
SatelliteNotExistError
unless
exists?
project
.
ensure_satellite_exists
@repo
=
nil
@repo
=
nil
clear_working_dir!
clear_working_dir!
...
@@ -54,7 +54,7 @@ module Gitlab
...
@@ -54,7 +54,7 @@ module Gitlab
# * Changes the current directory to the satellite's working dir
# * Changes the current directory to the satellite's working dir
# * Yields
# * Yields
def
lock
def
lock
raise
SatelliteNotExistError
unless
exists?
project
.
ensure_satellite_exists
File
.
open
(
lock_file
,
"w+"
)
do
|
f
|
File
.
open
(
lock_file
,
"w+"
)
do
|
f
|
begin
begin
...
@@ -76,7 +76,7 @@ module Gitlab
...
@@ -76,7 +76,7 @@ module Gitlab
end
end
def
repo
def
repo
raise
SatelliteNotExistError
unless
exists?
project
.
ensure_satellite_exists
@repo
||=
Grit
::
Repo
.
new
(
path
)
@repo
||=
Grit
::
Repo
.
new
(
path
)
end
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