Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
H
Hdlmake
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
15
Issues
15
List
Board
Labels
Milestones
Merge Requests
4
Merge Requests
4
Wiki
Wiki
image/svg+xml
Discourse
Discourse
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Projects
Hdlmake
Commits
14e4970d
Commit
14e4970d
authored
Sep 21, 2017
by
Robert Jensch
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Modified: - get basename of svn module with regular expression
parent
3db6af8e
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
path.py
hdlmake/util/path.py
+4
-4
No files found.
hdlmake/util/path.py
View file @
14e4970d
...
...
@@ -25,6 +25,7 @@
from
__future__
import
print_function
from
__future__
import
absolute_import
import
os
import
re
def
url_parse
(
url
):
...
...
@@ -75,11 +76,10 @@ def svn_basename(url):
"""
Get basename from an SVN url
"""
words
=
url
.
split
(
'//'
)
m
=
re
.
search
(
r'\/([^\/]*)\/(trunk|tags|branches)'
,
url
)
try
:
words
=
words
[
1
]
.
split
(
'/'
)
return
'/'
.
join
(
words
[
1
:])
except
IndexError
:
return
m
.
group
(
1
)
except
AttributeError
:
return
None
...
...
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