Commit 4344f6e0 authored by Michal Čihař's avatar Michal Čihař

Fix checking for push/pull with linked projects

parent 6e87269c
......@@ -1059,9 +1059,19 @@ class SubProject(models.Model, PercentMixin, URLMixin, PathMixin):
return True
def git_needs_merge(self):
'''
Checks whether there is something to merge from remote repository.
'''
if self.is_repo_link():
return self.linked_subproject.git_needs_merge()
return self.git_check_merge('..origin/%s' % self.branch)
def git_needs_push(self):
'''
Checks whether there is something to push to remote repository.
'''
if self.is_repo_link():
return self.linked_subproject.git_needs_push()
return self.git_check_merge('origin/%s..' % self.branch)
@property
......
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