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
0
Merge Requests
0
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
Jérome Perrin
gitlab-ce
Commits
8c850380
Commit
8c850380
authored
Jun 14, 2017
by
Bob Van Landuyt
Committed by
Bob Van Landuyt
Jun 26, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add punctuation to log messages
parent
171f2d97
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
6 additions
and
4 deletions
+6
-4
lib/gitlab/database/rename_reserved_paths_migration/v1/rename_base.rb
...atabase/rename_reserved_paths_migration/v1/rename_base.rb
+3
-2
lib/gitlab/database/rename_reserved_paths_migration/v1/rename_namespaces.rb
...e/rename_reserved_paths_migration/v1/rename_namespaces.rb
+1
-1
lib/gitlab/database/rename_reserved_paths_migration/v1/rename_projects.rb
...ase/rename_reserved_paths_migration/v1/rename_projects.rb
+2
-1
No files found.
lib/gitlab/database/rename_reserved_paths_migration/v1/rename_base.rb
View file @
8c850380
...
@@ -145,8 +145,9 @@ module Gitlab
...
@@ -145,8 +145,9 @@ module Gitlab
yield
(
path_before_rename
,
path_after_rename
)
yield
(
path_before_rename
,
path_after_rename
)
rescue
StandardError
=>
e
rescue
StandardError
=>
e
failed_reverts
<<
rename_info
failed_reverts
<<
rename_info
say
"Renaming
#{
type
}
from back to
#{
path_before_rename
}
failed. "
\
say
"Renaming
#{
type
}
from
#{
path_after_rename
}
back to "
\
"Review the error and try again by running the `down` action.
\n
"
\
"
#{
path_before_rename
}
failed. Review the error and try "
\
"again by running the `down` action.
\n
"
\
"
#{
e
.
message
}
:
\n
#{
e
.
backtrace
.
join
(
"
\n
"
)
}
"
"
#{
e
.
message
}
:
\n
#{
e
.
backtrace
.
join
(
"
\n
"
)
}
"
end
end
end
end
...
...
lib/gitlab/database/rename_reserved_paths_migration/v1/rename_namespaces.rb
View file @
8c850380
...
@@ -50,7 +50,7 @@ module Gitlab
...
@@ -50,7 +50,7 @@ module Gitlab
rename_namespace_dependencies
(
namespace
,
current_path
,
path_before_rename
)
rename_namespace_dependencies
(
namespace
,
current_path
,
path_before_rename
)
else
else
say
"Couldn't rename namespace from
#{
current_path
}
back to
#{
path_before_rename
}
"
\
say
"Couldn't rename namespace from
#{
current_path
}
back to
#{
path_before_rename
}
,
"
\
"namespace was renamed, or no longer exists at the expected path"
"namespace was renamed, or no longer exists at the expected path"
end
end
end
end
...
...
lib/gitlab/database/rename_reserved_paths_migration/v1/rename_projects.rb
View file @
8c850380
...
@@ -33,12 +33,13 @@ module Gitlab
...
@@ -33,12 +33,13 @@ module Gitlab
matches_path
=
MigrationClasses
::
Route
.
arel_table
[
:path
].
matches
(
current_path
)
matches_path
=
MigrationClasses
::
Route
.
arel_table
[
:path
].
matches
(
current_path
)
project
=
MigrationClasses
::
Project
.
joins
(
:route
)
project
=
MigrationClasses
::
Project
.
joins
(
:route
)
.
where
(
matches_path
).
first
.
where
(
matches_path
).
first
if
project
if
project
perform_rename
(
project
,
current_path
,
path_before_rename
)
perform_rename
(
project
,
current_path
,
path_before_rename
)
move_project_folders
(
project
,
current_path
,
path_before_rename
)
move_project_folders
(
project
,
current_path
,
path_before_rename
)
else
else
say
"Couldn't rename
P
roject from
#{
current_path
}
back to "
\
say
"Couldn't rename
p
roject from
#{
current_path
}
back to "
\
"
#{
path_before_rename
}
, project was renamed or no longer "
\
"
#{
path_before_rename
}
, project was renamed or no longer "
\
"exists at the expected path."
"exists at the expected path."
...
...
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