Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
heptapod
heptapod
Commits
f61b6c348f61
Commit
f61b6c34
authored
Jul 20, 2017
by
Gabriel Mazetto
Browse files
Rename many path_with_namespace -> full_path
parent
98efcda80168
Changes
70
Hide whitespace changes
Inline
Side-by-side
app/helpers/merge_requests_helper.rb
View file @
f61b6c34
...
...
@@ -40,7 +40,7 @@
def
merge_path_description
(
merge_request
,
separator
)
if
merge_request
.
for_fork?
"Project:Branches:
#{
@merge_request
.
source_project_path
}
:
#{
@merge_request
.
source_branch
}
#{
separator
}
#{
@merge_request
.
target_project
.
path_with_namespace
}
:
#{
@merge_request
.
target_branch
}
"
"Project:Branches:
#{
@merge_request
.
source_project_path
}
:
#{
@merge_request
.
source_branch
}
#{
separator
}
#{
@merge_request
.
target_project
.
full_path
}
:
#{
@merge_request
.
target_branch
}
"
else
"Branches:
#{
@merge_request
.
source_branch
}
#{
separator
}
#{
@merge_request
.
target_branch
}
"
end
...
...
app/helpers/projects_helper.rb
View file @
f61b6c34
...
...
@@ -398,7 +398,7 @@
if
project
import_path
=
"/Home/Stacks/import"
repo
=
project
.
path_with_namespace
repo
=
project
.
full_path
branch
||=
project
.
default_branch
sha
||=
project
.
commit
.
short_id
...
...
@@ -458,7 +458,7 @@
def
readme_cache_key
sha
=
@project
.
commit
.
try
(
:sha
)
||
'nil'
[
@project
.
path_with_namespace
,
sha
,
"readme"
].
join
(
'-'
)
[
@project
.
full_path
,
sha
,
"readme"
].
join
(
'-'
)
end
def
current_ref
...
...
app/mailers/notify.rb
View file @
f61b6c34
...
...
@@ -165,7 +165,7 @@
headers
[
'X-GitLab-Project'
]
=
@project
.
name
headers
[
'X-GitLab-Project-Id'
]
=
@project
.
id
headers
[
'X-GitLab-Project-Path'
]
=
@project
.
path_with_namespace
headers
[
'X-GitLab-Project-Path'
]
=
@project
.
full_path
end
def
add_unsubscription_headers_and_links
...
...
app/models/ci/pipeline.rb
View file @
f61b6c34
...
...
@@ -317,7 +317,7 @@
return
@config_processor
if
defined?
(
@config_processor
)
@config_processor
||=
begin
Ci
::
GitlabCiYamlProcessor
.
new
(
ci_yaml_file
,
project
.
path_with_namespace
)
Ci
::
GitlabCiYamlProcessor
.
new
(
ci_yaml_file
,
project
.
full_path
)
rescue
Ci
::
GitlabCiYamlProcessor
::
ValidationError
,
Psych
::
SyntaxError
=>
e
self
.
yaml_errors
=
e
.
message
nil
...
...
app/models/merge_request.rb
View file @
f61b6c34
...
...
@@ -630,7 +630,7 @@
def
target_project_path
if
target_project
target_project
.
path_with_namespace
target_project
.
full_path
else
"(removed)"
end
...
...
@@ -638,7 +638,7 @@
def
source_project_path
if
source_project
source_project
.
path_with_namespace
source_project
.
full_path
else
"(removed)"
end
...
...
app/models/project.rb
View file @
f61b6c34
...
...
@@ -379,7 +379,7 @@
begin
Projects
::
HousekeepingService
.
new
(
project
).
execute
rescue
Projects
::
HousekeepingService
::
LeaseTaken
=>
e
Rails
.
logger
.
info
(
"Could not perform housekeeping for project
#{
project
.
path_with_namespace
}
(
#{
project
.
id
}
):
#{
e
}
"
)
Rails
.
logger
.
info
(
"Could not perform housekeeping for project
#{
project
.
full_path
}
(
#{
project
.
id
}
):
#{
e
}
"
)
end
end
end
...
...
@@ -485,7 +485,7 @@
def
container_registry_url
if
Gitlab
.
config
.
registry
.
enabled
"
#{
Gitlab
.
config
.
registry
.
host_port
}
/
#{
path_with_namespace
.
downcase
}
"
"
#{
Gitlab
.
config
.
registry
.
host_port
}
/
#{
full_path
.
downcase
}
"
end
end
...
...
@@ -524,10 +524,10 @@
job_id
=
if
forked?
RepositoryForkWorker
.
perform_async
(
id
,
forked_from_project
.
repository_storage_path
,
forked_from_project
.
path_with_namespace
,
forked_from_project
.
full_path
,
self
.
namespace
.
full_path
)
else
RepositoryImportWorker
.
perform_async
(
self
.
id
)
end
if
job_id
...
...
@@ -528,8 +528,8 @@
self
.
namespace
.
full_path
)
else
RepositoryImportWorker
.
perform_async
(
self
.
id
)
end
if
job_id
Rails
.
logger
.
info
"Import job started for
#{
path_with_namespace
}
with job ID
#{
job_id
}
"
Rails
.
logger
.
info
"Import job started for
#{
full_path
}
with job ID
#{
job_id
}
"
else
...
...
@@ -535,5 +535,5 @@
else
Rails
.
logger
.
error
"Import job failed to start for
#{
path_with_namespace
}
"
Rails
.
logger
.
error
"Import job failed to start for
#{
full_path
}
"
end
end
...
...
@@ -694,7 +694,7 @@
# `from` argument can be a Namespace or Project.
def
to_reference
(
from
=
nil
,
full:
false
)
if
full
||
cross_namespace_reference?
(
from
)
path_with_namespace
full_path
elsif
cross_project_reference?
(
from
)
path
end
...
...
@@ -718,7 +718,7 @@
author
.
ensure_incoming_email_token!
Gitlab
::
IncomingEmail
.
reply_address
(
"
#{
path_with_namespace
}
+
#{
author
.
incoming_email_token
}
"
)
"
#{
full_path
}
+
#{
author
.
incoming_email_token
}
"
)
end
def
build_commit_note
(
commit
)
...
...
@@ -1002,7 +1002,7 @@
git_http_url:
http_url_to_repo
,
namespace:
namespace
.
name
,
visibility_level:
visibility_level
,
path_with_namespace:
path_with_namespace
,
path_with_namespace:
full_path
,
default_branch:
default_branch
,
ci_config_path:
ci_config_path
}
...
...
@@ -1272,8 +1272,8 @@
[
{
key:
'CI_PROJECT_ID'
,
value:
id
.
to_s
,
public:
true
},
{
key:
'CI_PROJECT_NAME'
,
value:
path
,
public:
true
},
{
key:
'CI_PROJECT_PATH'
,
value:
path_with_namespace
,
public:
true
},
{
key:
'CI_PROJECT_PATH_SLUG'
,
value:
path_with_namespace
.
parameterize
,
public:
true
},
{
key:
'CI_PROJECT_PATH'
,
value:
full_path
,
public:
true
},
{
key:
'CI_PROJECT_PATH_SLUG'
,
value:
full_path
.
parameterize
,
public:
true
},
{
key:
'CI_PROJECT_NAMESPACE'
,
value:
namespace
.
full_path
,
public:
true
},
{
key:
'CI_PROJECT_URL'
,
value:
web_url
,
public:
true
}
]
...
...
@@ -1378,6 +1378,7 @@
alias_method
:name_with_namespace
,
:full_name
alias_method
:human_name
,
:full_name
# @deprecated cannot remove yet because it has an index with its name in elasticsearch
alias_method
:path_with_namespace
,
:full_path
private
...
...
@@ -1432,7 +1433,7 @@
def
pending_delete_twin
return
false
unless
path
Project
.
pending_delete
.
find_by_full_path
(
path_with_namespace
)
Project
.
pending_delete
.
find_by_full_path
(
full_path
)
end
##
...
...
app/models/project_services/flowdock_service.rb
View file @
f61b6c34
...
...
@@ -35,9 +35,9 @@
data
[
:after
],
token:
token
,
repo:
project
.
repository
.
path_to_repo
,
repo_url:
"
#{
Gitlab
.
config
.
gitlab
.
url
}
/
#{
project
.
path_with_namespace
}
"
,
commit_url:
"
#{
Gitlab
.
config
.
gitlab
.
url
}
/
#{
project
.
path_with_namespace
}
/commit/%s"
,
diff_url:
"
#{
Gitlab
.
config
.
gitlab
.
url
}
/
#{
project
.
path_with_namespace
}
/compare/%s...%s"
repo_url:
"
#{
Gitlab
.
config
.
gitlab
.
url
}
/
#{
project
.
full_path
}
"
,
commit_url:
"
#{
Gitlab
.
config
.
gitlab
.
url
}
/
#{
project
.
full_path
}
/commit/%s"
,
diff_url:
"
#{
Gitlab
.
config
.
gitlab
.
url
}
/
#{
project
.
full_path
}
/compare/%s...%s"
)
end
end
app/models/project_services/jira_service.rb
View file @
f61b6c34
...
...
@@ -140,7 +140,7 @@
url:
resource_url
(
user_path
(
author
))
},
project:
{
name:
project
.
path_with_namespace
,
name:
project
.
full_path
,
url:
resource_url
(
namespace_project_path
(
project
.
namespace
,
project
))
# rubocop:disable Cop/ProjectPathHelper
},
entity:
{
...
...
app/models/project_wiki.rb
View file @
f61b6c34
...
...
@@ -27,7 +27,7 @@
end
def
path_with_namespace
@project
.
path_with_namespace
+
"
.wiki
"
@project
.
full_path
+
'
.wiki
'
end
def
web_url
...
...
@@ -47,7 +47,7 @@
end
def
wiki_base_path
[
Gitlab
.
config
.
gitlab
.
relative_url_root
,
"/"
,
@project
.
path_with_namespace
,
"/wikis"
].
join
(
''
)
[
Gitlab
.
config
.
gitlab
.
relative_url_root
,
"/"
,
@project
.
full_path
,
"/wikis"
].
join
(
''
)
end
# Returns the Gollum::Wiki object.
...
...
app/services/git_operation_service.rb
View file @
f61b6c34
...
...
@@ -60,7 +60,7 @@
start_branch_name
=
nil
if
start_repository
.
empty_repo?
if
start_branch_name
&&
!
start_repository
.
branch_exists?
(
start_branch_name
)
raise
ArgumentError
,
"Cannot find branch
#{
start_branch_name
}
in
#{
start_repository
.
path_with_namespace
}
"
raise
ArgumentError
,
"Cannot find branch
#{
start_branch_name
}
in
#{
start_repository
.
full_path
}
"
end
update_branch_with_hooks
(
branch_name
)
do
...
...
app/services/projects/destroy_service.rb
View file @
f61b6c34
...
...
@@ -9,7 +9,7 @@
def
async_execute
project
.
update_attribute
(
:pending_delete
,
true
)
job_id
=
ProjectDestroyWorker
.
perform_async
(
project
.
id
,
current_user
.
id
,
params
)
Rails
.
logger
.
info
(
"User
#{
current_user
.
id
}
scheduled destruction of project
#{
project
.
path_with_namespace
}
with job ID
#{
job_id
}
"
)
Rails
.
logger
.
info
(
"User
#{
current_user
.
id
}
scheduled destruction of project
#{
project
.
full_path
}
with job ID
#{
job_id
}
"
)
end
def
execute
...
...
app/services/projects/import_service.rb
View file @
f61b6c34
...
...
@@ -11,7 +11,7 @@
success
rescue
=>
e
error
(
"Error importing repository
#{
project
.
import_url
}
into
#{
project
.
path_with_namespace
}
-
#{
e
.
message
}
"
)
error
(
"Error importing repository
#{
project
.
import_url
}
into
#{
project
.
full_path
}
-
#{
e
.
message
}
"
)
end
private
...
...
app/services/projects/transfer_service.rb
View file @
f61b6c34
...
...
@@ -34,7 +34,7 @@
private
def
transfer
(
project
)
@old_path
=
project
.
path_with_namespace
@old_path
=
project
.
full_path
@old_group
=
project
.
group
@new_path
=
File
.
join
(
@new_namespace
.
try
(
:full_path
)
||
''
,
project
.
path
)
@old_namespace
=
project
.
namespace
...
...
app/services/system_hooks_service.rb
View file @
f61b6c34
...
...
@@ -24,7 +24,7 @@
key:
model
.
key
,
id:
model
.
id
)
if
model
.
user
data
[
:username
]
=
model
.
user
.
username
end
...
...
@@ -56,7 +56,7 @@
when
GroupMember
data
.
merge!
(
group_member_data
(
model
))
end
data
end
...
...
@@ -79,7 +79,7 @@
{
name:
model
.
name
,
path:
model
.
path
,
path_with_namespace:
model
.
path_with_namespace
,
path_with_namespace:
model
.
full_path
,
project_id:
model
.
id
,
owner_name:
owner
.
name
,
owner_email:
owner
.
respond_to?
(
:email
)
?
owner
.
email
:
""
,
...
...
@@ -93,7 +93,7 @@
{
project_name:
project
.
name
,
project_path:
project
.
path
,
project_path_with_namespace:
project
.
path_with_namespace
,
project_path_with_namespace:
project
.
full_path
,
project_id:
project
.
id
,
user_username:
model
.
user
.
username
,
user_name:
model
.
user
.
name
,
...
...
app/workers/irker_worker.rb
View file @
f61b6c34
...
...
@@ -66,7 +66,7 @@
end
def
send_new_branch
(
project
,
repo_name
,
committer
,
branch
)
repo_path
=
project
.
path_with_namespace
repo_path
=
project
.
full_path
newbranch
=
"
#{
Gitlab
.
config
.
gitlab
.
url
}
/
#{
repo_path
}
/branches"
newbranch
=
"
\x03
02
\x1f
#{
newbranch
}
\x0f
"
if
@colors
...
...
@@ -109,7 +109,7 @@
end
def
send_commits_count
(
data
,
project
,
repo
,
committer
,
branch
)
url
=
compare_url
data
,
project
.
path_with_namespace
url
=
compare_url
data
,
project
.
full_path
commits
=
colorize_commits
data
[
'total_commits_count'
]
new_commits
=
'new commit'
...
...
app/workers/repository_import_worker.rb
View file @
f61b6c34
...
...
@@ -16,7 +16,7 @@
Gitlab
::
Metrics
.
add_event
(
:import_repository
,
import_url:
@project
.
import_url
,
path:
@project
.
path_with_namespace
)
path:
@project
.
full_path
)
project
.
update_columns
(
import_jid:
self
.
jid
,
import_error:
nil
)
...
...
db/migrate/20161124141322_migrate_process_commit_worker_jobs.rb
View file @
f61b6c34
...
...
@@ -16,6 +16,7 @@
end
def
repository_path
# TODO: review if the change from Legacy storage needs to reflect here as well.
File
.
join
(
repository_storage_path
,
read_attribute
(
:path_with_namespace
)
+
'.git'
)
end
...
...
features/steps/project/forked_merge_requests.rb
View file @
f61b6c34
...
...
@@ -30,8 +30,8 @@
expect
(
@merge_request
.
source_project
).
to
eq
@forked_project
expect
(
@merge_request
.
source_branch
).
to
eq
"fix"
expect
(
@merge_request
.
target_branch
).
to
eq
"master"
expect
(
page
).
to
have_content
@forked_project
.
path_with_namespace
expect
(
page
).
to
have_content
@project
.
path_with_namespace
expect
(
page
).
to
have_content
@forked_project
.
full_path
expect
(
page
).
to
have_content
@project
.
full_path
expect
(
page
).
to
have_content
@merge_request
.
source_branch
expect
(
page
).
to
have_content
@merge_request
.
target_branch
...
...
@@ -43,6 +43,6 @@
expect
(
page
).
to
have_content
(
'Target branch'
)
first
(
'.js-source-project'
).
click
first
(
'.dropdown-source-project a'
,
text:
@forked_project
.
path_with_namespace
)
first
(
'.dropdown-source-project a'
,
text:
@forked_project
.
full_path
)
first
(
'.js-target-project'
).
click
...
...
@@ -47,6 +47,6 @@
first
(
'.js-target-project'
).
click
first
(
'.dropdown-target-project a'
,
text:
@project
.
path_with_namespace
)
first
(
'.dropdown-target-project a'
,
text:
@project
.
full_path
)
first
(
'.js-source-branch'
).
click
wait_for_requests
...
...
@@ -81,8 +81,8 @@
expect
(
@merge_request
.
source_project
).
to
eq
@forked_project
expect
(
@merge_request
.
source_branch
).
to
eq
"fix"
expect
(
@merge_request
.
target_branch
).
to
eq
"master"
expect
(
page
).
to
have_content
@forked_project
.
path_with_namespace
expect
(
page
).
to
have_content
@project
.
path_with_namespace
expect
(
page
).
to
have_content
@forked_project
.
full_path
expect
(
page
).
to
have_content
@project
.
full_path
expect
(
page
).
to
have_content
@merge_request
.
source_branch
expect
(
page
).
to
have_content
@merge_request
.
target_branch
end
...
...
features/steps/project/redirects.rb
View file @
f61b6c34
...
...
@@ -47,7 +47,7 @@
step
'I should be redirected to "Community" page'
do
project
=
Project
.
find_by
(
name:
'Community'
)
expect
(
current_path
).
to
eq
"/
#{
project
.
path_with_namespace
}
"
expect
(
current_path
).
to
eq
"/
#{
project
.
full_path
}
"
expect
(
status_code
).
to
eq
200
end
...
...
@@ -61,7 +61,7 @@
step
'I should be redirected to "Enterprise" page'
do
project
=
Project
.
find_by
(
name:
'Enterprise'
)
expect
(
current_path
).
to
eq
"/
#{
project
.
path_with_namespace
}
"
expect
(
current_path
).
to
eq
"/
#{
project
.
full_path
}
"
expect
(
status_code
).
to
eq
200
end
end
features/steps/project/wiki.rb
View file @
f61b6c34
...
...
@@ -142,7 +142,7 @@
end
step
'I should see non-escaped link in the pages list'
do
expect
(
page
).
to
have_xpath
(
"//a[@href='/
#{
project
.
path_with_namespace
}
/wikis/one/two/three-test']"
)
expect
(
page
).
to
have_xpath
(
"//a[@href='/
#{
project
.
full_path
}
/wikis/one/two/three-test']"
)
end
step
'I edit the Wiki page with a path'
do
...
...
Prev
1
2
3
4
Next
Write
Preview
Supports
Markdown
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