diff --git a/docs/changes.rst b/docs/changes.rst
index 6e69a7b84681..59ab3cf8378d 100644
--- a/docs/changes.rst
+++ b/docs/changes.rst
@@ -15,6 +15,7 @@ Released on ? 2015.
* Simplified workflow for accepting suggestions.
* Added project owners who always receive important notifications.
* Allow to disable editing of monolingual template.
+* More detailed repository status view.
weblate 2.2
-----------
diff --git a/weblate/html/js/git-status.html b/weblate/html/js/git-status.html
index 057b156e3f16..8760947add03 100644
--- a/weblate/html/js/git-status.html
+++ b/weblate/html/js/git-status.html
@@ -9,16 +9,24 @@
{% if needs_commit %}
-
{% trans "There are some not committed changes!" %}
+
{% trans "There are some not committed changes!" %}
{% endif %}
+{% if changes.0.is_merge_failure %}
+
+{% else %}
{% if object.git_needs_merge %}
-
{% trans "The remote repository needs to be merged!" %}
+
{% trans "The remote repository needs to be merged!" %}
{% endif %}
{% if object.git_needs_push %}
-
{% trans "There are some new commits in the local repository!" %}
+
{% trans "There are some new commits in the local repository!" %}
{% endif %}
{% if not needs_commit and not object.git_needs_merge and not object.git_needs_push %}
-
{% trans "The local repository is up to date." %}
+
{% trans "The local repository is up to date." %}
+{% endif %}
{% endif %}
{% if object.subproject_set %}
diff --git a/weblate/trans/models/changes.py b/weblate/trans/models/changes.py
index 88e1e43984e8..26be35cf651a 100644
--- a/weblate/trans/models/changes.py
+++ b/weblate/trans/models/changes.py
@@ -216,6 +216,11 @@ class Change(models.Model):
ACTION_FAILED_REBASE,
))
+ ACTIONS_MERGE_FAILURE = set((
+ ACTION_FAILED_MERGE,
+ ACTION_FAILED_REBASE,
+ ))
+
unit = models.ForeignKey('Unit', null=True)
subproject = models.ForeignKey('SubProject', null=True)
translation = models.ForeignKey('Translation', null=True)
@@ -243,6 +248,9 @@ def __unicode__(self):
'user': self.get_user_display(False),
}
+ def is_merge_failure(self):
+ return self.action in self.ACTIONS_MERGE_FAILURE
+
def get_user_display(self, icon=True):
return get_user_display(self.user, icon, link=True)