Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
converse.js
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
nexedi
converse.js
Commits
93077375
Commit
93077375
authored
Jan 17, 2013
by
Michal Čihař
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Do not set this as an attribute
parent
2086d7f2
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
weblate/trans/management/commands/import_project.py
weblate/trans/management/commands/import_project.py
+4
-4
No files found.
weblate/trans/management/commands/import_project.py
View file @
93077375
...
...
@@ -35,8 +35,8 @@ class Command(BaseCommand):
help
=
'imports projects with more subprojects'
args
=
'<project> <gitrepo> <branch> <filemask>'
def
get_name
(
self
,
path
):
matches
=
self
.
maskre
.
match
(
path
)
def
get_name
(
self
,
maskre
,
path
):
matches
=
maskre
.
match
(
path
)
return
matches
.
group
(
1
)
def
handle
(
self
,
*
args
,
**
options
):
...
...
@@ -52,7 +52,7 @@ class Command(BaseCommand):
# Prepare regexp for file matching
match
=
fnmatch
.
translate
(
filemask
)
match
=
match
.
replace
(
'.*.*'
,
'(.*.*)'
)
self
.
maskre
=
re
.
compile
(
match
)
maskre
=
re
.
compile
(
match
)
# Try to get project
try
:
...
...
@@ -86,7 +86,7 @@ class Command(BaseCommand):
# Parse subproject names out of them
names
=
set
()
for
match
in
matches
:
names
.
add
(
self
.
get_name
(
match
))
names
.
add
(
self
.
get_name
(
ma
skre
,
ma
tch
))
logger
.
info
(
'Found %d subprojects'
,
len
(
names
))
# Create first subproject (this one will get full git repo)
...
...
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