Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
Alchemy Viewer
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Deploy
Releases
Package registry
Operate
Terraform modules
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Silent mode is enabled
All outbound communications are blocked.
Learn more
.
Show more breadcrumbs
Alchemy Viewer
Alchemy Viewer
Commits
9f27bff9
Commit
9f27bff9
authored
6 years ago
by
Oz Linden
Browse files
Options
Downloads
Patches
Plain Diff
make the path output strip the 'dest' prefix
parent
fac16e53
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
indra/lib/python/indra/util/llmanifest.py
+14
-1
14 additions, 1 deletion
indra/lib/python/indra/util/llmanifest.py
with
14 additions
and
1 deletion
indra/lib/python/indra/util/llmanifest.py
+
14
−
1
View file @
9f27bff9
...
...
@@ -500,6 +500,19 @@ def dst_path_of(self, relpath):
relative to the destination directory.
"""
return
os
.
path
.
join
(
self
.
get_dst_prefix
(),
relpath
)
def
_relative_dst_path
(
self
,
dstpath
):
"""
Returns the path to a file or directory relative to the destination directory.
This should only be used for generating diagnostic output in the path method.
"""
dest_root
=
self
.
dst_prefix
[
0
]
if
dstpath
.
startswith
(
dest_root
+
os
.
path
.
sep
):
return
dstpath
[
len
(
dest_root
)
+
1
:]
elif
dstpath
.
startswith
(
dest_root
):
return
dstpath
[
len
(
dest_root
):]
else
:
return
dstpath
def
ensure_src_dir
(
self
,
reldir
):
"""
Construct the path for a directory relative to the
source path, and ensures that it exists. Returns the
...
...
@@ -790,7 +803,7 @@ def path(self, src, dst=None):
if
dst
==
None
:
dst
=
src
dst
=
os
.
path
.
join
(
self
.
get_dst_prefix
(),
dst
)
sys
.
stdout
.
write
(
"
Processing %s => %s ...
"
%
(
src
,
dst
))
sys
.
stdout
.
write
(
"
Processing %s => %s ...
"
%
(
src
,
self
.
_relative_dst_path
(
dst
)
))
def
try_path
(
src
):
# expand globs
...
...
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