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
17899d35
Commit
17899d35
authored
Mar 23, 2015
by
Michal Čihař
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Set default branch in cleanup as well
Signed-off-by:
Michal Čihař
<
michal@cihar.com
>
parent
c84a7546
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
4 deletions
+10
-4
weblate/trans/models/subproject.py
weblate/trans/models/subproject.py
+10
-4
No files found.
weblate/trans/models/subproject.py
View file @
17899d35
...
...
@@ -898,6 +898,13 @@ class SubProject(models.Model, PercentMixin, URLMixin, PathMixin):
self
.
update_remote_branch
()
self
.
update_branch
()
def
set_default_branch
(
self
):
'''
Set default VCS branch if empty
'''
if
self
.
branch
==
''
:
self
.
branch
=
VCS_REGISTRY
[
self
.
vcs
].
default_branch
def
clean_repo_link
(
self
):
'''
Validates repository link.
...
...
@@ -1078,6 +1085,8 @@ class SubProject(models.Model, PercentMixin, URLMixin, PathMixin):
if
self
.
project_id
is
None
:
return
self
.
set_default_branch
()
# Check if we should rename
if
self
.
id
:
old
=
SubProject
.
objects
.
get
(
pk
=
self
.
id
)
...
...
@@ -1146,10 +1155,7 @@ class SubProject(models.Model, PercentMixin, URLMixin, PathMixin):
Save wrapper which updates backend repository and regenerates
translation data.
'''
# Set default VCS branch if empty
if
self
.
branch
==
''
:
self
.
branch
=
VCS_REGISTRY
[
self
.
vcs
].
default_branch
self
.
set_default_branch
()
# Detect if VCS config has changed (so that we have to pull the repo)
changed_git
=
True
...
...
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