Commit d983ae81 authored by Weblate's avatar Weblate

Merge remote-tracking branch 'origin/master'

parents 1773ee96 08df5cd3
......@@ -668,7 +668,7 @@ class SubProject(models.Model, PercentMixin, URLMixin, PathMixin):
self.repository.push(self.branch)
return True
except RepositoryException as error:
self.log_error('failed to push on repo')
self.log_error('failed to push on repo: %s', error)
msg = 'Error:\n%s' % str(error)
mail_admins(
'failed push on repo %s' % self.__unicode__(),
......@@ -1070,6 +1070,15 @@ class SubProject(models.Model, PercentMixin, URLMixin, PathMixin):
old = SubProject.objects.get(pk=self.id)
self.check_rename(old)
if old.vcs != self.vcs:
# This could work, but the problem is that before changed
# object is saved the linked repos still see old vcs leading
# to horrible mess. Changing vcs from the manage.py shell
# works fine though.
raise ValidationError(
_('Changing version control system is not supported!')
)
# Check file format
if self.file_format not in FILE_FORMATS:
raise ValidationError(
......@@ -1080,7 +1089,7 @@ class SubProject(models.Model, PercentMixin, URLMixin, PathMixin):
try:
self.sync_git_repo(True)
except RepositoryException as exc:
raise ValidationError(_('Failed to update git: %s') % exc)
raise ValidationError(_('Failed to update repository: %s') % exc)
# Push repo is not used with link
if self.is_repo_link:
......
......@@ -605,7 +605,6 @@ class HgRepository(Repository):
'log', '--limit', '1', '--template', '{node}', '--branch', 'tip'
]
_cmd_update_remote = ['pull']
_cmd_push = ['push']
name = 'Mercurial'
req_version = '2.8'
......@@ -744,7 +743,7 @@ class HgRepository(Repository):
commit_email: {email(author)}
commit: {author}
commitdate: {rfc822date(date)}
commit: {short(note)}
commit: {short(node)}
message:
{desc}
'''
......@@ -878,7 +877,7 @@ class HgRepository(Repository):
Pushes given branch to remote repository.
"""
try:
super(HgRepository, self).push(branch)
self.execute('push')
except RepositoryException as error:
if error.retcode == 1:
# No changes found
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment