Skip to content
GitLab
Menu
Why GitLab
Pricing
Contact Sales
Explore
Why GitLab
Pricing
Contact Sales
Explore
Sign in
Get free trial
Primary navigation
Search or go to…
Project
buildstream
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Privacy statement
Keyboard shortcuts
?
What's new
6
Snippets
Groups
Projects
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
BuildStream
buildstream
Commits
784a781a
Commit
784a781a
authored
6 years ago
by
Jonathan Maw
Browse files
Options
Downloads
Patches
Plain Diff
Move _ALIAS_SEPARATOR into utils
The separator is useful in source files other than _project.py
parent
110f6cb3
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
buildstream/_project.py
+2
-5
2 additions, 5 deletions
buildstream/_project.py
buildstream/utils.py
+4
-0
4 additions, 0 deletions
buildstream/utils.py
with
6 additions
and
5 deletions
buildstream/_project.py
+
2
−
5
View file @
784a781a
...
...
@@ -35,9 +35,6 @@ from ._projectrefs import ProjectRefs, ProjectRefStorage
from
._versions
import
BST_FORMAT_VERSION
# The separator we use for user specified aliases
_ALIAS_SEPARATOR
=
'
:
'
# Project Configuration file
_PROJECT_CONF_FILE
=
'
project.conf
'
...
...
@@ -135,8 +132,8 @@ class Project():
# fully qualified urls based on the shorthand which is allowed
# to be specified in the YAML
def
translate_url
(
self
,
url
):
if
url
and
_ALIAS_SEPARATOR
in
url
:
url_alias
,
url_body
=
url
.
split
(
_ALIAS_SEPARATOR
,
1
)
if
url
and
utils
.
_ALIAS_SEPARATOR
in
url
:
url_alias
,
url_body
=
url
.
split
(
utils
.
_ALIAS_SEPARATOR
,
1
)
alias_url
=
self
.
_aliases
.
get
(
url_alias
)
if
alias_url
:
url
=
alias_url
+
url_body
...
...
This diff is collapsed.
Click to expand it.
buildstream/utils.py
+
4
−
0
View file @
784a781a
...
...
@@ -42,6 +42,10 @@ from . import _signals
from
._exceptions
import
BstError
,
ErrorDomain
# The separator we use for user specified aliases
_ALIAS_SEPARATOR
=
'
:
'
class
UtilError
(
BstError
):
"""
Raised by utility functions when system calls fail.
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment